Difference between revisions of "Python Resources"

From Simson Garfinkel
Jump to navigationJump to search
m
Line 1: Line 1:
==Numerical Analysis==
==For Learning Python==
I've seen these and highly recommend them:
* Start with the [https://docs.python.org/3/ Official Python Documentation], including the tutorial
* [http://video.google.com/videoplay?docid=7760178035196894549 Advanced Python or Understanding Python], Thomas Wouters, Google Tech Talks, February 21, 2007
* [http://diveintopython3.org/ Dive Into Python 3] (book)
 
 
 
==Data Representation==
===Numerical Datas===
* numpy - numeric analysis in python (needed for matplotlib)
* numpy - numeric analysis in python (needed for matplotlib)
* tabulate - create tables easily
* tabulate - create tables easily
* jupyter notebook
* jupyter notebook
===Date Data===
* [http://labix.org/python-dateutil dateutil]
* [http://codespeak.net/icalendar/ iCalendar] package for Python


==Graphing, Graphics and Games==
==Graphing, Graphics and Games==
===Graphing===
===Graphing===
* [http://matplotlib.org/ matplotlib] - a handy system for plotting in python.
* [http://matplotlib.org/ matplotlib] - a handy system for plotting in python. ([[Short example of using matplotlib within jupyter]])
** [[Short example of using matplotlib within jupyter]]
* geopy - geocoding
* geopy - geocoding
* [http://labix.org/python-dateutil dateutil]
* [http://pyx.sourceforge.net/ PyX] - A Python PS and PDF graphing package
* [http://pyx.sourceforge.net/ PyX] - A Python PS and PDF graphing package
* [http://www.pygame.org/ pygame] - a Python game development system
* [http://codespeak.net/icalendar/ iCalendar] package for Python
* [http://peak.telecommunity.com/DevCenter/EasyInstall PEAK Easy Install]


===Python Graphics (mostly with graphics.py)===
===Easy Graphics===
* http://mcsp.wartburg.edu/zelle/python/graphics.py
* Graphics.py: http://mcsp.wartburg.edu/zelle/python/graphics.py http://mcsp.wartburg.edu/zelle/python/ http://mcsp.wartburg.edu/zelle/python/graphics/graphics.pdf
* http://mcsp.wartburg.edu/zelle/python/
* HTML graphics: http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/graphics.html
* http://mcsp.wartburg.edu/zelle/python/graphics/graphics.pdf
* http://cpsc110.umwblogs.org/installing-python-graphics-library/
* http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/graphics.html#
Alternative:
* http://plotdevice.io/
* http://plotdevice.io/
* http://www.cc.gatech.edu/classes/AY2013/cs1301_summer/presentations/calico_graphics.pdf
* http://www.cc.gatech.edu/classes/AY2013/cs1301_summer/presentations/calico_graphics.pdf
[[Category:Resources]]
 
===Games===
* http://www.pygame.org/ pygame - a Python game development system
* [http://peak.telecommunity.com/DevCenter/EasyInstall PEAK Easy Install]
* [http://www.crystalspace3d.org/ Crystal Space 3D]
* [http://www.vpython.org/ VPython 3D Programming in Python]


===Image Manipulation===
===Image Manipulation===
Use Pillow, the Python2/3 fork of Python Image Library (PIL)
* Use Pillow, the Python2/3 fork of Python Image Library (PIL)
 
On Mac, install with:
 
    % sudo port install py27-Pillow py33-Pillow


Links:
Fun examples:
* http://jeremykun.com/2012/01/01/random-psychedelic-art/
* http://jeremykun.com/2012/01/01/random-psychedelic-art/
* http://pythonvision.org/basic-tutorial
* http://pythonvision.org/basic-tutorial
* http://stackoverflow.com/questions/138250/read-the-rgb-value-of-a-given-pixel-in-python-programatically
* http://stackoverflow.com/questions/138250/read-the-rgb-value-of-a-given-pixel-in-python-programatically


===Games===
===Python GUI Options===
* [http://www.crystalspace3d.org/ Crystal Space 3D]
* [http://www.vpython.org/ VPython] - 3D Programming in Python
 
==Python GUI Options==
I need to write some programs that use GUI.  
I need to write some programs that use GUI.  


* tkinter - built in
* tkinter - built in, but not recommended
* pyqt
* pyqt - Use PyQT5 (it's part of Anaconda)
* wxwidgets
* wxwidgets - It's okay, but use PyQT5
* [http://en.wikibooks.org/wiki/Python_Programming/GUI_Programming wikibooks] has a page on Python Program/GUI Programming options
* [http://en.wikibooks.org/wiki/Python_Programming/GUI_Programming wikibooks] has a page on Python Program/GUI Programming options
* Uses [http://www.fltk.org/ FLTK], the Fast Light Toolkit
* [http://www.fltk.org/ FLTK], the Fast Light Toolkit


===Resources for  Tkinter===
===Resources for  Tkinter===
Line 61: Line 62:
* [http://docs.python.org/library/tkinter.html Python 2.7 Tkinter Doc]
* [http://docs.python.org/library/tkinter.html Python 2.7 Tkinter Doc]
* [http://www.pythonware.com/library/tkinter/introduction/ Original 'An introduced to Tkinter'] by Fredrik Lundh
* [http://www.pythonware.com/library/tkinter/introduction/ Original 'An introduced to Tkinter'] by Fredrik Lundh
==Python Training==
I've seen these and highly recommend them:
* [http://video.google.com/videoplay?docid=7760178035196894549 Advanced Python or Understanding Python], Thomas Wouters, Google Tech Talks, February 21, 2007.
===Printed Materials===
* [http://diveintopython3.org/ Dive Into Python 3] (book)


==Building Web Applications==
==Building Web Applications==
You basically have two options:
You basically have two options:
* cgi module (slow)
* Write a CGI script (slow, but easy)
* Some sort of [https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface Web Server Gateway Interface] (WSGI)
* Some sort of [https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface Web Server Gateway Interface] (WSGI)
 
* See also https://wiki.python.org/moin/WebFrameworks
WSGI options:
* Flask (can run on Apache with Passenger, but needs its own domain name)


Examples and resources:
Examples and resources:
Line 82: Line 74:
* https://www.byteconsole.com/get-flask-up-and-running-on-a-dreamhost-server-with-passenger/
* https://www.byteconsole.com/get-flask-up-and-running-on-a-dreamhost-server-with-passenger/


Dreamhost help:
===WSGI options===
* Flask (can run on Apache with Passenger, but needs its own domain name)
* CherryPy
 
===Notes on Flask===
    $ touch tmp/restart.txt        # reload your program
 
===Using Passengers on Dreamhost===
* https://help.dreamhost.com/hc/en-us/articles/215769578-Passenger-overview
* https://help.dreamhost.com/hc/en-us/articles/215769578-Passenger-overview
* https://help.dreamhost.com/hc/en-us/articles/216137717-Python-overview
* https://help.dreamhost.com/hc/en-us/articles/216137717-Python-overview
Line 89: Line 88:
* https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-virtualenv-and-custom-modules-in-Python
* https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-virtualenv-and-custom-modules-in-Python
* https://help.dreamhost.com/hc/en-us/articles/115000221112-Using-pip-to-install-Python-modules
* https://help.dreamhost.com/hc/en-us/articles/115000221112-Using-pip-to-install-Python-modules
See Also:
* https://wiki.python.org/moin/WebFrameworks
===Notes on Flask===
    $ touch tmp/restart.txt        # reload your program


==Python Installation==
==Python Installation==
Line 105: Line 97:
On the Mac, you can install matplotlib with this command using MacPorts::
On the Mac, you can install matplotlib with this command using MacPorts::
   % sudo port install py-matplotlib py-ipython
   % sudo port install py-matplotlib py-ipython
[[Category:Resources]]

Revision as of 06:54, 10 November 2017

For Learning Python

I've seen these and highly recommend them:


Data Representation

Numerical Datas

  • numpy - numeric analysis in python (needed for matplotlib)
  • tabulate - create tables easily
  • jupyter notebook

Date Data

Graphing, Graphics and Games

Graphing

Easy Graphics

Games

Image Manipulation

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

Fun examples:

Python GUI Options

I need to write some programs that use GUI.

  • tkinter - built in, but not recommended
  • pyqt - Use PyQT5 (it's part of Anaconda)
  • wxwidgets - It's okay, but use PyQT5
  • wikibooks has a page on Python Program/GUI Programming options
  • FLTK, the Fast Light Toolkit

Resources for Tkinter

Building Web Applications

You basically have two options:

Examples and resources:

WSGI options

  • Flask (can run on Apache with Passenger, but needs its own domain name)
  • CherryPy

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 from:

If you want everybody to be able to use your GUI, you probably want to write it in Tkinter (Python's Tcl/Tk bindings). If you want to actually enjoy what you are writing, you want to use wxpython.

On the Mac, you can install matplotlib with this command using MacPorts::

 % sudo port install py-matplotlib py-ipython