• technoway

    dgelessus - Good catch. I missed the missing space at first when I read the first post.

    That is def__init__-ly the problem.

    Sorry, I couldn't resist the bad pun.

    In my defense, I would have tried to help too, but I just got here.

    posted in Pythonista read more
  • technoway

    @omz - Thank you for the reply. That will stop me from trying to remove something I cannot remove.

    posted in Pythonista read more
  • technoway

    @JonB - In every case described below, I am starting the application using a shortcut .

    When my app calls os._exit(0), I see no windows. If I click the home button, I see two windows in the background.

    I can run my application by clicking on one of the windows.

    If I use os._exit(0), I still see two windows, and just as before, I can still restart my app by clicking on one of the windows. (It's the mostly all white (console?) window,- my application sets a black background which shows in the other window). Note, I call console.exit(), so I though I closed the console window.

    I am also still able to reopen Pythonista using the Pythonista icon while that other window is present.

    I must not be cleaning something up?

    posted in Pythonista read more
  • technoway

    cvp - That is what I meant. When os.abort() or os._exit(0) is called, the app shuts down, the home screen shows, but, depending on the Pythonista app, there are one or two windows running in the background.

    It's not a big deal. I can launch Pythonista again without closing these windows.

    posted in Pythonista read more
  • technoway

    @ccc - I did some searching, and apparently Apple discourages calling exit(0) in objective C to close an app, because that appears similar to an app crashing.

    My issue is that when I use a shortcut URL to launch my GUI application, when I hit the home button to close the app, there are two windows to close, not just one like most (all?) other apps.

    Is there a way I can make my app so that it does not show the second window when I start the app this way?

    I am using a uiView-derived window in my app.

    posted in Pythonista read more
  • technoway

    JonB - Thanks for the reply. Unfortunately, os.abort() appears to do the same thing as os.exit(0). The app goes away, but the console window, and one other window, presumably the main Pythonista window, are running in the background and have to be closed separately.

    I'm running the latest Pythonista beta on an iPhone 6s running IOS 11.2.1

    I'm not complaining. Pythonista is great the way it is. That would be a nice feature though.

    posted in Pythonista read more
  • technoway

    Is there still no function or method to shutdown Pythonista from within a script?

    posted in Pythonista read more
  • technoway

    lukaskollmer posted a link to code to get memory statistics in this topic:
    https://forum.omz-software.com/topic/3146/share-code-get-available-memory

    JonB has another link to code to get memory memory statistics in the same topic. (Although, the current ending comment JonB put there is, "Looks like this code does not work properly on 64 bit... i suspect the structure is not sized correctly." - but if the first code doesn't help, you might want to use JonB's code as a starting point.

    I am not sure any of that will help you detect a leak though.

    Python uses reference-counted objects and garbage collection. There might be a way to force garbage collection, but even if "del" as used to delete an object, and there was some special way to force immediate garbage collection, while the memory will be freed so that Pythonista can reallocate it for another purpose, the memory won't necessarily be freed to the operating system.

    You could use "multiprocessing" and do memory intensive work in a subprocess, and when that process closes, the memory will be returned to the operating system.

    Perhaps someone more familiar with Pythonista's internals can give a better answer. My guess is that what I wrote is correct.

    posted in Pythonista read more
  • technoway

    Thank you for writing this and sharing it. StaSh is great.

    posted in Pythonista read more
  • technoway

    Cool program. Thanks for sharing it.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!