• michael_recchione

    Is there a way to tell which of the iOS location services are being used, and what the source of the location measurement is, i.e. GPS, WiFi, cell? Also, if GPS, is there a way to tell how many satellites were seen to get the measurement?

    Trying to identify sources of systematic location errors...

    Thanks!

    posted in Pythonista read more
  • michael_recchione

    I just got an iPhone, and have a bunch of scripts with UIs that I developed on the iPad. When I brought them over to the iPhone, they don't resize or scroll, so many of the entry fields and buttons are not accessible. Is there a way to fix this without recreating the pyui file from scratch?

    Thanks!

    posted in Pythonista read more
  • michael_recchione

    That would let me FTP directly from my iPad to my iPhone? Sure!

    posted in Pythonista read more
  • michael_recchione

    I'm sorry for what's probably a stupid question, but I've been struggling with this for a while, and can't find the answer...

    I'm using dropbox to copy files from my pythonista scripts directory on my iPad to my iPhone. When I open a .py file in the editor, the wrench gets me menu that allows me to export the file to dropbox. There doesn't appear to be anything like that when I open the .pyui file. How can I export that file to dropbox?

    Thanks!

    posted in Pythonista read more
  • michael_recchione

    Thanks! - I'll try that.

    posted in Pythonista read more
  • michael_recchione

    I just spent an hour moving controls around, changing font sizes, resizing things so the UI would fit on the phone. As porting an app goes, an hour isn't that bad, I guess. But still - it would be nice if there were a more elegant way to do this, and I'll bet their probably is...

    For example, the phone I got was an iPhone6. Would I need to mess around with the UI for each different screen size?

    posted in Pythonista read more
  • michael_recchione

    I figured out a workaround, by putting the .pyui file into a folder, and exporting the whole folder, using Dropbox File Picker to get the folder, and zipfile.extract() to get the files. Very cumbersome, though. Is there an easier way?

    posted in Pythonista read more
  • michael_recchione

    I've been trying the following:

    import canvas
    from PIL import Image

    im = Image.open("./myfile.jpg")

    image = im.tobitmap()

    canvas.draw_image(image,0,0,600,600)

    I keep getting the error on the line calling tobitmp: "ValueError: Not a bitmap"

    What am I doing wrong?

    Thanks!

    posted in Pythonista read more
  • michael_recchione

    Thanks, this worked!

    I tried used one of the online converters to convert an image from jpg to bmp, but when I tried to use it with canvas.draw_image, it claimed that the bitmap compression wasn't supported. So, bottom line, I haven't yet been successful in getting draw_image() to work.

    posted in Pythonista read more
  • michael_recchione

    I would like to build an app that keeps track of location, signal strength, data rates for data connections, information about drops, blocks, call quality, connection times, etc. Is there a way to access this information in the iPhone from pythonista? Or anywhere, for that matter? I know there are apps that do this (and sell the information to cellular service providers), but I'd like to create one myself...

    Any ideas?

    posted in Pythonista read more
  • michael_recchione

    Thanks. That would be ok as a start. There must be an API on the phone, somewhere, that allows access to the modem - after all, things like click to dial, etc are supported. As are call-progress messages, for things like Skype and Google.

    posted in Pythonista read more
  • michael_recchione

    Thanks - that's a start. I know that the phone knows whether it sees 3G or 4G, it knows signal strength. And I know there are some apps that record that. Is there a way to see what's going on with TCP/IP, e.g. timeouts, packet failures, number of retransmission attempts? I know that seeing into the MAC layer events would probably require access to the APIs for the modem chip on the phone, but I'm wondering if layer 3 is visible somewhere.

    posted in Pythonista read more
  • michael_recchione

    If you need a newb's perspective, I'd be happy to help. I'm definitely less far along on the learning curve...

    posted in Pythonista read more
  • michael_recchione

    I did poke around some more and found dropbox_file_picker, which I guess will let me bring files in to the sandbox - haven't tried it yet, but will probably tomorrow. I'm pretty new to iOS devices, and newer still to developing any kind of software on an iOS device, and am developing a real love/hate relationship with Apple.

    But, in any case, at least there was a workaround.

    Thanks for the responses!

    posted in Pythonista read more
  • michael_recchione

    I apologize if this is the wrong place to ask something so basic, but I've searched and I'm stumped...

    I have some pdf files that I downloaded using the browser's "open_in" capability, that I associated with the Nook app (just because it was convenient at the time...). I would now like to access those files from a Pythonista script, but I can't figure out how to get to them.

    I've been trying to use os.listdir() to poke around from the console, and it won't even let me even get a directory listing of most of the directories on the iPad. (Says the operation is not permitted...) I've noticed that some scripts on GitHub do a workaround by putting content files in their repository, and then grabbing them using a script that writes them into one of the Pythonista directories. It seems to me that there should be a better way than physically storing content files in the same directory as the script, and having to go through bizarre contortions to get the files there...

    Is there a way to find the path to an arbitrary file that's on the iPad somewhere, and then to use that path to reference the file from within a Pythonista script?

    Thanks!

    posted in Pythonista read more
  • michael_recchione

    As a pythonista beginner with some (limited) python experience (MSWindows and Linux), I'd say that the biggest challenges and frustrations I've faced with Pythonista have to do with the limitations of iOS and Apple's walled garden approach, and the bizarre contortions you have to go through to overcome how hard they make it to get anything into or out of it. The other frustration is that, after you've developed something that works, you have to go through a bunch of other bizarre contortions to be allowed to let your project look and work like a real app and not have to run it from within Pythonista.

    I don't see these as Pythonista problems - they're really Apple problems.

    My other needs for coming up the learning curve have been met really well by asking questions here, and a lot of googling. (Not a bad way to learn, btw...) Really helpful utilities are not in the documentation. (Example: GitHubGet has been one of the most useful tools I've found, and it took me a day of poking around to find it... I kind of knew something like that HAD to exist, but it sure wasn't easy to find...)

    I would love to see this stuff collected in one place, with some narrative around it to explain what problems someone is likely to run into and how to use these tools to solve them. I'd be willing to help pull something like that together, but would need to work with someone more knowledgable - I'm still feeling my way around. (Added a gui using the ui library for the first time yesterday! Before that, I wrote little hacks that were reminiscent of the programs I used to write back in the early 1980s. I've successfully moved from the early 1980s to the late 1980s!)

    posted in Pythonista read more
  • michael_recchione

    Fantastic! Thanks! It works...

    posted in Pythonista read more
  • michael_recchione

    I'm playing with using the ui designer for the first time, and am confused. I'm trying to create a view with a few labels and textfields, and would like to read the values of a couple of textfields, do something with them, and display the result in another. The documentation says that I should be able to set the action from the attribute menu in the designer tool. But there doesn't seem to be that ability.

    How can you set the actions for the controls that are created in the designer tool?

    Thanks

    posted in Pythonista read more
  • michael_recchione

    Thanks! Two additional questions, then:

    1. Are there any examples of scripts using textfields you could point me to, to see how it's done?

    2. Is there any way to actually look at the code that the UI designer generates, and to modify it directly, as text?

    I'm new here, so I apologize if I've violated recommended practice by including new questions in an existing thread. I'm just trying to come out of the 1980's, and to add some rudimentary UI beyond the console to my code...

    Thanks in advance for any help!

    posted in Pythonista read more
  • michael_recchione

    Thanks! I'll download it tonight.

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!