I am trying to write a script in Python which opens wine
and then sends code to the wine
terminal to open a .exe
program. The .exe
program is also command driven.
I can open wine
, but I can't get any further:
import shlex, subprocess
line = "/usr/bin/open -n -a /Applications/Wine\ Stable.app"
line2 = '''cd /Applications/application/ && wine application.exe /h1
/k0 Z:/Users/myname/Desktop/File.TXT'''
line = shlex.split(line)
p1 = subprocess.Popen(line)
p1.stdin.write(line2.encode())
The above doesn't work, wine
doesn't seem to receive line2, although
/usr/bin/open -n -a /Applications/Wine\ Stable.app
by itself is fine (it opens Wine
but nothing else.)
I'm pretty confused about what the next step should be. I would like to avoid additional dependencies if possible, because it seems simple.