Welcome To Snipplr


Everyone's Recent Snippets Tagged python



Log in to feedage.com Submit an rss feed Print the results
0 824 posted 16 years ago by matthewnovak
0 692 posted 16 years ago by hdanniel
0 596 posted 16 years ago by hdanniel
This is going to run all doctests for all methods in a module. Doctests are a beautiful thing. Note: doctest will only complain if a test fails. If you see on output then all your tests must have passed.
0 628 posted 16 years ago by stoyan
0 582 posted 16 years ago by mcfearsome
I had an icon representing a little blue dot and needed to create 100 copies each with a number in them. Python saves the day yet again.
0 845 posted 16 years ago by stoyan
https://www.chrisjmendez.com/2008/08/09/python-basic-feedparser-example/
1 1039 posted 16 years ago by chrisaiv
0 1013 posted 16 years ago by tkf
The script was modified slightly based on comments.
0 938 posted 16 years ago by sudarkoff
Some macros are from the "Python Scripting for Computational Science" : http://folk.uio.no/hpl/scripting/
0 2010 posted 16 years ago by tkf
0 1971 posted 16 years ago by denilw
inspired by http://snipplr.com/view/6594/post-to-twitter-from-the-shell/ . I just rewrote it in Python because I didn't want to install a Ruby interpreter :) use `chmod +x tweet.py` to run it as `./tweet.py` instead of `python tweet.py`
1 1049 posted 16 years ago by nate_smith
Python make url address to Tinyurl in article content like Twitter message
1 1038 posted 16 years ago by huacnlee
This script downloads all mp3 links from given rss/atom feeds. I wrote this to learn python so I'm sure there are better ways to do this. Depends on wget.
1 867 posted 16 years ago by panquetofobia
1 680 posted 16 years ago by vasilije
Useful when creating canonical forms of strings for indexing.
0 814 posted 16 years ago by scarfboy
Effbot's page on the os module: http://effbot.org/librarybook/os.htm The os module has lots of methods for dealing with files and directories: http://docs.python.org/lib/os-file-dir.html The shutil module: http://docs.python.org/lib/module-shut...
0 1237 posted 16 years ago by chombee
0 795 posted 16 years ago by chombee
Python: Private Variables http://docs.python.org/tut/node11.html#SECTION0011600000000000000000 Any identifier of the form __spam (at least two leading underscores, at most one trailing underscore) is textually replaced with _classname__spam, wher...
0 851 posted 16 years ago by ishikawa
Test-first programming, in which you write the unit tests first with the unittest module and then work on the code until it passes all the tests, seems like a good substitute for writing interfaces or documentation first. The unit tests are like an A...
0 843 posted 16 years ago by chombee
This is my implementation of the messager pattern used by Panda3D for event handling. It's a really nice idea but I think Panda's version is implemented weirdly, it uses the subscribe objects as keys in the dictionary. That means that if you want...
0 637 posted 16 years ago by chombee
You
5 1088 posted 16 years ago by abhiomkar