Welcome To Snipplr


Everyone's Recent Python Snippets



1 2 3 4 5 6 7 ... 18
This context manager restores the value of the current working directory (cwd) after the enclosed code block completes or raises an exception. If a directory name is supplied to the context manager then the cwd is changed prior to running the code b...
0 1340 posted 14 years ago by ches
0 1088 posted 14 years ago by kidrock
Created to have a LEO editor file upload itself to dropbox. Just replace your dropbox email in the script. The script will ask you the name of the file without the extension, then will ask for your password and finally it uploads the file.
0 1068 posted 14 years ago by eristoddle
use flatten to reduce a given list to non-list elements. All elements that are no list will be kept and the lists will be expanded...
0 1132 posted 14 years ago by abstraktor
Create smaller tiles out of a larger bitmap image
0 2335 posted 14 years ago by miohtama
0 1029 posted 14 years ago by eristoddle
0 1476 posted 14 years ago by eristoddle
0 1208 posted 14 years ago by themoosemind
Sometimes (ex. django templates section at setting.py), a function expects an absolute path, but it's more practical when developing to refer it to the current file position in our code base. The rel function does exactly that.
0 3205 posted 14 years ago by jarnaldich
0 1014 posted 14 years ago by alejandrombernardis
A very simple HTTP Server written in Python out of boredom. USAGE : 1 . Create a htdocs folder in the directory of this script 2 . create an index.html file and you are good to go. This works with multiple pages however index.html is...
0 1335 posted 14 years ago by Affix
0 1581 posted 14 years ago by magicrebirth
0 1489 posted 14 years ago by magicrebirth
0 1246 posted 14 years ago by silviud
I only did some improvements over another snippet.
0 1324 posted 14 years ago by alvarohurtado84
0 872 posted 14 years ago by kylewu
1 1131 posted 14 years ago by kylewu
0 2440 posted 14 years ago by mrAlexGray
See: http://docs.python.org/library/smtpd.html You might use other port instead 25.
0 2371 posted 14 years ago by wnasich
0 1506 posted 14 years ago by magicrebirth
Hi Guys, I had a job to remove all kinds of comments from the Lua file. I tried to find a usable Python script to this on the net, but Google did not help. Therefore, I made one. This script recognizes all types of comments such as single and mul...
0 2247 posted 14 years ago by Woodoo
A simple Ajax database app built with the Karrigell web framework for Python; PyDbLite, a non-SQL Python database engine; and JQuery in the browser
0 1051 posted 14 years ago by jcastell
1 2 3 4 5 6 7 ... 18