2007年05月17日 星期四 21:50
大家好: command = '"D:\Program Files\UltraEdit-32\Uedit32.exe" "D:\1.xml"' os.popen(command) -- 运行没反应 os.execv( 'D:\Program Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- os.execvp( 'D:\Program Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- 打开了uedit32,但是去在当前的工程目录中新建了一个1.xml文件 os.system(command) -- 'D:\Program' 不是内部或外部命令,也不是可运行的程序或批处理文件。 subprocess.Popen(command, shell=True) -- 'D:\Program' 不是内部或外部命令,也不是可运行的程序或批处理文件。 为什么没有一个可以正常运行的啊 致 礼! 李鹏 jeffskylee在163.com 2007-05-17
2007年05月18日 星期五 09:07
>>> import os >>> os.popen('\"notpad.exe d:\\11.txt\"') ÔÚ07-5-17£¬ÀîÅô <jeffskylee在163.com> дµÀ£º > > ´ó¼ÒºÃ: > > command = '"D:\Program Files\UltraEdit-32\Uedit32.exe" > "D:\1.xml"' > os.popen(command) -- ÔËÐÐû·´Ó¦ > os.execv( 'D:\Program > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- > os.execvp( 'D:\Program > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- ´ò¿ªÁËuedit32£¬ > µ«ÊÇÈ¥ÔÚµ±Ç°µÄ¹¤³ÌĿ¼ÖÐн¨ÁËÒ»¸ö1.xmlÎļþ > os.system(command) -- 'D:\Program' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > subprocess.Popen(command, shell=True) -- 'D:\Program' > ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > > ΪʲôûÓÐÒ»¸ö¿ÉÒÔÕý³£ÔËÐеİ¡ > > Ö > Àñ£¡ > > > ÀîÅô > jeffskylee在163.com > 2007-05-17 > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070518/743cec1e/attachment.html
2007年05月18日 星期五 09:16
Èç¹ûÃüÁî±¾ÉíÓпոñ,»¹ÒªÔÙ¼Ó²ÎÊý,¾Í¶àǶÌ×Ò»²ãÒýºÅ,ÀýÈçÕâÑù: >>> cmd='\"\"D:\\Program Files\\Microsoft Office\\OFFICE11\\winword.exe\" \"d:\\11.doc\"\"' >>> os.popen(cmd) ÔÚ07-5-18£¬Í·Ì«ÔÎ <torrycn在gmail.com> дµÀ£º > > >>> import os > >>> os.popen('\"notpad.exe d:\\11.txt\"') > > ÔÚ07-5-17£¬ÀîÅô <jeffskylee在163.com > дµÀ£º > > > > ´ó¼ÒºÃ: > > > > command = '"D:\Program Files\UltraEdit-32\Uedit32.exe" > > "D:\1.xml"' > > os.popen(command) -- ÔËÐÐû·´Ó¦ > > os.execv( 'D:\Program > > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- > > os.execvp( 'D:\Program > > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- ´ò¿ªÁËuedit32£¬ > > µ«ÊÇÈ¥ÔÚµ±Ç°µÄ¹¤³ÌĿ¼ÖÐн¨ÁËÒ»¸ö1.xmlÎļþ > > os.system(command) -- 'D:\Program' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > > subprocess.Popen(command, shell=True) -- 'D:\Program' > > ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > > > > ΪʲôûÓÐÒ»¸ö¿ÉÒÔÕý³£ÔËÐеİ¡ > > > > Ö > > Àñ£¡ > > > > > > ÀîÅô > > jeffskylee在163.com > > 2007-05-17 > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070518/a042ccbe/attachment.html
2007年05月18日 星期五 09:36
editPlus = "D:\Program Files\EditPlus 2\editplus.exe" os.execv(editPlus,(editPlus,result[int(offset)][0],"-cursor "+ str(result[int(offset)][1])+":"+str(result[int(offset)][3]))) os.spawnvp(os.P_WAIT,editPlus,(editPlus,result[int(offset)][0],"-cursor "+ str(result[int(offset)][1])+":"+str(result[int(offset)][3]))) ÎÒÒÔÇ°ÕâÑùдµÄ ÄÜ´ò¿ª On 5/18/07, Í·Ì«ÔÎ <torrycn在gmail.com> wrote: > > Èç¹ûÃüÁî±¾ÉíÓпոñ,»¹ÒªÔÙ¼Ó²ÎÊý,¾Í¶àǶÌ×Ò»²ãÒýºÅ,ÀýÈçÕâÑù: > > >>> cmd='\"\"D:\\Program Files\\Microsoft Office\\OFFICE11\\winword.exe\" > \"d:\\11.doc\"\"' > >>> os.popen(cmd) > > > ÔÚ07-5-18£¬Í·Ì«ÔÎ <torrycn在gmail.com> дµÀ£º > > > > >>> import os > > >>> os.popen('\"notpad.exe d:\\11.txt\"') > > > > ÔÚ07-5-17£¬ÀîÅô < jeffskylee在163.com > дµÀ£º > > > > > > ´ó¼ÒºÃ: > > > > > > command = '"D:\Program Files\UltraEdit-32\Uedit32.exe" > > > "D:\1.xml"' > > > os.popen(command) -- ÔËÐÐû·´Ó¦ > > > os.execv( 'D:\Program > > > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- > > > os.execvp( 'D:\Program > > > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- ´ò¿ªÁËuedit32£¬ > > > µ«ÊÇÈ¥ÔÚµ±Ç°µÄ¹¤³ÌĿ¼ÖÐн¨ÁËÒ»¸ö1.xmlÎļþ > > > os.system(command) -- 'D:\Program' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > > > subprocess.Popen(command, shell=True) -- 'D:\Program' > > > ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > > > > > > ΪʲôûÓÐÒ»¸ö¿ÉÒÔÕý³£ÔËÐеİ¡ > > > > > > Ö > > > Àñ£¡ > > > > > > > > > ÀîÅô > > > jeffskylee在163.com > > > 2007-05-17 > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070518/cbfa6a65/attachment.htm
2007年05月18日 星期五 09:45
²»ºÃÒâ˼ editPlus = "D:\Program Files\EditPlus 2\editplus.exe" Ó¦¸ÃÓà editPlus = "D:\\Program Files\\EditPlus 2\\editplus.exe" ²»È»Åö¼ûn r t aÖ®À࿪ͷµÄÓÐÎÊÌâ¡£ On 5/18/07, Tian <askfor在gmail.com> wrote: > > editPlus = "D:\Program Files\EditPlus 2\editplus.exe" > os.execv(editPlus,(editPlus,result[int(offset)][0],"-cursor "+ > str(result[int(offset)][1])+":"+str(result[int(offset)][3]))) > os.spawnvp(os.P_WAIT,editPlus,(editPlus,result[int(offset)][0],"-cursor "+ > str(result[int(offset)][1])+":"+str(result[int(offset)][3]))) > > ÎÒÒÔÇ°ÕâÑùдµÄ ÄÜ´ò¿ª > > > On 5/18/07, Í·Ì«ÔÎ <torrycn在gmail.com> wrote: > > > Èç¹ûÃüÁî±¾ÉíÓпոñ,»¹ÒªÔÙ¼Ó²ÎÊý,¾Í¶àǶÌ×Ò»²ãÒýºÅ,ÀýÈçÕâÑù: > > > > >>> cmd='\"\"D:\\Program Files\\Microsoft > > Office\\OFFICE11\\winword.exe\" \"d:\\11.doc\"\"' > > >>> os.popen(cmd) > > > > > > ÔÚ07-5-18£¬Í·Ì«ÔÎ <torrycn在gmail.com> дµÀ£º > > > > > > >>> import os > > > >>> os.popen('\"notpad.exe d:\\11.txt\"') > > > > > > ÔÚ07-5-17£¬ÀîÅô < jeffskylee在163.com > дµÀ£º > > > > > > > > ´ó¼ÒºÃ: > > > > > > > > command = '"D:\Program Files\UltraEdit-32\Uedit32.exe" > > > > "D:\1.xml"' > > > > os.popen(command) -- ÔËÐÐû·´Ó¦ > > > > os.execv( 'D:\Program > > > > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- > > > > os.execvp( 'D:\Program > > > > Files\UltraEdit-32\Uedit32.exe',['D:\1.xml']) --- ´ò¿ªÁËuedit32£¬ > > > > µ«ÊÇÈ¥ÔÚµ±Ç°µÄ¹¤³ÌĿ¼ÖÐн¨ÁËÒ»¸ö1.xmlÎļþ > > > > os.system(command) -- 'D:\Program' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > > > > subprocess.Popen(command, shell=True) -- 'D:\Program' > > > > ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò»òÅú´¦ÀíÎļþ¡£ > > > > > > > > ΪʲôûÓÐÒ»¸ö¿ÉÒÔÕý³£ÔËÐеİ¡ > > > > > > > > Ö > > > > Àñ£¡ > > > > > > > > > > > > ÀîÅô > > > > jeffskylee在163.com > > > > 2007-05-17 > > > > _______________________________________________ > > > > python-chinese > > > > Post: send python-chinese在lists.python.cn > > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070518/917b93f4/attachment-0001.html
Zeuux © 2025
京ICP备05028076号