Python Help
Python Help
Python Help
Torres-Torriti
Department of Electrical Engineering
Pontificia Universidad Católica de Chile
Contents
1. First: Install WinPython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2. Second: Install Useful Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Third: Running Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4. Fourth: Tips & Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Register WinPython so that Windows becomes aware of Python using the WinPython Control Panel.exe
in C:\WinPython35.
R
https://www.python.org/downloads/
2016.07.01 1
Quick Python Help - Prof. M. Torres-Torriti
Department of Electrical Engineering
Pontificia Universidad Católica de Chile Quick Python Help
2. From the WinPython Control Panel, select Install/Upgrade Pacakges, then Add Packages. Once the
packages have been read, proceed with the install.
Run Python code from a command window (e.g. PowerShell with administrator privleges) by typing either:
program_name.py
python program_name.py
or run Spyder and load the script and then run them using the interface buttons.
Some examples included in the WinPython installation can be executed with the following steps:
1. Start Menu/All Programs/WinPython/Jupyter Notebook. This will launch a Jupyter interface in your
default web browser.
2. Select ”docs” in Jupyter, and then select ”Begginer’s FAQ.ipynb” (the iPython Notebook file).
3. Select ”QT libraries Example”, and press play three times until # PyQtgraph (Scientific Graphics and
GUI Library for Python) import pyqtgraph.examples; pyqtgraph.examples.run()
4. The previous step should start a Window with pyqtgraph examples. Select any example, e.g. ”Basic
Plotting”, ”Demos/Optics”, or ”Demos/Verlet chain” and then ”Run Example” to visualize the results.
Matplotlib examples —
http://matplotlib.org/examples/index.html
2016.07.01 2
Quick Python Help - Prof. M. Torres-Torriti
Department of Electrical Engineering
Pontificia Universidad Católica de Chile Quick Python Help
Pygame Tutorials
Check your installation directories:
C:\WinPython\python-3.5.1.amd64\Lib\site-packages\pygame\docs\tut
ODE Integration
Google: matlab ode45 python
http://sys-bio.org/wp-content/uploads/2015/01/introMatlabPythonODEs.pdf
http://modelling3e4.connectmv.com/wiki/Software_tutorial/Integration_of_ODEs
Time Measurement
Google: tic toc equivalent python
http://stackoverflow.com/questions/5849800/tic-toc-functions-analog-in-python
https://docs.python.org/3.5/library/time.html?highlight=time#time.process_time
Python Documentation
https://docs.python.org/3.5/
https://docs.python.org/3.5/library/index.html
2016.07.01 3