os.system与Py2Exe [英] os.system vs. Py2Exe
问题描述
我使用Py2exe编译我的脚本(我使用XP)。
编译后的脚本在我安装Python的XP上运行正常。
但是当我安装时编译exe到另一台计算机,
os.system
导致以下错误:
错误的文件或命令姓名
任何帮助都将不胜感激。
Lad
I used Py2exe to compile my script( I use XP).
The compiled script works OK on my XP where Python is installed.
But when I install the compiled exe to another computer,
os.system
causes the following error:
Bad file or command name
Any help would be appreciated.
Lad
推荐答案
Am 2004年9月28日星期二03:00:23 -0700 schrieb Lad:
Am Tue, 28 Sep 2004 03:00:23 -0700 schrieb Lad:
我使用Py2exe编译我的脚本(我使用的是XP)。
编译后的脚本正常工作我的XP安装了Python。
但是当我将编译后的exe安装到另一台计算机上时,
os.system
会导致以下错误:
错误的文件或命令名称
I used Py2exe to compile my script( I use XP).
The compiled script works OK on my XP where Python is installed.
But when I install the compiled exe to another computer,
os.system
causes the following error:
Bad file or command name
您好,
您使用os.system执行什么操作?
如果您执行的脚本以
#!INTERPRETER
开头,您可能会遇到麻烦。我不认为这个
在Windows下得到很好的支持。
试试这个:os.system(" INTERPRETER SCRIPT")
问候,
托马斯
Hi,
What do you execute with os.system?
If the script you execute startswith
#!INTERPRETER
you might have trouble. I don''t think this
is well supported under windows.
Try this: os.system("INTERPRETER SCRIPT")
Regards,
Thomas
前**** @ hope.cz (Lad)在留言中写道:< 81 ************************ *@posting.google.c om> ...
ex****@hope.cz (Lad) wrote in message news:<81*************************@posting.google.c om>...
我使用Py2exe编译我的脚本(我使用XP)。
编译后的脚本在安装了Python的XP上运行正常。
但是当我将编译后的exe安装到另一台计算机上时,
os.system
会导致以下错误:
错误的文件或命令名称
任何帮助都将不胜感激。
Lad
I used Py2exe to compile my script( I use XP).
The compiled script works OK on my XP where Python is installed.
But when I install the compiled exe to another computer,
os.system
causes the following error:
Bad file or command name
Any help would be appreciated.
Lad
您是否也安装了python dll?
Did you install the python dll as well?
gj*****@usa.com (Greg)在留言中写道:< 77**************************@posting.google。 com> ...
gj*****@usa.com (Greg) wrote in message news:<77**************************@posting.google. com>...
ex****@hope.cz (Lad)在留言中写道新闻:< 81 ************************* @ posting.google.c om> ...
ex****@hope.cz (Lad) wrote in message news:<81*************************@posting.google.c om>...
I使用Py2exe编译我的脚本(我使用XP)。
编译后的脚本在安装了Python的XP上运行正常。
但是当我将编译后的exe安装到另一台计算机上时,
os.system
导致以下错误:
错误的文件或命令名
任何帮助将不胜感激。
Lad
I used Py2exe to compile my script( I use XP).
The compiled script works OK on my XP where Python is installed.
But when I install the compiled exe to another computer,
os.system
causes the following error:
Bad file or command name
Any help would be appreciated.
Lad
你也安装了python dll吗?
Did you install the python dll as well?
是的,我安装了所有文件(我认为),因为其他一切都有效。
只有os.system没有。
我使用os.system打开txt文件。我像os.system一样使用它(''Myfile.txt'')
当我使用os.startfile而不是os.system时效果很好。
Yes, I installed all files( I think) because everything else works.
Only os.system does NOT.
I use os.system to open txt file.I use it like os.system(''Myfile.txt'')
When I use os.startfile instead of os.system it works well.
这篇关于os.system与Py2Exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!