• robnee

    Is there a way to set the stderr color used for trace backs via the theming engine? The default red color does not work well on dark backgrounds for me. Maybe it's my eyes but I can't read it. I don't see an obvious option for this though. Thanks.

    posted in Pythonista read more
  • robnee

    Thanks for sharing this JonB. This technique looks handy. I will give this a try.

    posted in Pythonista read more
  • robnee

    Thanks. At least I'm not crazy. This really limits the usefulness of the debugger. Sometimes the call chain can be complex and stepping to get to the code I need to look at isn't feasible. I might try a few more things and report back.

    posted in Pythonista read more
  • robnee

    Is it possible to debug a program that requires command line arguments via sys.argv? This behaves differently when launched via Run vs Debug (after setting a breakpoint) and the command line arguments, when specified, are lost.

    Import sys
    
    Print(sys.argv)
    

    posted in Pythonista read more
  • robnee

    Can anyone confirm whether one can set breakpoints in a project with multiple modules?

    posted in Pythonista read more
  • robnee

    Is there a trick to setting breakpoints across modules? If I have a python file, a.py that imports b.py and I set a breakpoint in b.py when I run a.py the breakpoint does not fire for me. The code in b.py runs fine. Just the breakpoint isn't firing Is there a way to use the debugger here? What am I missing?

    Thanks if you can help.

    posted in Pythonista read more
  • robnee

    I was able to work around a similar problem without needing to move the project from Working Copy to Pythonista using a custom import hook. It's a hack but it works for me. Each file seems to need to be opened by Pythonista in it's external location at least once before importing via the hook will work.

    https://github.com/robnee/importhack

    posted in Pythonista read more
  • robnee

    Are your modules in an external app such as Working Copyand you are trying to import them? Is that the external files you mention, an external file provider? There’s a limitation to those because even if the path is set properly iOS limits searching of a file providers files. There are some ugly workarounds for that though

    posted in Pythonista read more
  • robnee

    Hide_title_bar does not work for me. Not sure why people recommend it.

    This is a solution I came up with.

    class MyScene(scene.Scene):
        def setup(self):
            self.label = scene.LabelNode('Test hide title bar', 
            position=self.size/2, parent=self)
            self.hide_close()
    
        def hide_close(self, state=True):
            from obj_util import ObjCInstance
            v = ObjCInstance(self.view)
            # Find close button.  I'm sure this is the worst way to do it
            for x in v.subviews():
                if str(x.description()).find('UIButton) >= 0:
                    x.setHidden(state)
    
    scene.run(MyScene())
    

    posted in Pythonista read more
  • robnee

    Is Editorial still supported? It doesn't seem to be updated anymore.

    posted in Editorial read more

Internal error.

Oops! Looks like something went wrong!