I just started learning Python today and couldn't find a good example online to help me understand os.execve(path, args, env) properly.
How do I use this method (os.execve) to achieve the following task in Python 3.4?
Execute an external command (this command is not some windows command like mkdir, cd... It's a custom command), its location is C:\blah and it takes 5 command line arguments.
Any simpler example of using this command would be much appreciated.
os.execve(path, args, env)properly.". Python has a superb online documentation, if you can find it, you are doing something wrong... Link to os.execve documentationargsbe? What should be theenv? If the documentation bothered to give an example, perhaps I wouldn't be banging the wall with anAttributeError: 'str' object has no attribute 'keys'error right now.os.execv('./myscript.py', ['any_arbitrary_tag', '--my-argument', '--another-argument 42'])Theenvmeans the PATH variable of current environment and can be retrieved byos.environ.get('PATH')