Welcome To Snipplr
Everyone's Recent Snippets Tagged python
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
// 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 
        
        
            1094 
        
                    posted 15 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 
        
        
            1526 
        
                    posted 15 years ago by magicrebirth
            Simple example of using Google's API for contacts to display the contact name and phone number.  More info in the comments.
        
        
        
            0 
        
        
            1036 
        
                    posted 15 years ago by PhilK
            The Number objects value determines how often the supplied function is repeated. 
Inspired by ROR & Python.
"Pollutes" Number's prototype.
        
        
        
            0 
        
        
            1155 
        
                    posted 16 years ago by peta
            method 'E' (in fact a decorator) catch the execption and return it, so it's possible to use the good old assert statement.
        
        
        
            0 
        
        
            1045 
        
                    posted 16 years ago by manatlan
            
