Search code examples
pythonwindowscmdexepy2exe

simulate a user cmd command using python


I am trying to create exe files while my program is runing

I am trying to do so by writing .py file with code in python and the use the package py2exe for creating the exe.

my problem is that I want the proceeder will be automaticly (without the user had to open cmd and run the setup file)

manually I know how to do it using py2exe

and if I could send cmd command from code it will be perfect!

any suggestions how to do so?


Solution

  • You could have a .bat file as described here: How can I run a program from a batch file without leaving the console open after the program start?

    Put the commands you want in the bat file, and then run it using python like described here: Executing a subprocess fails