problem in executing a file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ciccio@unical.it

    #1

    problem in executing a file



    Dear all,

    I'm using python to manage a web-site. In particular, a user insert specific
    parameters in a form and, then, I recover all parameters and run an executable
    file according to the user parameters. The output is finally showed in a new
    web-page.
    The problem is when I need to run the executable file. I tried with:

    import os
    os.system("file .exe parameters")

    but I received an error like "cmd.exe : permission deneided"

    Probably I don't have the permission to execute the file. However, the server
    administrator said me that he cannot give me the permission, but I can also use
    ed execute files in my folder. so, is there a way to execute a file in my folder
    using python and not the os module?

    Thank you

    Ernesto

    -------------------------------------------------
    This mail sent through IMP: http://horde.org/imp/

  • Neil Hodgson

    #2
    Re: problem in executing a file

    Ernesto:
    import os
    os.system("file .exe parameters")
    >
    but I received an error like "cmd.exe : permission deneided"
    >
    Probably I don't have the permission to execute the file. However, the server
    administrator said me that he cannot give me the permission, but I can also use
    ed execute files in my folder. so, is there a way to execute a file in my folder
    using python and not the os module?
    Try using os.exec* as they shouldn't need an intermediate copy of
    cmd.exe to run your file.

    Neil

    Comment

    Working...