@# 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 12 13 14 15 16 17



Comments:

<0> do I have to explicitly say that is has an alpha channel or what?
<0> omg, I saved as "for the web" in photoshop, and chose PNG24 with transparency, but they still came out white... strange.. oh well, problem solved
<1> http://deadbeefbabe.org/paste/758
<1> any ideas?
<2> why dicts doesn't keep the ***ignement order of their keys ?
<3> BluR, your format string doesn't have any format in it.
<1> haha, oh
<1> thanks



<4> HazyNRG, a dict is a hash table, it is unordered
<2> aoeuhtns-: can we do it?
<4> HazyNRG, if you need to preserve the order, you'll have to use another structure like a list
<2> ok
<2> thanks
<5> HazyNRG: there have been some implementations of ordered dicts (generally they just combine a dict and an ordered set of keys in a list)
<5> HazyNRG: if you look at the cheeseshop you can probably find something like it
<2> ok, i was thinking about that
<5> HazyNRG: the one I've seen was called odict I think
<6> is there any easy way to get string.split() to dump any trailing delimiters and their text into the last token?
<5> grim: trailing delimiters?
<6> say i do s="1,2,3" l = s.split(',', 2)' i want l[1] to have 2,3
<3> just make it s.split(',', 1) instead...
<6> so l[0] is 1 and l[1] is what then?
<7> guess :)
<8> the remaining part of the string ;-)
<8> oups
<8> sorry for spoiling ChrisLong
<6> i wan't both tokens, i just want delimiters after the maxsplit to be dumped into the last token
<6> oooo that's maxsplit not max tokens.. gotcha ;)
<9> How can I find out where my script is located on the filesystem?
<10> hello, what is the env variable for python startup script?
<7> penguin****er: PYTHONSTARTUP
<11> $PYTHONSTARTUP
<7> lukaswayne9: use the __file__ attribute
<10> thank you
<11> grim: exalted> s='a:b:c:d:::'; s.split(':',re.subn('[a-z]+:','',s)[-1])
<11> ['a', 'b', 'c', 'd', '::']
<11> something like that maybe.



<6> sysfault: i'm just used to split taking max tokens, not max splits, and misread the documentation..
<6> i do have a better question though, is there any way to make a dictionary not get sorted, and to remain in the order that i added elements to it?
<9> ChrisLong: when I use __file__ on my object, it says it has no __file__ attribute
<6> lukaswayne9: you don't use it on an object, just use __file__ not self.__file__
<12> most objects havent' a __file__ attribue
<9> grim: oh, thank you
<11> grim: no, once the dictionary is modified it will store its key-value pairs unordered internally for faster lookup.
<12> or rather, it will store them ordered by hash value for faster lookup.
<6> sysfault: just to make sure we're on the same page, it's changing the order to make the lookups faster?
<11> basically...
<6> alright, then i need to figure out how i want to handle this, since my iteration is bunk now..
<9> How can I tell distutils to include my glade file in the site-packages folder? It only wants to install my python files
<3> well, it's right. site-packages is for python modules, not arbitrary data
<0> ok, it wasn't photoshops fault, the images are transparent, how do I put them on each other with PIL then? PIL handles PNG24 with alpha, right?
<13> wat is the easiest way to search a binary file for a binary pattern .. essentially i want to search an executable for a pattern 0x01 0x02 defined by unsigned char x[]={0x01, 0x02}
<0> with image.paste, only the last image is visible, even though they have transparency...
<1> http://deadbeefbabe.org/paste/758 Any ideas? (time_p***ed is of type timedelta)
<7> BluR: you need (10-time_p***ed.seconds)
<1> why?
<1> and wouldn't it then be (10-time_p***ed.seconds,) since you can't have a tuple of one item unless you put a comma at the end?
<7> BluR: because "some string"%10-i == ("some string"%10)-i.
<1> oh
<1> okay
<1> so how does python know the difference between tuples and operator precedence disambiguation?
<7> BluR: you had no utple previously. and this is special cased by %
<1> okay
<1> thank you
<1> that works :)
<7> BluR: , as tuple generator has low precedence
<14> hello
<15> hey
<4> is there an easy way to make an iterator like "for elem in list" go backward?
<16> aoeuhtns-: for e in reversed(list):
<4> ah, thanks


Name:

Comments:

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






Return to #python
or
Go to some related logs:

ubuntu as user root+wrong password
linux Gigabeat F40
ubuntu config-2.6 server warning: trying to assign nonexistent symbol
#ai
#fedora
goodgautam
#perl
#web
php5 fopen fail
x-window-system-dev ubunut



Home  |  disclaimer  |  contact  |  submit quotes