简体   繁体   中英

Python to Mac .app (EOFError caused by raw_input)

So, basically I have a python script which I would like to convert into a Mac Application (.app). The basic structure of the code is this:

while 1:
    command_handler(raw_input("> ",))

What I have here is actually a REPL , which takes input from the user and responds accordingly.

I have tried exporting it with py2app, Platypus, Xcode, Build Applet, AppleScript. Most of them throw an error:

EOFError: EOF when reading a line

Xcode doesn't let me export (I used this to set it up accordingly), it doesn't even create an archive.

Build Applet makes an .app, but when I open it, it closes immediately.

The rest of them throw the EOFError .

What should I do?

Take a look at this post which is about py2app and the like giving the EOFError while using raw_input . Hope this can lead you in the right direction, I would help test some things out but I am on Windows.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM