Python collection

From CMEE4K
Jump to navigation Jump to search

Python icon.png
Think Python PDF file


2019-2020 Course links

Python code

  • Online debug: python -m pdb my_python.py
  • Online check syntax: python -m py_compile my_python.py
  • Virtual Env
    • python -m venv {path}/myenv
    • Linux source {path}/myenv/bin/activate
    • Window {path}\myenv\Scripts\activate
    • deactivate
  • One line: python -c "import sys; print( \"\\n\".join( sys.path ) )"
  • Program
import sys
for p in sys.path: print(p)

Related technologies