A simple and fast way to check whether something is a string or Unicode object is to use the built-ins isinstance and basestring, as follows
def isString(anObj):
return isinstance(anObj,basestring)
Python tutorials for beginner to advance level programmer including video tutorials.
Video Tutorials
Categorized Tutorials
- Beginners (20)
- Biology, Bioinformatics and BioPython (7)
- Concurrent Programming (2)
- Continuations (3)
- Curses (3)
- Cryptography(2)
- Databases (12)
- Date and Time Usage (1)
- Decorators (6)
- Descriptors (1)
- Django (9)
- Extending and Embedding (8)
- Firedrop (2)
- Flash (3)
- Functional Programming (5)
- Games (7)
- Generators and Iterators (7)
- General and Advanced (14)
- Genetic Algorithms and Python (1)
- GUI Programming: General and Miscellaneous (10)
- GUI Programming: Tkinter (10)
- GUI Programming: wxPython, wxGlade and PythonCard (12)
- GUI Programming: pyGTK and Gnome (16)
- GUI Programming: QT and KDE (6)
- HTML and XML (35)
- IDE’s and Editors (7)
- Internet: Sockets, Network, Email, RSS and Web Programming (16)
- Internet: CGI (5)
- Internet: Web Frameworks- Django (9)
- Internet: Web Frameworks- Turbogears and Cherry Py (7)
- Internet: Web Frameworks-Twisted(4)
- Internet: Web Frameworks- Zope and Plone (5)
- Internet: Web Frameworks-other(4)
- Introspection (1)
- IronPython and .Net (7)
- Jython (12)
- Linguistics and Natural Language Processing (5)
- Mac and Apple (13)
- Math, Science, Physics (38)
- Metaclasses (5)
- Microsoft Windows (14)
- Mobile Devices (2)
- Neural Networks (3)
- OOP, Objects, and Object Orientation (5)
- Design Patterns(6)
- Pickle (1)
- PyPy (1)
- Regular Expressions (4)
- Robotics (3)
- Searching and Sorting (4)
- Simulation (3)
- Stackless Python (5)
- Statistics (1)
- Testing, Test Driven Programming, Unit Testing (5)
- Text and String Processing (4)
- Threads (11)
- Unicode (7)
- VPython (6)
- Search Engines and Social Software (7) Google, Flikr, del.icio.us, etc.
- Web Scraping, Screen Scraping (3)
- Miscellaneous Specific Topics (22) (Including Bluetooth, UML, PyMedia, Sorting, OpenOffice, RDF, ZeroConf, Console, Doxygen, Date and Time, PyPi, and others)
- Documentation and Reference Materials (11)
- Python Zip Compression
- Writing PyGtk Applications in a Visual Way
- Building an Application with PyGTK and Glade one man’s journey learning Python! added June 1, 2006
- a Beginner’s Guide to Using PyGTK and Glade from Linux Journal & listed February 9, 2006
- PyGTK Tutorial from Serpia listed January 1, 2006
- PyGTK Tutorials Several Tutorials-listed September 20, 2005
- GUI-the Pythonic Way! PyGTK, Glade and Python, a new online tutorial-listed May 4, 2005
- PyGTK 2.0 Tutorial new online tutorial-listed July 27, 2004
- Developing Gnome Applications with Python
- RAD with Python and Gnome by Padraig Brady, added Nov. 22, 2004
- GTK+ 2.0 Tree View Tutorial
- PyGnome Tutorial (loads a little slowly)
- Bonobo and Python Tutorial a Tutorial about component based programming for the Gnome desktop environment added December 7, 2004
- Gimp-Python
- RAD with Python and Glade from Linux Journal
- Gnome Applets with Python by Arturo Gonz?lez Ferrer
- How To Use Maemo a PyGtk programming tool a PyGtk programming tool for the Nokia 770 tablet
Python CGI FAQ
- An Introduction to Python for Scientists By Conrad Hinson
- Tentative Num Py Tutorial
- Scripting Techniques for Scientific Computing
- SciPy Course Online by Dave Kuhlman
- Experimental Physics with Phoenix and Python Phoenix is Physics with Homemade Equipments and Innovative Experiments
- SciPy.org Python for Science Tutorials, Links, and Resources
- NetworkX, a Python-based package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks.
- Scripting Techniques for Scientific Computing
- Python for Scientific Use: Data Analysis from Linux Gazette
- Tutorial on NumPy, Numerical Python by David Ascher
- A guide to installing Python packages for scientific computing from Cornell
- MatPlotLib Tutorial from Serpia
- MatPlotLib Tutorial
- Handbook of the Physics Computing Course
- PyODE, the Open Dynamics Engine, an open source physics engine 3 short tutorials, scroll down to bottom of page
- Tutorial on the Numeric Module from Penzilla
- MatPy – Matrix package for Python
- Python for Statistical Programming
- Fourier.py
- Early Math
- R/SPlus
- Gary Strangmans Python Modules
- Mathter
- Pygsl
- QuantLib
- ScientificPython
- PyGiNaC
- Cost Accounting Module
- MatPy – Matrix package for Python
- NURBS – Non Uniform Rational B-Splines
- Python Date Class: NormalDate
- SciPy
- FixedPoint.py
- Functions for complex numbers
- GMPY
- MxDateTime
- Multipack Home Page
- Fraction.py
Weblog and Content Management System
- Firedrop Plug-ins Tutorial Firedrop is a (Programmable with Plug-ins) Python (and Wax) Blog Client Manager Tool and Content Management System
Threads and Concurrent Programming
- Python Threads PDF file, click on “threads” at top of html page
Continuations
- A tutorial on connecting client-side Flash applications to Python XML-RPC web services
- Embedding Flash in Python
- Tutorial: Macromedia Flash served by Python
- Bluetooth Programming with Python
- Python Specific Source Code Mini-Examples for Common Topics
- Cheese Shop Tutorial
- Basic Motion Graphics with Python
- Python and UML
- Python for Fun an Exellent collection of small Python programs for learning
- Python Code Snippets from Serpia
- HowTo: GantPV Scripts with Python
- HowTo: Python Programming in Gnumeric
- Python Imaging Handbook and Tutorial PIL Handbook from PythonWare
- Michael’s Quick Guide to Pyrex
- Building Chandler Parcels an introduction from PyCon2005
- MozPython, Python for Mozilla
- NetworkX Tutorial NetworkX is a Python-based package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks.
- PyMedia Tutorial PyMedia is a module for manipulating wav, mp3, ogg, avi, divx, dvd, cdda and etc. files
- Scripting OpenOffice with Python
- GraphPath is a little-language for analysing graph-structured data, especially RDF
- ZeroConf and Python
- Python Console Examples by Padraig Brady, added Nov. 22, 2004
- Python and Doxygen Doxygen generates documentation from source code
- Algorithm Education Using Python
- Python Package Index Tutorial Tutorial for PyPi
Python Zip Compression
If you dont want to hardcode the Mail Host id into your script and want to be able to send email to someone from within a (Script) Python this script will do it.
try:
mailhost=getattr(context, context.superValues('Mail Host')[0].id)
except:
raise AttributeError, "cant find a Mail Host object"
mMsg = 'a testful email message \n that contains a few line breaks. \n ~runyaga'
mTo = 'runyaga@abc.com'
mFrom = 'runyaga@xyz.com'
mSubj = 'mail subject'
mailhost.send(mMsg, mTo, mFrom, mSubj)
A Simple and effective two line python code for password generator.
A short, readable password generator that can be launched from the command line. Just launch it from the shell and it will print out an 8-character password. You can also specify the length.
string_list = [ch for ch in string.digits if not ch in '10'] + \
[ch for ch in string.ascii_uppercase if not ch in 'LO'] + \
[ch for ch in string.ascii_lowercase if not ch in 'lo']
return string.join(random.sample(string_list,8),'')