Skip to content

Commit

Permalink
wml tools GUI: fixed the WinError 87 that happened on Python 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvish-Hunter committed Aug 18, 2014
1 parent 0104d34 commit 3df50dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data/tools/GUI.pyw
Expand Up @@ -63,7 +63,10 @@ def run_tool(tool,queue,command):
if sys.platform=="win32":
# Windows wants a string, Linux wants a list and Polly wants a cracker
# Windows wants also strings flavoured with double quotes
wrapped_line=map(wrap_elem,command)
# since maps return iterators, we must cast them as lists, otherwise join won't work
# not doing this causes an OSError: [WinError 87]
# this doesn't happen on Python 2.7, because here map() returns a list
wrapped_line=list(map(wrap_elem,command))
queue.put_nowait(' '.join(wrapped_line)+"\n")
si=subprocess.STARTUPINFO()
si.dwFlags=subprocess.STARTF_USESHOWWINDOW|subprocess.SW_HIDE # to avoid showing a DOS prompt
Expand Down

0 comments on commit 3df50dd

Please sign in to comment.