This page contains a bunch of miscellaneous Python code snippets, recipes, mini-guides, links, examples, tutorials and ideas, ranging from very (very) basic things to advanced. I hope they will be usefull to you. All snippets are kept in a single HTML page so that you can easily ❶save it for offline reading (and keep on a USB key) ❷search in it. Note that scripts that do some web-scraping may not work anymore due to website changes. The web is an evolving beast :-)
(Don't forget to read my main Python page ( http://sebsauvage.net/python/ ): there is handful of other programs and a guides.)
(Don't forget to read my main Python page ( http://sebsauvage.net/python/ ): there is handful of other programs and a guides.)
Send a file using FTP
Queues (FIFO) and stacks (LIFO)
A function which returns several values
Exchanging the content of 2 variables
Getting rid of duplicate items in a list
Get all links in a web page (1)
Get all links in a web page (2)
Get all links in a web page (3)
Get all links in a web page (4)
Zipping/unzipping files
Listing the content of a directory
A webserver in 3 lines of code
Creating and raising your own exceptions
Scripting Microsoft SQL Server with Python
Accessing a database with ODBC
Accessing a database with ADO
CGI under Windows with TinyWeb
Creating .exe files from Python programs
Reading Windows registry
Measuring the performance of Python programs
Speed up your Python programs
Regular expressions are sometimes overkill
Executing another Python program
Bayesian filtering
Tkinter and cx_Freeze
a few Tkinter tips
Tkinter file dialogs
Queues (FIFO) and stacks (LIFO)
A function which returns several values
Exchanging the content of 2 variables
Getting rid of duplicate items in a list
Get all links in a web page (1)
Get all links in a web page (2)
Get all links in a web page (3)
Get all links in a web page (4)
Zipping/unzipping files
Listing the content of a directory
A webserver in 3 lines of code
Creating and raising your own exceptions
Scripting Microsoft SQL Server with Python
Accessing a database with ODBC
Accessing a database with ADO
CGI under Windows with TinyWeb
Creating .exe files from Python programs
Reading Windows registry
Measuring the performance of Python programs
Speed up your Python programs
Regular expressions are sometimes overkill
Executing another Python program
Bayesian filtering
Tkinter and cx_Freeze
a few Tkinter tips
Tkinter file dialogs
(more...) Read more: Snyppets - Python snippets
0 comments:
Post a Comment