#python - Sun 18 Feb 2007 between 15:41 and 15:53

NY Lost Funds



Greatrede.g "C:\\images\\myimage.jpg"
kapaceo
kk
marienzor make use of __file__, which is the path to the current module.
rediror open(r'C:\path\to
\jpeg...
kapaceya
redirif I could type...
kapacelets see if it wokrs..
w00t
thanks lots
Greatredhurrah \o/
kapaceso how do sys.stdout differ than print?
Greatredit doesn't put "\n" on the end
kapaceah
Greatred(which might upset the thing reading the image data)
(and the http headers, come to that)
kapacesince jpeg are binary data
ya..
Greatredhopefully sys.stdout was opened in binary mode, anyway
kapacek
as for random selection:
str(random.randrange(1,4))+".jpg"
but it won't go to 4... is that right?
bzedi assume you want ints?
use random.randint(1,4), it'll include the 4
randrange does NOT include the endpoint
marienzit's just like range.
bzed(random.randrange(1,5)
kapaceah
yes..
but i need str..
bzedwell, put the str() around it
kapaceya.
uh-oh..
http://24.81.254.112/python/test2.py
corrupted jpeg :(
Peperre.sub("(?<!^#badline.*.)foo(?!-[a-zA-Z])","xxx","dupa foo-bar foo-2ra foo-2car") doesn't work
kapacerefresh it a few tims..
Peperas look-behind needs a fixed-width pattern

Page: 2 9 16 23 30 37 

IrcArchive

NY Lost Funds