2

I am trying to make a curses script on Qpython, but neither do qpy2 or 3 work. On Qpython 2, import curses says 'module not found', and on Qpython 3, it works, but at the first initscr it crashes with the following exception:

Traceback (most recent call last):
  File "/mnt/sdcard/com.hipipal.qpyplus/scripts3/testcurses.py", line 4, in <module>
    win=curses.initscr()
  File "/data/data/com.hipipal.qpy3/files/lib/python3.2/python32.zip/curses/__init__.py", line 31, in initscr
_curses.error: setupterm: could not find terminal

I am using the example that came with Qpython 3 as a test. If that helps, I'm using a kindle fire HD (the old one) with a sideloaded APK from google play. (no I'm not rooted)

Min4Builder
  • 148
  • 1
  • 8
  • The error already gives a clear reason: the script is not run in any kind of terminal. Sure there are terminal emulators available for android (assuming you are running android). Install one on your phone and run the script from there. – chtenb Jan 23 '16 at 19:52
  • Yes, I *do* have a terminal emulator, but I can't find a way to launch the script from there. Also, it should work in the builtin terminal emulator, right? – Min4Builder Jan 25 '16 at 12:15
  • I'm not an expert on this, but I don't think there is a builtin terminal emulator in Android. Google around on how to launch python scripts from the emulator you installed. http://stackoverflow.com/questions/18901323/executing-python-script-in-android-terminal-emulator – chtenb Jan 25 '16 at 12:27
  • I meant the terminal emulator builtin into Qpython. – Min4Builder Jan 26 '16 at 13:41
  • I'm also having the same issue. It's an example script provided by Qpython so I expected it to work right away in the terminal window it provides... Weird. – Alexandre Dumont Feb 02 '22 at 20:01

0 Answers0