Thanks for adding the follow up. I needed that.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Posts made by nasadave
-
RE: Uploading an image using SFTP (paramiko)
-
RE: Is REQUESTS the right approach for what I'm trying to do?
I'll look into both.
-
Is REQUESTS the right approach for what I'm trying to do?
Before I go too far down the learning curve, I am wondering if requests is the right module to do what I'm trying to do.
I'd like to pass a file (initially a text file, eventually a photo with metadata) generated thru Pythonista on iPad to a file server on a Linux machine. Is requests the right approach? And are there any examples of doing what I'm trying to do that might be out there?
I have the file creation software up and running but I don't have anything that I can do with it just yet.
Thanks!
-
RE: Is REQUESTS the right approach for what I'm trying to do?
Ok, so I suppose I have the option of running the Linux server as a file server or an HTML server since I'll be controlling the host. That being said, would you still recommend against requests? Another approach? Basically I want to use the iPad to create a file, pass it to the Linux, and have a different program on the Linux manipulate the file.
-
RE: Is there a way to access the FaceTime iPad camera through code?
Nothing, huh? No way to do this?
-
Is there a way to access the FaceTime iPad camera through code?
I'm using the following to take a photo on an iPad:
myimage = photos.capture_image()
But that always accesses the iSight camera (the one on the back of the iPad). For the purposes of my program I'd like to access the other camera every time. I realize that the user can click the camera swap button, but I'd rather skip that step since the intent of the program is to take a photo of the user every time.
Suggestions?
-
Now… Change the image in a UI...
Using the same method recommended to change text in a label (previous post), I am now trying to change an image based on a photo taken by the camera. The program tries, but returns a blank image to the UI. The image is definitely being taken, because I can display it to the console - just not in the ImageView image on the UI.
Here's the code:
v=ui.load_view('MyUI')
v.present('sheet')
@ui.in_background
def getimage():
…myimage=photos.capture_image()
…imageview1=v['imageview1']
…myimage = myimage.resize((50,50),Image.BILINEAR)
…imageview.image=ui.Image(myImage)
getimage()
-
RE: Now… Change the image in a UI...
But thanks for your response… I will eventually need to know how to make a PIL conversion too!
-
RE: Now… Change the image in a UI...
Oops, yes, you're correct. I had added this line in the def after posting the first time:
myimage = photos.get____image(raw____data=True)
-
RE: Now… Change the image in a UI...
Figured it out. Needed to modify the last line in the def to:
imageview1.image=ui.Image.from_data(myimage)
That worked.
-
RE: Change the text of a label in the UI?
Genius, exactly what I needed, thank you!
-
Change the text of a label in the UI?
Fairly new to python here, so be gentle…
I am trying to change the text of a label on a UI based on user input into a console alert input variable. I can get a button title to change, but not a label text. What am I missing here?
This is basically what I'm doing (textlabel is the name of the label box in the UI). The program seems to run fine but makes no change to the label text:
def entername():
...mytext = console.input_alert('Please enter text:')
...textlabel=ui.Label('textlabel')
...textlabel.text=mytext
ui.load_view('myUI').present('sheet')
entername()
-
Access Front Facing Camera on iPad by Default?
When using the photos.capture_image() command, is there a way to access the front facing camera on the iPad by default, rather than make the user select it?