Difference between revisions of "Python Resources"

From Simson Garfinkel
Jump to navigationJump to search
m
Line 104: Line 104:
If you want to write a Python program with a GUI that can be run on any system, you'll need to use  Tkinter (Python's Tcl/Tk bindings). If you want to actually enjoy what you are writing, you want to use PyQT5..
If you want to write a Python program with a GUI that can be run on any system, you'll need to use  Tkinter (Python's Tcl/Tk bindings). If you want to actually enjoy what you are writing, you want to use PyQT5..


===Advanced Python===
=Advanced Python=
* [https://www.amazon.com/Fluent-Python-Concise-Effective-Programming/dp/1491946008 Fluent Python: Clear, Concise, and Effective Programming] (you can get it on Safari)
* [https://www.amazon.com/Fluent-Python-Concise-Effective-Programming/dp/1491946008 Fluent Python: Clear, Concise, and Effective Programming] (you can get it on Safari)
* [https://www.amazon.com/Test-Driven-Development-Python-Selenium-JavaScript/dp/1491958707/ref=pd_sim_14_6/132-3407075-1922137?_encoding=UTF8 Test Driven Development with Python]
[[Category:Resources]]
[[Category:Resources]]

Revision as of 20:13, 28 April 2019

Learning Python

I've reviewed these resources and highly recommend them.

If you have never programmed with Python before, you may want to start with DataCamp's Learn python by example:

If you want to just read, I recommend starting with the Python Tutorial:

If you have not programmed before, you may try:

If you have programmed before, at this point I recommend:

Using Python

Recommended packages and tools for different tasks

Developer Tools

  • PyCharm
  • Jupyter Notebook

Numerical Data Processing

  • numpy - numeric analysis in python (needed for matplotlib)
  • pandas or SparkSQL
  • tabulate - create tables easily (but see my tytable replacement)

Date Data

String Formatting

Image Manipulation

  • Use Pillow, the Python2/3 fork of Python Image Library (PIL).

Fun examples:

Text Processing

See Text processing notes.

Graphing

Easy Graphics

Games

Python GUI Options

I need to write some programs that use GUI.

  • pyqt - Use PyQT5 (it's part of Anaconda)
  • FLTK, the Fast Light Toolkit

Building Web Applications

You basically have two options:

  • Write a CGI script (slow, but easy)
  • Some sort of Web Server Gateway Interface (WSGI). Options include:
    • Flask (can run on Apache with Passenger, but needs its own domain name)
    • CherryPy

Examples and resources:

Notes on flask:

   $ touch tmp/restart.txt         # reload your program

Using Passengers on Dreamhost:

Python Installation

If you are using a Mac, you almost certainly want to ditch Apple's python implementation and instead install your own.

I now recommend the Anaconda Python distribution, because it has almost everything that you need, and it's easy to add new modules.

If you want to write a Python program with a GUI that can be run on any system, you'll need to use Tkinter (Python's Tcl/Tk bindings). If you want to actually enjoy what you are writing, you want to use PyQT5..

Advanced Python