| |
| |
| |
|
Page: 1 2
Comments:
<0> brb need a cig, just popping 2 shop <1> http://www.toothpastefordinner.com/060806/fleshlight.gif <2> sorry, got to go.. <0> no worrys <0> i kinda realised u biys where dne <0> cheers for effort :D <0> what does the __main__ = do ? <3> __name__ will be __main__ if the script is being called from the user, instead of say, being imported via another python script <0> ah right ok <4> it'll be '__main__' (a string), __main__ isn't anything :-) <3> haha.. yea, what he said. <0> aparently the only thing missing from the script http://pastebin.com/707355 is somet to call up new playlist now <0> anyone know if a self.playmedia() would work? <3> I would also listen to earle and use random.choice() but thats just me <0> it didnt work <0> it didnt choose random.
<3> heh, ok <0> hence me having to go to a backup <0> kinda nail in coffin on that 1 ;) <3> well, something tells me it was the code, not the .choice() that didnt work as expected :) <0> yup..... but how much worce is the code i am using for random? will it be alright? <0> for now anyway <3> Be fine <3> not that big of a deal really.. just makes more sense to use .choice, but its not crucial <0> any clue how i could lauh new playlist when last 1 finishes? or que it up at least? <3> I dont know the first thing about xbmc <0> but u know python ;) <3> well, how you do it would depend on how xbmc.Player().play() returns.. does it wait for the entire list to play, then return? <0> 2 secs im just asking <3> dude, this isnt hard stuff. If you read the docs, you could solve it on your own <0> lol it is. aparently it returns straight away <3> ok, then there has to be something that xbmc calls once the play() function returns.. a cl*** function or something <3> use that call to restart a new playlist <0> http://www.xbmcscripts.com/downloads/documentation/xbmc.html#Player-isPlayingAudio <0> one of those? <3> dude, I am not gonna scour the docs to solve your problem, sorry :) <3> You should read it and decide <4> as it stands you know much more about your problem, the solution, and xmbc than we do <0> lol sorry know im being cheeky. just drinig me mad now :D <4> xbmc* <0> yea i know xbmc more, but i dont have teh python knoledge 2 sort it :@ i need to find someone who knows both :) <4> nobody here knows xbmc, unfortunately <4> sorry <0> yea no worrys. cheers guys <5> hmm <5> trynig to figure out a good way to dynamically create hundreds of thousands of email addresses, and have them be valid <4> "valid"? <5> well.. i have these virtual containers.. i want to generate a unique email address for each of them upon creation so people can provide content to them from a mobile device <5> so trying to figure out a scalable way of doing that. <5> without using /etc/aliases :) <4> uuid <5> oh, i have a unique name for all of them. <4> so what's the problem? <5> i can create the name.. i have to figure out how to actually turn it into an active email alias.. putting a list of a few million email aliases in /etc/aliases doesnt seem like a good idea <5> i have a feeling sendmail wouldnt handle that too well <4> you'd want to do that at the MTA level <4> i.e., write your own SMTP srever <5> yeah <5> that's what im working on a solid idea for <3> why not use an sql backend and have your mta query that? <5> i could do that <5> but i dont think postfix has that built in <3> Postfix supports it. Not sure if its native support or not. Obviously, has to be built against the proper sql libs <5> hmmm <5> sys.stdin.read() will read from starndard input until EOF? <6> Does anyone know a pretty way to convert [{'id': 1, 'name': 'foo'},{'id': 2, 'name': 'bar'}...] into a sequence of tuples ((1,'foo'),(2,'bar')...) <4> aDict.items() <4> oh sorry didn't read your example <6> heh <4> just iterate <6> figured <6> += ot the sequence i guess <4> iterate in a list comprehension if you think that's "pretty" <4> .append, yes <6> cool <6> Just curious if htere was a pretty way to do it <4> dict((x['id'], x['name']) for x in aDictList)
<4> scratch the dict if you want to keep the sequence of tuples <4> [(x['id'], x['name']) for x in d] <6> ah cool thanks <5> what does: if x <> y: <5> do ? <5> != ? <7> hi all <7> coming here from ruby, trying to use python to write blender model export scripts <7> how do i get the size of a list/array/tuple/whatever? <7> i've tried foo.size() and foo.length() <7> also, where in documentation can i find this sort of info on my own? <5> len(aList) <5> www.python.org/doc <7> do you have a direct link? <7> i'm having trouble figuring out the layout of the docs <5> http://www.python.org/doc/current/lib/ <7> http://www.python.org/doc/current/lib/typesseq.html ? <5> what? <7> where can i find the actual documentation on len()? <5> what? <5> it takes a list and returns the number of items in the list <5> actually, it takes a -sequence- and returns the number of items in the -sequence- <5> len([ 1, 2, 3]) == 3 <5> len (xrange(10)) == 10 <7> is there no documentation that says that? <5> im sure there is. <7> ya, thats what im looking for plz <7> cf http://www.rubycentral.com/ref/ref_c_array.html <5> len is a builtin function, its not an object method. <5> what more documentation do you need other than..: list([ 'one', 'two', 'three']) == 3 ? <7> ok, what if i wanted to reverse a list, or join a list or push to a list or pop from a list...? <5> what? <7> how do i find out how to do that? <5> what does that have to do with length? <5> go read the manual on the list methods <7> thats what i'm trying to find <7> :P <5> http://docs.python.org/tut/node7.html <5> start there. <5> and then try reading the manual to learn the language a little better <7> ok thx <5> you're quite welcome. <7> so can i do len() on an integer etc? <5> no. <7> or why is it not a method in list cl***? <5> Python is an interpreter, try running it. <5> it's a sequence! <5> you need to read the manual to understand the language a little better. <7> ok will do <4> yeah, you're going to get into serious trouble trying to learn a language by trial and error <7> xihr, you can describe a language relative to others and not ***ume the user is beginning his first language <7> what i'd like is a "python for c++ users" <7> s/c++/ruby/ or perl <4> that still involves learning about the language, not just trying random things <7> or befunge for all i care <4> nobody said you had to learn it without reference to any other language <4> just you're not going to learn it properly by trying random things <5> goodnight <5> time to surf <5> cya xihr <4> later <8> er <8> raleigh: http://benyoonline.com/pqr/PQR2.4.html might be of interest to you <7> ahh nice <7> yeah, this is what i've been looking for <7> thanks <8> no problem <9> re <0> hey guys <0> anyone remember who it was who helped mne yetserday? was it sander? <10> whats the command to count the items in an array? i.e as you would do count($array); in php
Return to
#python or Go to some related
logs:
#nhl uncorrupt a recycle bin
#computers #goal #politics nextdoornikkie
#freebsd #c rails unhash #bsd
|
|