#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
Top Prev 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 Next
#python
<Habbie> Juhaz, yes :)
<Juhaz> >>> '%.*f' % (2, 5)
<Juhaz> '5.00'
<pjd> toma^: a class can have any number of references
<pjd> and those references might or might not have names
<Habbie> Juhaz, oh, doh :)
<VladDrac> toma why would you want that?
<Habbie> Gacha, what Juhaz says
<pjd> (the class could be in a list, for example)
<toma^> pjd: true :(
<toma^> didn't thought about that really
<Gacha> Juhaz: where you found this method?
<pjd> toma^: you can trace the program's reference graph, if you *really* want to
<pjd> (there are debugging toolkits to help with that sort of thing)
<Juhaz> http://docs.python.org/lib/typesseq-strings.html
<Juhaz> "Precision (optional), given as a "." (dot) followed by the precision. If specified as "*" (an asterisk), the actual width is read from the next element of the tuple in values, and the value to convert comes after the precision."
<pjd> but very likely not what you have in mind :)
<pjd> Juhaz: good heavens
<pjd> when did that happen?
<pjd> toma^: what are you actually trying to accomplish there?
<toma^> VladDrac, pjd: I'm building a system which uses SQL. Having consistent naming with databases and the python references would be nice since I need to attach databases to each other. So database a would be referenced with a in python, and a in the list of attached databases
<toma^> it's a bit complicated to explain so I'm sorry if it sounds weird :)
<VladDrac> you're reinventing sqlalchemy / sqlobject?
<Juhaz> pjd, well, it's there in python 1.4 ...
<Juhaz> can't find any earlier docs than that, so I guess "forever" is as good a bet as any
<toma^> VladDrac: dunno :) it's a custom system with much more than that I'd assume
<toma^> *googles sqlobject*
<pjd> toma^: there are probably several sensible ways to do that, depending on your details
<pjd> toma^: google SQLAlchemy instead :)
<pjd> it's nicer
<toma^> those both are not included in the core python it would seem...
<toma^> my boss wants to keep the dependencies to minimum ;P
<frafra> in windows (when I run a python program) it always show me the console. How to hide it?
<Juhaz> it's not a dependency if you write it yourself?
<toma^> Juhaz: well no :)
<pjd> toma^: why would depending on it be bad?
<toma^> Juhaz:I don't make the rules, I just follow them ;)
<pjd> a good soldier knows when to question the rules! :)
<luks> frafra: use pythonw
<toma^> pjd: I'm guessing it's because of the nature of python. So when there's a lot of dependencies the system will get borked almost every time when there is a update of the system
<frafra> luks, thanks :)
<frafra> the problem is that... I've made a compiled program :)
<pjd> toma^: that's an irrational fear
<VladDrac> keeping dependencies to a minumum means building your own wheel? That's pretty stupid :)
<astan> hmf. i really don't get this, how can i detect that a file i tried to fetch did not exist on the FTP server? first i tried urllib, but it just silently created a 0 byte file and didn't raisy any error.. now i tried urlgrabber and it behaves the same :/
<astan> s/raisy/raise/
<astan> s/error/exception/ grrr.
<toma^> pjd: it's still valid ;) ( has seen python-scripts get borked many times ).
<pjd> writing your own monolithic reinvention of everything will lead to greater borkage :)
<VladDrac> toma: I haven't. Better invest your time in writing proper functional/unittests
Previous Page Next Page