#python - Tue 13 Mar 2007 between 00:26 and 01:55

NY Lost Funds



vafadais there a way to detect if a CD was inserted/ejected using python?
ironfroggyhmm.. maybe pygame has something?
vafadaok thanks.. ill check it out
ehci am trying to use mod_rewrite to make blog.binarymanipulations.com access the webpage at binarymanipulations.com/blog but not change the url. I have http://deadbeefbabe.org/paste/3967 and it's not working
Jerubthat's an apache problem
#apache
ehcsorry i meant to post it there actully, :)
RiotGeekDunno if mod_python questions go here or in #apache, but here goes: I've got my app reading in psp files by doing "t = psp.PSP(req,fn); t.run(vars)" and it's working... except that the html in the psp file isn't being interpreted. All the tags show up as plain text. I'm sure I'm missing something simple... like do I have to explicitly sent content-type at some point? Any help would be appreciated.
TFKyleRiotGeek: I've never used mod_py's psp stuff before, but yeah with normal handlers you have to set the content-type normally
RiotGeekHmm.. how does one do that with mod_py? In cgi I would just use a print statement, but that doesn't seem to do it.
TFKyleRiotGeek: req.content_type = "whatever"
RiotGeekTFKyle: Thanks a ton. That worked!
jsheedyI am new at python, is there something wrong with this if statement that I am missing? *if stupid == 'y':
ivan`an indented block after it
Leedsno, nothing wrong with that line
jsheedyhmm, how may lines can you paste here?
piedoggiequestion on logging technique: I've got a program with logging statements scattered all over. I want to be able to promote visibility of certain log statements at different times and submerge others. I would love it if I could make logging statement visibility based on the method in addition to a level specification. Any ideas?
jsheedy3 ok?
piedoggie3 is fine
jsheedystupid = raw_input('Would you like to play the game ')
if stupid == 'y':
print'Sorry '
Leedsjsheedy: what's your indentation really like?
koshjsheedy: print stupid and tell us what python says the value is
jsheedyLeeds: one tab for first if, then two tabs for second print
piedoggieeliminate one level of indentation
Leedsright, too much indentation
koshyou only indent a line if the last line ended with a :
jsheedyyep, that got it thanks
I guess it is pretty obvious that I am new, well thx for the help!
piedoggiejsheedy: don't worry, as you learn more your definition of "newbie" question will only get more complicated. :-)
jsheedylol
Leedsjsheedy: that, on the other hand, is against the rules
jsheedyI guess so
piedoggieNow if they could just break me from using smiley faces, the world would be safer for humanity
is there any easy way for a method to know it's calling method name and class?
actionkosh breaks piedoggie's fingures to break him of that habit
koshbreaks piedoggie's fingures to break him of that habit
piedoggie: there is no good way to find out that information
piedoggieToo late, my hands and fingers already broken...
koshpiedoggie: that kind of code is also a design problem since what the method does not only depends on the args passed in but on some nebulous other stuff

Page: 2 9 16 23 30 37 44 51 58 65 72 

IrcArchive

NY Lost Funds