#python - Sun 18 Feb 2007 between 10:28 and 12:11

NY Lost Funds



guido_gnothing
given that you're on a sane os
Dtu3ZOhtlnif i try to read from it, do i get a predictable error?
guido_gno
Dtu3ZOhtlnhmm.
guido_gon a sane os, the file is not deleted, just removed from the directory
so your process can still work with the open file
but as i said, on a sane os
Dtu3ZOhtlnhmm ok
ibob63is there a quick way I can tell quick version of python is installed from the linux command line?
masterdriverzibob63: python --version
Tweyibob63: python -V
ibob63thanks guys. I knew it would be something simple :)
birkenfeldibob63: note that --version works only in 2.5
sreeramsee, http://rafb.net/p/Yhcfd031.html
is there some place which explains precisely what cases are allowed and what cases are not?
ok got it! http://docs.python.org/ref/calls.html
nikosapiHi, I'm using glade/pygtk to write my first python application. When I start a certain thread it'll start but the code in the function that's supposed to be running (now that it's a thread) doesn't run until I close the application? I can't figure this out :-(
firsmSomebody recommended the gepass module to read a password from stdin, is there something to read regular strings from stdin? (Besides sys.stdin.readlin)
frafrahi all
I've a string with numbers, and I want to get 2 number: one that is the sum of the string[x%2==0] numers, the other numer is the sum of the string[x%2!=0] numers... how to do this?
birkenfeldfrafra: how are the numbers separated in the string?
frafrathere aren't separated... like '12846'
birkenfeldokay
sum(int(n) for n in string[::2])
and
frafraso, I've to do 1+8+6 and 2+4
birkenfeldsum(int(n) for n in string[1::2])
padtfirsm: there's a built in function called raw_input
frafrathanks :D
birkenfeldnp
firsmpadt: thanks
padtnp
errorlevelIs there a means of taking something like a pointer to a python object? I'm working on intra-application drag-and-drop and if I was using C, I would just copy a pointer around. Is there a comparable way of passing around a reference in Python?
birkenfeldall names reference objects
which is similar to pointers
errorlevelWell, the method I need to call to set the value being passed through the drag-and-drop operation takes a string, and then the method I call to get the value returns a string. I know I can do id(object) to get the ID of the object, but is there a way I can use that ID to get a reference to the object?
Leedsdon't do that
if you particularly need to map a string to an object, use a dictionary to maintain the mapping
errorlevelHm.

Page: 2 9 16 23 30 37 

IrcArchive

NY Lost Funds