[python-win32] os.popen/winpipe

Jens B. Jorgensen jens.jorgensen at tallan.com
Thu Nov 18 16:50:58 CET 2004


Jürgen Kareta wrote:

>Hello,
>
>[code 3]
>import win32pipe
>f = win32pipe.popen('net use lpt2: \\server\printer') ##or 'net use ?'
>print f.read()
>f.close()
>  
>
perhaps:

f = win32pipe.popen('net use lpt2: \\\\server\\printer') ##or 'net use ?'

Don't forget that \ is an escape character. 

>empty result string
>
>If I send the 'dir' command with or without parameters I get a result string,
>same as 'net use' command without parameters, but 'net use' with parameters fire
>allways a empty resutlt string. Any hints ?
>
>Thanks in advance!
>regards,
>Jürgen
>_______________________________________________
>Python-win32 mailing list
>Python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32
>  
>


-- 
Jens B. Jorgensen
jens.jorgensen at tallan.com

"With a focused commitment to our clients and our people, we deliver value through customized technology solutions"  



More information about the Python-win32 mailing list