Welcome To Snipplr


Everyone's Recent Snippets Tagged python



1 ... 5 6 7 8 9 ... 14
0 518 posted 14 years ago by magicrebirth
0 511 posted 14 years ago by magicrebirth
0 535 posted 14 years ago by magicrebirth
0 578 posted 14 years ago by magicrebirth
0 609 posted 14 years ago by magicrebirth
create a dictionary from the data in two lists
0 720 posted 14 years ago by magicrebirth
// Is there a way in python to convert a list say [1,2,3,4] to a string and // also how to convert a string to a list? // use str() or repr() to convert to a string. // eval() will convert back to a list.
0 503 posted 14 years ago by magicrebirth
0 456 posted 14 years ago by magicrebirth
First: create a file under djangoapp/templatetags where you define your tags [e.g.: myadmin_tags.py]: Second: create the html snippets that get loaded in those tags [e.g., personfactoid_info.html]: Third: in mytemplates/admin/ modify change_for...
1 924 posted 14 years ago by magicrebirth
0 482 posted 14 years ago by magicrebirth
0 392 posted 14 years ago by enjoydoingitwrong
0 458 posted 14 years ago by magicrebirth
testing tool: http://www.pythonregex.com/
0 1204 posted 14 years ago by backlashblues
Simple example of using Google's API for contacts to display the contact name and phone number. More info in the comments.
0 507 posted 14 years ago by PhilK
0 508 posted 14 years ago by tclancy
**work in progress**
0 830 posted 14 years ago by manatlan
1 584 posted 14 years ago by laurenceosx
Needs the BeautifulSoup module.
0 316 posted 14 years ago by taec
1 1106 posted 14 years ago by nefd
The Number objects value determines how often the supplied function is repeated. Inspired by ROR & Python. "Pollutes" Number's prototype.
0 594 posted 14 years ago by peta
2 674 posted 14 years ago by vas3k
method 'E' (in fact a decorator) catch the execption and return it, so it's possible to use the good old assert statement.
0 501 posted 14 years ago by manatlan
0 473 posted 14 years ago by manatlan
1 ... 5 6 7 8 9 ... 14