Changes

Jump to navigation Jump to search
493 bytes added ,  16:48, 2 February 2021
no edit summary
Line 104: Line 104:  
PyCharm is installed on our labcomputers. In the lowerright corner, it will display its current Python environment. By clicking on that name, you can change the interpreter and choose from the existing virtualenvs that PyCharm knows. Or you can add your own virtualenv. <br><br>
 
PyCharm is installed on our labcomputers. In the lowerright corner, it will display its current Python environment. By clicking on that name, you can change the interpreter and choose from the existing virtualenvs that PyCharm knows. Or you can add your own virtualenv. <br><br>
 
[[File:PycharmInterpreters.png|thumb|PycharmInterpreters]]
 
[[File:PycharmInterpreters.png|thumb|PycharmInterpreters]]
 +
 +
== 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>
 +
'''workon <virtualenv>'''<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'.

Navigation menu