| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Comments:
<0> if bool1 or (bool2 and (string1 == "foo")): print "Hello, World!" <0> else: print "Sayz you" #==> Sayz you <1> Pythy: yeah I'm having trouble reproducing it now :( <1> gimme a minute <2> ok, slightly off topic, anybody ever used del.icio.us's api successfully? <0> take two. <2> cos im trying to implement a bookmark-uploader in python. <3> can anyone point me to some good os.fork examples? <4> well i mailed them now, i know you are eager to hear the reply so i'll keep you updated <5> hello ppl <5> is there a way for setuptools to tag a sdist package with for example SRC? <6> kernoman: google python os.fork <7> kernoman: or grep for os.fork in the stdlib. <8> Why isn't my object getting deleted despite its refcount (supposedly) dropping to zero? <3> thanks, i didnt think running an external program from within python would be so much problems <1> Pythy: well, I dumbed down my example too much it seems ;)
<9> DataBeaver: what is object? <9> is it a string? <8> One of my custom types defined in C <8> It's a temporary object in a function's parameter list and I don't think I'm leaking any references in the C side <1> Pythy: what I was actually doing was using variables returned by optparse, and for some reason when I now do "if bool1 == True or (bool2 == True and string1 == "foo")", that now behaves as I expect <8> When I look at it inside that function, its refcount is one, which I suppose is due to it being in the parameter list. <8> Its destructor never gets called though. <3> drgalaxy: im completely at a loss with this now... i just want to be able to spawn off several instances of wget and once they have all completed continue the program, im using a for loop to iterrate through a list that contains all the urls I want to wget <5> anyone using setuptools here? <6> kernoman: fork () is kind of weird, I admit <3> drgalaxy: slightly, i think my heads going to explode <3> arghhhhhhh splat! <6> kernoman: with fork you can either fork once and have the parent wait on the child, or you can fork twice which will detach the child child completely from the parent <3> so i couldnt spawn more than 2 wgets commands? <6> not quite. for each wget command you have to fork twice before you spawn wget, that way the main program isn't waiting <6> I think I might have some example code <2> ah duh, wrong url, i hate this stuf..... <10> where could i download tkinter? or isn't there a tkinter for 64bit linux? <11> hi all <6> vIkSiT: hello <11> has anyone got ideas about a library which could be used to do sound analysis - pitch, tempo extraction from a given mp3/wav or whatever? <11> hey drgalaxy <12> numpy <11> ignacio, numpy? I thought that was a numerical analysis lib <4> hey all .... is there a term for the use of modules uhm, or rather functions, in a "chained" way? You call a function that has a builtin call to a function that has a builtin call to a function ... etc etc etc <12> What do you think sound analysis is? <11> ah - it has transforms and things <12> Sound analysis is just fancy math. <11> ignacio, numerical analysis - as in, solving ODEs and such <11> I'd forgotten it did fourier transforms <0> http://directory.fsf.org/audio/misc/pymad.html http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/manual/html/index.html http://www.onlamp.com/pub/a/python/2001/01/31/numerically.html http://sourceforge.net/projects/pymedia/ <11> great stuff <11> that LAMP article esp <3> drgalaxy: ? <0> epoch: Try it without the `== True' <6> kernoman: I can't seem to ssh to the box with my example for you <6> look on the python cookbook, I think that is where I figured it out <3> drgalaxy: ok thanks for all your help <6> np <0> kernoman: Don't use `from x import *' <3> why? <3> is it slower? <0> It's suicidal. <3> i'll die? <0> >>> open #==> <type 'file'> <0> >>> from os import * <0> >>> open #==> <built-in function open> <3> OMG <0> (And many other examples.) <3> ok thanks for the heads up <2> vIkSiT: http://www.speech.kth.se/snack/ <0> "kernoman|i'll die?" > The next person who has to read your code may see to that. <11> Bracki, thanks, will check <3> nah nobody will see this its just for me, a quick hack to download my favorite podcasts <0> In which case, that next person will be you. <3> but ill remember the tp when i do anything that other people will use <3> s/tp/tip <0> Kernoman: Even if no one else reads your code, you don't want to do that to yourself. <11> hehe <0> My source is available at http://sourceforge.net/projects/HAL9001 (kidding, kidding.)
<3> once i work out how to fork commands ill be happy with the code, decided to heed what you say and have my program wait for my external command to finish <11> hehehe <0> Kernoman: You really want to try debugging your own code, when you've, say, done an `from os import *' to get at some of os's members, & later do an open(): <0> >>> open('/$.txt') #==> <open file '/$.txt', mode 'r' at 0x00E284A0> # OK here. <0> >>> from os import * <0> >>> open('/$.txt') #==> TypeError: function takes at least 2 arguments (1 given) <0> Kernoman: And there are many such examples. <3> are you sure your not a bot ;) <4> is there a "number one" tutorial that you reccomend for newbies ? <0> ?>humor-module-test@kernoman <4> I like to think that i'm above the hello world treshold, but not much more <0> ?>tutorials@sybariten <9> thinkcspy. <4> merci! <13> http://www.mindview.net/ thinking in python... very good :) <4> ben017f: was that for me ? <13> sybariten, yeah, there's are some good downloadable tutorials on that site :) <13> this is the actual link: http://mindview.net/Books/TIPython <3> Pythy: Can you advise on how to use fork to spawn off a load of wget commands? <4> ben017f: thanks <13> np <14> anyone gotten sybase-0.37 to work with a release version of freedts on windows? <15> sybariten: you are french ? <14> I've been able to compile freetds versions on windows but the resulting dll doesn't seem to contain all the symbols required... <15> sybariten: this one is good in french i use it now : http://www.ulg.ac.be/cifen/inforef/swi/python.htm <16> hey <17> What does split() do? <18> j4Rd4: type help("".split) in your python interpreter <17> Thank you. <5> ppl if I use a python script that changes my PYTHONPATH env var and the runs a cl***, shouldn't that cl*** know the new PYTHONPATH? <17> It should. <5> I'm using os.environ['PYTHONPATH'] to do this <5> bummer aparently it ain't working <5> duno why <17> ^ <12> $PYTHONPATH is only checked by the interpreter. <12> Once, I think. <9> yep, and that's on startup. <19> hello. <9> wait maybe not. <9> it may check on every import. <9> it does.. <5> ignacio|School: still should work cuz if I export it works <19> is there any way to coviniently split a string in n char strings? <9> slicing.. <12> >>> foo='abcdefghijkl' ; [''.join([foo[y] for y in x]) for x in [list(x[1]) for x in itertools.groupby(xrange(len(foo)), lambda x: x/5)]] \ ['abcde', 'fghij', 'kl'] <19> yeah, but is it only like slice & loop? :) <9> s0undt3ch: python only checks $PYTHONPATH on every startup, if you'd like to modify the python module search path in a program you'll have to do so via sys.path. <20> how can I do something like: while a_slice = a[0:3]: <21> ? <19> ignacio|School: thanks :) <21> nah time to fetch food <9> exalted> foo='abcdefghi'; [ foo[i:i+3] for i in range(0,len(foo),3) ] <9> ['abc', 'def', 'ghi'] <5> sysfault: then how do I do that with sys.path? <19> sysfault: thanks yet again. <9> sys.path.insert(1,'/path/to') <20> in other words, I want to iterate over the elements of "a" in slices of 3 elements <20> sysfault: oh, thanks <5> sysfault: thanks <5> sysfault: sys.path.insert(0,'/path/to') will make it the first path available or indices here start at 1? <9> indices start at 0. <5> k, thanks <9> insert(...) <9> L.insert(index, object) -- insert object before index <5> and 0 is the working dir. correct? <5> oh, so the 1 <9> yep <5> k, thanks <22> hey <22> is there any good python-based cms? <4> at the risk of running with false information here because of my lack of Py knowledge ....... <4> .... isnt Zope a sort of CMS ?
Return to
#python or Go to some related
logs:
spamass-milter+rh4 recursive tosource() ENV_ROOTPATH chroot
perl dup IO::Socket STDIN input actions +kde +kmix uninstall ravencore debian #web renegade penguin linux ex gfpics
k2projects
|
|