#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 11
Top Prev 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 Next
#python
<ikor> hi all. i wrote a python extension on C. it compiles normally, but i can load it without errors only when i'm in the same directory as my module.so. whats the difference?
<deltab> ikor: what errors?
<ikor> SystemError: dynamic module not initialized properly
<ikor> but all ok, when i load it in same dir where i am
<deltab> does it rely on any other files?
<frafra> I've to run a program under windows. I have used os.system, but the path of the program contains spaces, so it doesn't work
<frafra> how to fix it?
<pjd> frafra: use the subprocess module
<deltab> subprocess.call([cmd, arg1, arg2])
<frafra> ok, thanks :)
<frafra> i've something like call(['"C:\Mozilla Firefox\firefox.exe", url]), but it says that it can't found my program... is it a 'space delimiter' problem?
<luks> frafra: not sure what are you doing, but wouldn't it be easier to use the standard webbrowser module?
<frafra> yes, sure :)
<frafra> is it possible?
<luks> import webbrowser; webbrowser.open(url)
<luks> :)
<luks> http://docs.python.org/lib/module-webbrowser.html
<frafra> thanks! :D
<deltab> frafra: doubles the backslashes, so that you have \\f in your string literal
<deltab> ^double
<Habbie> hmm, if false is 'false' in json but 'False' in Python, why does wikipedia say json is a valid subset of python?
<pjd> frafra: you have two sets of quotes, there
<pjd> '"
<pjd> also, instead of doubling the backslashes, you can use a raw string: r'...'
<deltab> Habbie: I don't think JSON includes bools
<Habbie> deltab, it does
<Ksero> Habbie, false = False; true = True;
<Ksero> :)
<Habbie> Ksero, yeah i suppose, i'm just wondering what else i could miss as this wikipedia claim is obviously rough
<deltab> alternatively, that :-)
<deltab> check the spec at json.org, then correct as necessary; thanks
<deltab> (I have to go now)
<Habbie> hehe :>
<frafra> another question... how to compile a program using py2exe? :D
<frafra> nothing... I've found some good doc :)
<ajit> Windows OS, Python 2.4, I am getting error "cannot open file python24_d.lib" when trying to link compiled SWIG generated file. Any help plz.
<frafra> I have to compile a python file (wich require some libs to compile statically) under windows. How to do this?
<vorsprung> ajit, frafra, Don't use Billyware and you won't have a problem?
<frafra> vorsprung, I have to do this
<astan> hm. doesn't urllib2 have an equivalent to urlretrive from urllib?
<jkp> anyone know if this is fixed in the latest python?
<jkp> http://mail.python.org/pipermail/pythonmac-sig/2005-March/013293.html
<Gacha> '%.4f' % 0.123456 ---- how can I dinamicly change the 4 integer
<toma^> Hey. Is it possible to do a class which would know it's references name? So like this "a = SomeClass()" and I could get the name of the reference something like this "a.myName() - 'a'"
<Habbie> >>> ('%%.%df' % 5) % 0.1234567
<Habbie> '0.12346'
<Habbie> >>> ('%%.%df' % 3) % 0.1234567
<Habbie> '0.123'
<Gacha> thnx
<Juhaz> eww
Previous Page Next Page