#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 
Top Prev 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 Next

#python

<pjd> you don't have to; Python is a dynamic language :)
<tessier> So use something like locals().set(name, val) ?
<pjd> oh, you use setattr/getattr
<tessier> ah, ok
<pjd> the next version of Python is probably getting a new syntax to make that easier
<guido_g> wasn't this turned down?
<pjd> was it? i dunno
<SevenInchBread> if you want to make an object from a dictionary... use type
<pjd> guido_g: ah, the actual syntax was turned down, but not the helper
<guido_g> right
<guido_g> SevenInchBread: and better have a damn good reason to do so! :)
<tessier> pjd: Do you mean __setattr__ ?
<jkp> hello all
<jkp> can someone explains what this line does?
<jkp> (date_time[0],date_time[-1]) == ('"','"'):
<pjd> tessier: i don't think so, no :)
<jkp> (if)
<tessier> I didn't think so either
<pjd> setattr/getattr are builtin functions
<guido_g> jkp: it checks if the string date_time starts and ends with "
<jkp> ahhh - ok :)
<tessier> __setattr__ was the first thing that turned up in a google search and is also in the index of programming python and python cookbook but no plain setattr. Although google results further down seem to talk about it. Strange.
<pjd> tessier: "pydoc setattr" :)
<pjd> or the library index
<pjd> (at docs.python.org)
<SevenInchBread> jkp, it's just a weird way of doing if date_time.endswith('"') and date_time.startswith('"')
<jkp> yeah, i can see that now...ta
<jkp> trying to fix up an imap migration script i found
<jkp> i cannot believe how hard it is to find a tool to do the darn job!
<nanotalk> hi.. I need to install django, .. but I'm behind a proxy, is there a configuration file in python to store connection parameters?
<nachos> hey
<nachos> is there anyway to unpack a list so one variable gets the first element and the rest get the following ones?
<nachos> something like this in ruby: a,*b = mylist
<Chousuke> hmm
<Akheron> a,b = (mylist[0],mylist[1:])
<frafra> hi all
<frafra> where can I found the python qt4 bindings for windows?
<pjd> nachos: there are a few variations; do you want the results to be copies or not, for example?
<luks> frafra: http://www.riverbankcomputing.co.uk/pyqt/download.php ?
<frafra> thanks luks :)
<jrydberg> "LookupError: no codec search functions registered: can't find encoding"
<jrydberg> what's the reason for that normally?
<jrydberg> nevermind
<pjd> that probably means an unusual/non-existent conversion was requested
<jrydberg> I hadn't copied the encodings directory
<jrydberg> (i'm trying to get a bare minimum python installation running on an embedded device)
<pjd> ah, ok
<frafra> hi all
<frafra> I've made a pyQt4 program and I want to run it under windows. I've installed python 2.5, qt 4.2.2, mingw, and python qt4 bindings. When I try to run my program, it say that it haven't found mingwm10.dll. How to fix it?
<astan> hello hello.. how come urllib.urlretrieve(url) isn't throwing an exception at me when url points to a file that doesn't exist on an FTP server?

Previous Page  Next Page

Search ircarchive.info