Changes

Jump to navigation Jump to search
5 bytes added ,  10:45, 2 March 2021
no edit summary
Line 116: Line 116:  
== Batch files ==  
 
== Batch files ==  
 
If you are working from a virtualenv, other than the default, and you don't want to open a command window, type '''workon <virtualenv>''' and type '''python <myscript.py>''' every time, you might want to make a batch file. Create a text file, type:<br>
 
If you are working from a virtualenv, other than the default, and you don't want to open a command window, type '''workon <virtualenv>''' and type '''python <myscript.py>''' every time, you might want to make a batch file. Create a text file, type:<br>
'''workon <virtualenv>'''<br>
+
'''call workon <virtualenv>'''<br>
 
'''python <myscript.py>'''<br><br>
 
'''python <myscript.py>'''<br><br>
 
Save the file into the folder where your script is, but change the extension from ''.txt'' to ''.bat'', for example, save the file as ''startmyscript.bat''.
 
Save the file into the folder where your script is, but change the extension from ''.txt'' to ''.bat'', for example, save the file as ''startmyscript.bat''.

Navigation menu