Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #4K
~431 People Reached
Favorite Forums
Favorite Tags

4 Posted Topics

Member Avatar for bachmabt

I believe this is due to the way Python handles variables. When you append an element, you are effectively appending a reference, in this case a reference to an array. Each time you run the loop, you empty the array. When you write del temp [:] you are telling Python …

Member Avatar for bachmabt
0
146
Member Avatar for charper

(More about exceptions here: [url]http://docs.python.org/tut/node10.html[/url]) Does this do what you want: [code=python] def catchException(): try: f[6] except Exception, inst: print inst else: print "No exception raised." [/code]

Member Avatar for charper
0
72
Member Avatar for gwarguy

For a given string s, [icode]s.lower()[/icode] will return the same string entirely in lower case. So, rather than [code=python] if sex == "M": [/code] you could use [code=python] if sex.lower() == "m": [/code]

Member Avatar for linux
0
157
Member Avatar for Mike W

I'm currently writing a set of small scripts for a web page. I've retrieved the GET variables using cgi.parse_qs and the query string, but can't figure out how to access the POST variables. I know you can use FieldStorage to access both GET and POST variables, but would like to …

0
56

The End.