• Omega0

    I recently switched the key clicks sounds off in the iPhone settings and noticed that pythonista's code completion and extra keyboard row still make noise.

    Is it possible to turn off the sounds? If it isn't you may consider this an official feature request.

    posted in Pythonista read more
  • Omega0

    I've found an issue where editor.make_new_file() causes the app to crash. It doesn't seem to matter what arguments I pass to it the app just shuts down.

    posted in Pythonista read more
  • Omega0

    There's already a Lorem Ipsum module in Python's standard library. You may not have seen it because it is called faker. faker provides a lot of functionality that a simple Lorem Ipsum module doesn't in terms of code testing so I'd recommend you check it out.

    posted in Pythonista read more
  • Omega0

    The 2.6 version works for my purposes by changing the CGIHTTPRequestHandler class attributes have_fork, have_popen2 and have_popen3 to False since Pythonista seems to think os has all of those methods but they all raise errors.

    posted in Pythonista read more
  • Omega0

    I've been developing some CGI based scripts in Pythonista and had intended to use the CGIHTTPServer module to test them, but when I tried to import the module I got an error saying the module did not exist. I assume this is due to Apple's restrictions on executing code within apps but I wanted to check to see if it could possibly be added in a later version before I go out and try to set up a web server to test my scripts.

    posted in Pythonista read more
  • Omega0

    A function like ƒ(x) = x^2 would be called quadratic (second order as JonB said) but anything with square like properties should be labeled as square or one of its derivatives (squarish, squarelike, or squared). I'm not sure why the canvas is described as quadratic but a translation issues sounds like a possible reason.

    posted in Pythonista read more
  • Omega0

    @JonB,
    I was unaware of the Safari bookmark method, but what I was looking for was something more along the lines of loading a PDF from the Google Drive app. Which I don't think would be possible with a bookmark.

    posted in Pythonista read more
  • Omega0

    I wonder if Workflow could be used to make an "open in Pythonista" action since it had to be removed from the app natively. I haven't had a chance to mess with Workflow yet, but if this could work it would make my life much easier.

    posted in Pythonista read more
  • Omega0

    With 1.6 in beta I wanted to bring up an unresolved issue from the past: motion.get_magnetic_field(). I wanted to start doing some tests with magnetism but I keep getting (0.0, 0.0, 0.0, 0) as the return value. Is there any chance this will be fixed in the final release of 1.6?

    posted in Pythonista read more
  • Omega0

    Enabled location services for Pythonista, still not working.

    posted in Pythonista read more
  • Omega0

    I'm using an iPhone 5s which does have a magnetic field sensor (and does work in other apps) and I did remeber to call motion.start_updates(), so those aren't the issues. I remeber seeing another thread about this a while ago and don't remember that being resolved so I think this is just a glitch in Pythonista.

    posted in Pythonista read more
  • Omega0

    That's fine. It was a pretty quick code anyway.

    posted in Pythonista read more
  • Omega0

    You can add subviews to the content_view attribute of an instance of ui.TableViewCell. This is mentioned in the documentation but not directly, it only tells you that views can be added this way, not why you would do it. Also, Dann, for the author of the code above you could find the username of the poster. (I care only because I made it.)

    posted in Pythonista read more
  • Omega0

    You probably left out a comma somewhere or are you typing $ Python ex13.py to run it?. I tried the example and it worked perfectly.

    posted in Pythonista read more
  • Omega0

    If you want to use the transparent top view maybe you can call MyWebView.touch_began(touch) once you decide that it should be sent to the WebView?

    posted in Pythonista read more
  • Omega0

    How exactly are you doing the square root operation?

    I got it to work by doing this:

    long_example = 10**200
    long_example_root = long_example**0.5
    

    Since ^ is a bitwise operator in python ** is the power sign so 10**200 is equivalent to 10^200 in normal writing. Also python doesn't have a normal square root function so long_example**0.5 or long_example**(1/2) is equivalent to a square root operation.

    posted in Pythonista read more
  • Omega0

    I'm trying to use the page name as a sort of dynamic label, sending information to the user in a convenient way. I can get this to work using just the custom view but it doesn't seem to work when the view is being presented via the navigation view.

    Here's the code I'm testing with, any help would be appreciated:

    import ui
    
    class CustomView (ui.View):
        def __init__(self):
            ui.View.__init__(self, name = 'Test')
    
        def touch_began(self, touch):
            self.name = str(touch.location)
    
        def touch_moved(self, touch):
            self.name = str(touch.location)
    
        def touch_ended(self, touch):
            self.name = 'Test'
    
    view = CustomView()
    nav = ui.NavigationView(view)
    view.left_button_items = [ui.ButtonItem(image = ui.Image.named('ionicons-close-24'), action = lambda sender: nav.close())]
    nav.present(hide_title_bar = True)
    

    posted in Pythonista read more
  • Omega0

    I would prefer to keep the title bar hidden (it just looks better that way), but I will use navigation view's name as a temporary solution. I was hoping for something that would force the navigation view to ask for the view's name again but I haven't seen anything like that in the documentation. Maybe this is just a bug?

    posted in Pythonista read more
  • Omega0

    I didn't realize that initially. I guess I just forgot to take it out after I figured it out.

    posted in Pythonista read more
  • Omega0

    That sounds a really cool idea. Especially as a showcase of exactly what pythonista can do.

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!