Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #17.3K
Ranked #2K
~17.2K People Reached
Favorite Forums
Favorite Tags

10 Posted Topics

Member Avatar for SoulMazer

there are ways to find the directory of the script, but if you are in the directory already and start the script then "open" should automatically look there anyway. Are you sure that's the name of the file and the upper and lower case match? Or if you're on windows …

Member Avatar for SoulMazer
0
154
Member Avatar for xsxcn
Member Avatar for comfixit

[code=python] for row in rows[1:]: print filter(len, row[1:6])[/code] [icode]rows[1:][/icode] skips row 0. The [icode]filter[/icode] looks at items 1 to 5 and filters out items with 0 length. It does the same thing as [icode][f for f in row[1:6] if f][/icode] but it's much nicer to read... output: ['N400'] ['N401', 'N402'] …

Member Avatar for targ
0
285
Member Avatar for funkyfresh

[QUOTE=funkyfresh;859167]When I started with PHP, it was as simple as <?php print "Hello world"; ?>[/QUOTE] [code] import cgi print "Content-Type: text/html" print print "Hello world" [/code][url]http://docs.python.org/library/cgi.html[/url] [quote=funkfresh;859167]So my impression so far with Python on the web is that you need to use a pre-built framework in order to actually utilize …

Member Avatar for jlm699
0
139
Member Avatar for eyewirejets

This post is sort of confusing, can you show an example? And what do you plan on doing with the list?

Member Avatar for targ
0
93
Member Avatar for lorayyne

[QUOTE=lorayyne;855450]Clarification: I can run the function itself successfully, but cannot import the coinflip function into a script and have it work-- it tells me 'random is not defined.[/QUOTE] what if you just do: test1.py [code] import random print random [/code] test2.py [code] import test1 [/code]

Member Avatar for targ
0
213
Member Avatar for blair.mayston

[quote]Read on one site that using readlines() would make a txt.file a list, which would allow the use of rstrip(), but that doesn't seem to work for me either.[/quote] If you have a file object you can do readlines() to get a list in which item 0 is the first …

Member Avatar for targ
0
186
Member Avatar for gotm

[QUOTE=gotm;852370]Oh, and apparently my blocked function is not recursive? I thought it was, but it needs to be, so any help I'll take :) If not though that's fine too.[/QUOTE] You have a [i]return[/i] before the call to [i]blocked[/i]. A function always exits immediately when it reaches a return, skipping …

Member Avatar for targ
0
145
Member Avatar for blair.mayston

[code] print>>f, '<a href="%s">%s</a> (%s)''' % (link.encode('UTF8', 'replace'), title.encode('UTF8','replace'), description.encode('UTF8','replace')) [/code]

Member Avatar for blair.mayston
0
16K
Member Avatar for daviddoria

[QUOTE=daviddoria;848258]perl/python/bash/etc[/QUOTE] of these, I don't think there's any reason not to always choose python, unless you want to save space by not installing it or give scripts to people who don't have it.

Member Avatar for leegeorg07
0
136

The End.