@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11



Comments:

<0> anyone here then? :(
<0> nobody for my python tech support eh
<1> squiggly, hmmm. I see that you haven't donated to the python foundation... that's why you are not receiving any support from our agents
<1> :)
<1> it is "free" software
<0> shekmalhen, lol
<2> :P
<3> squiggly: does the struct module help? (i'm not entirely sure what 'packet buffer' is)
<0> p*** data to a buffer cl*** until sending it through a socket
<0> or whatever it is you're using it for
<0> such as... makeDWORD functions
<0> thanks roryy
<0> question
<0> is there a reason why a port isn't specified in socket.connect/_ex()?
<0> or is it in a different format, like... 1.0.0.0:8080 instead
<3> squiggly: read the introductory part of the socket docs



<3> squiggly: AF_INET addresses are specified as a tuple of (host,port)
<0> i see...
<0> not quite sure i understand tuples yet, just started learning python :P
<0> they're just lists, but uneditable after writing them, right?
<3> `immutable' is the term we prefer. Also, tuples do not have all the methods that list does
<3> besides obvious things like .sort, which wouldn't be logical for an immutable object, there is e.g. no tuple.find
<0> whyever not
<3> well, conceptually a tuple is not just an immutable list. In a tuple the order of things is significant, i.e., should have meaning (like the AF_INET address tuple: first element is host, second is port)
<0> i see
<3> alternatively, lists are (again, conceptually) homogeneous: each element of a list should be of the same type. This is not enforced in the language
<4> one of my CS cl***es said the diff between lists and tuples is access method - lists are like arrays, randomly accessible; tuples are like linked lists, where you can only access the elements sequentially. I take it this doesn't hold for python lists and tuples?
<0> aren't arrays usually sequenced properly
<3> rabidfurby: that does not sound like python to me
<5> Hi, is there a way that I can get a cl*** object in the same was as a function object (so that I can just declare a variable "mediatype", and call mediatype() when I want to instantiate the cl***?
<3> rabidfurby: tuples are indexable in python (e.g., ('foo','bar','baz','quux')[2] #=> 'baz')
<3> lachyg: cl*** foo: p***; bar = foo; baz=bar() (replace first ';' with a carriage return)
<3> lachyg: cl***es are objects too
<6> people should not take my nick :)
<5> Hmm. I just rewrote the code to do that, and now it works. That's weird...I was getting an exception saying it's not a callable object before. Thanks
<7> Is there a php-style way to delimit parsed CGI stuff and non-parsed HTML? Like <% python %>HTML
<3> SoulPropagation: maybe something here will help: http://wiki.python.org/moin/WebProgramming
<2> SoulPropagation, I just print stuff using triple-quoted strings and printf style formatting
<2> i.e.
<2> print '<b>%s</b>' % ('some text')
<7> hm
<2> it doens't look too bad.
<2> multiple print statements
<2> SoulPropagation, i think this is what you want: http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html
<8> hi
<8> is there something like a oin method for lists ?
<8> join
<9> r0nny: " ".join(list)
<3> also [1,2]+[3,4] (depending on what you mean by 'join')
<8> i meant the string-join (loke in perl)
<10> how do I check whether a is an 'int'?
<3> isinstance(1,int) #=> True
<10> thanks
<9> r0nny: what does it do in perl?
<8> ahmeni: in perl it just does what "foo".join(list) does
<9> ahh
<0> isn't there an isnumeric function in string.?
<11> squiggly: What for?
<11> try: int(s) except ValueError: #not a number
<11> try: float(s) except ValueError: # not a "numeric" in SQL sense.
<11> squiggly: If you need more exact specs, pydoc re
<12> I want to index a bunch (1000s) of files. I guess pickle will be too slow. So that leaves sqlite? or is there some other fast data structure?
<0> for the above
<11> hendry: Why should pickle be to slow? cPickle?
<11> hendry: and what exactly do you want to index?
<12> yacc: filenames
<12> yacc: i want them ordered by time taken
<11> time taken for what?
<12> yacc: they're pictures
<11> hendry: How do you define time taken?
<11> filesystem timestamp?
<12> yacc: the exif capture time or mtime
<12> yacc: that doesn't really matter
<12> i want to be able to p*** to a function next(filename) and it tells me the next filename from the data structure *fast*
<12> so i can have a timeline :)



<11> hendry: a threaded dict?
<12> yacc: just a indexed list would be fine
<12> why threaded?
<11> You really need a filename -> filename next function?
<11> threaded, like FORTH ;)
<11> hendry: d[filename] = next-logical-filename
<12> FORTH?
<13> heh
<12> next_filename = next_in_time(current_filename)
<14> anyone familiar with pygtk?
<11> babbitt: GIMPNet #pygtk?
<11> hendry: A list would be good if you had a function like filename = next(actpos).
<14> thanks yacc, I'll head over there if the guys in #gtk don't know
<15> range(math.sqrt(x)) would give 0 to math.sqrt(x), right? how can i tell range to start on 1 instead of 0
<15> nm
<16> is there a way to destroy a objects or remove it from memory?
<17> del
<17> although there is a bit of confusion around that i think
<17> i use del.... there is another method, which i can't recall
<16> I just tried. It seems like a object cannot destroy itself
<17> it cannot destroy itself
<9> haha
<9> ipython reeeally doesn't like it when you delete sys.stdin
<17> http://www.python.org/search/hypermail/python-1994q3/0084.html
<9> goes into an infinate loop
<17> haa
<17> sonium: read that link
<16> k
<18> any reason why i should use sys.stdout.write() instead of print?
<19> no
<3> Mizipzor: it's difficult (or impossible?) to avoid added whitespace in successive print statements
<17> Mizipzor: stdout.write doesnt put a \n at the end
<17> more like printf in c
<17> whereas print does
<17> what roryy said
<17> which i didnt see :)
<18> i see... so its just a matter of how i want to print the text? no multiplatform issues or anything like that?
<14> if you put a comma at the end of a print statement it won't add the \n
<14> its kinda wierd, but it works
<14> no issues with it, just a wierd syntax
<18> i see, thanks
<14> np Miz. Just use print, its easier :)
<3> babbitt: although I don't disagree with your sentiment, bear in mind that print "a",;print "b" will put a space between a and b
<14> it very well might. So I suppose if formatting were /really/ important, sys.stdout.write() is the way to go..but for most use, I think print is best
<18> wasnt he talking about the newline? not the space?
<14> yea, but roryy is pointing out that the space exists even with the comma, so it could break formatting if you really, really cared
<18> in the interactive shell, ive imported a module, i found a bug in it, i edited the code in that module... is there any way to reimport/reload/update the module whitout exiting the shell, restart it and imoirt the new version?
<18> import*
<18> hmm... that got quite unclear :P anyone knows what i mean?
<20> reload(module)
<18> Erwin, thanks
<17> use string mod if you really care about whitespace
<14> I love string mod, playing with strings is such a joy in python....
<14> wow...that was even more geeky than usual, and kinda non-sequiter
<14> I think its time for bed...g'night everyone
<17> nite
<8> anyone can help me with a odd problem - i compiled vanilla-sources with drm as module using gcc 3.4.5 - inserting the drm module wont work any more - insmod tells wrong module format
<8> eh v 1.6.17-r4
<20> This is #python. You might have better luck in #linux or whatever.
<17> lol wrong room i bet :)
<17> argh, said the naughty word
<8> yeah - lol
<0> L OL
<21> the lol ninjas will find you and cut you
<8> they are allready here - i made them play poker and chess
<22> can i copy iterators?
<20> slav0nic: No protocol for doing so exists
<20> You couold turn them into a sequence and then do something with that sequence.
<23> yeah, it's much safer.
<20> I suppose you could set up a lazy iterator copy too, if you wanted
<24> slav0nic: maybe itertools.tee does what you want
<22> if iterator size 20 000 000 ?)
<18> when i do this: self.cellGrid = [[MapCell()]*self.sizeY]*self.sizeX ... is all the instances of MapCell() linkes? cause it seems that once i edit one of them, all of the instaces are edited in the same way


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

#gimp
#physics
nvidia+xscreensaver+fc5
kubunto decode
*** glibc detected *** anjuta: free(): invalid pointer:
ubuntu look mac
storeAufsOpenDone: (2) No such file or directory
php redirect after emailform
debian kernelpath
#gaim



Home  |  disclaimer  |  contact  |  submit quotes