#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 12 
Top Prev 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 Next

#python

<Roey> Jell-O-Fishi: hehe
<Roey> nice nick
<Jell-O-Fishi> moo :)
<Juhaz> fluxdude, os.stat
<Roey> =)
<PDani> how can i convert a string to a number?
<Roey> in re.sub(regex, repl, source), does repl support backreferences ?
<fluxdude> Juhaz: I did os.stat to start with, let me look again
<Juhaz> fluxdude, and os.access
<ehird> :/
<masterdriverz> PDani: int(string)
<ehird> but anyway
<ehird> anyone know of other translation libs that aren't archaic? :)
<luks> gettext is still the best you can get
<ehird> :/
<marienz> well, gettext is definitely what I think about 95% of the world uses for this purpose (generally, not talking python software here)
<et> i seriously doubt gettext is the best you can get
<PDani> masterdriverz: and which module contains this int() function?
<et> especially for noncompiled languages
<marienz> PDani: __builtins__ or __builtin__, I never can remember which is which.
<marienz> PDani: (what I'm saying is it's a builtin, you don't have to import anything)
<luks> et: uh, so can you recommend me an usable alternative? :)
<Juhaz> fluxdude, access is probably easier if you're only interested in if _you_ can execute it, stat can tell x for owner/group/others separately.
<et> i've never have to deal with localisation in python
<evilx_> i didnt think there was a module for int()
<et> ...
<evilx_> if so, id figure it be math
<et> this sentence not english
<fluxdude> juhaz: thanks that was the one
<evilx_> anyone in here addicted to energy drinks?
<Dtu3ZOhtln> i used to be lol
<evilx_> how did you break it?
<evilx_> i drink around 2-4 amps tall boys a day
<Dtu3ZOhtln> cold turkey. i felt like shit for the next few days, but i eventully leveled out
<evilx_> i kinda just drink one instead of eating
<whaley_work> evilx_: cold turkey
<whaley_work> i did so with coffee
<evilx_> i hate coffee and i got off the soda and started energy drinks
<pyqwer> Is there a way to specify PYTHONPATH for a certain python installation? (E.g. different PYTHONPATH for python2.4 and python2.5 on the same machine)
<Dtu3ZOhtln> i feel better now. cafeine is nice, but the downs don't make up for the up most times
<evilx_> it will never work, specially with my work schedule, since i work 1030pm to 7am and have to spend hour and 15min driving to work each way
<pyqwer> Wasn't there some trick with .pth - files?
<Dtu3ZOhtln> pyqwer: you can alter the search path with sys.path i think, but idk about a global environment variable for 2 different python installations
<Dtu3ZOhtln> i would imagine that global variable is hardwired into the binary
<et> luks: the reason why gettext is problematic is that it uses a "source language" in the code, which makes the code nice and readable, but leads to ambiguousities (the same phrase in one language can have different meanings in another language), and by changing a string in the source language you break every translation
<luks> et: you can use IDs instead of actual english texts
<luks> but for me gettext still wins for two reasons: it has sane support for plurals and there is plenty of tools that support it
<et> another problem is the compiled nature of gettext, which fits compiled programs, where you just add something to your makefile, but not for dynamic languages
<pyqwer> Dtu3ZOhtln: Ok, thanks, I solved it now by linking the appropriate libs into the specific python site-packages directory.
<et> and yet another problem is that gettext depends on locales and is not threadsafe because of this (may be different in the python implementation)

Previous Page  Next Page

Search ircarchive.info