System calls over network

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Tue Jan 13 19:45:18 CET 2004


Gabriel Leblanc:
>I am wondering if there's an easy way to do a system call to a file
>that resides on the network.  Say for example I would like to call the
>batch file which is located at
>
>\\ComputerName\file.bat
>
>I tried :
>
>>>> import os
>>>> os.popen("\\ComputerName\file.bat")

System calls, batch files, UNC paths and pipes are different things. What
exactly are you trying to acomplish? And on what platform?

Also, you should use raw strings to prevent the double backslash from
being escaped to a single backslash:

    r"\\ComputerName\file.bat"

-- 
René Pijlman



More information about the Python-list mailing list