4

I'm running Qpython (andoid) 1.2.3 (the latest as of 2016-01-31) and I can get scripts to run. I've been able to create a shortcut on my homescreen for a simple test script that put the current date in yyyy-mm-dd format into the clipboard, and speaks the content. I have #qpy: console directing the script to execure in the console. When I click the shortcut, the clipboard is happily updated, and read out to me. But... the console window stays open, telling me to hit enter to close the window.

I have tried:

  • adding "exit"
  • adding "exit(0)"
  • adding
    import sys
    sys.exit()
  • I have tried printing ctrl-d

I still get the console staying open until I manually hit enter.

I tried reheadering my script to run as kivy instead of console, and I could get it to exit, but it takes several seconds to load up kivy, and it's silly to load a huge amount of gui capability, when I neither need nor want them.

How can I close the console automatically?

inkwire
  • 41
  • 2

2 Answers2

1

Can you upgrade to the newest version ? And it support Q mode, just insert "#qpy:qpyapp" into your script.

http://www.qpython.org/en/guide_program.html (In the end of the page)

0

edit the file end.sh. Remove or comment the "read" command.