#python - Fri 4 May 2007 between 00:00 and 00:12

NY Lost Funds



jsoftwand have the #!/path/to/python in it ?
MFenjsoftw: no. in fact, you probably don't want to do those things
jsoftwHmm ok
What would be a nice way to have arrays
MFen(since they would tempt someone into trying to run your config file, and you don't want that)
jsoftwlists, even
cause it would look weird to have foo.append("bleh")
MFenconfig = {}; execfile("my.conf", config). anything you define in my.conf will now be in config
jsoftwHmm.
sipherMFen: Using execfile for configs is a good idea
jsoftwHmm.
siphereasy
jsoftwIm kinda 50/50 on it
sipherand no overhead
jsoftwTrue.
But then ive still got to write something which writes the config file.
MFensipher: when you allow procedural logic in your data format, you inevitably get procedural logic in your users' data files
TFKylesipher: compiling python code == no overhead?
and execing it of course
MFensipher: this becomes a problem if you ever need to convert those data files to some other form
sipher: of course, that's fine for many apps, i just don't personally choose to do it
sipherTFKyle: Well, less overhead
jsoftwI might use normal config file stuff.
actionjsoftw investigates ConfigFile module
jsoftwinvestigates ConfigFile module
karterhi folks
I'm looking for a python - django expert. pl. take a look at http://seattle.craigslist.org/see/cpg/319532725.html and let me know if you're interested.
sipherMFen: Well, I have to do it with a parser because I'm reading a config from a 3rd party program so..
wallunitis there a regex function for replace?
MFensipher: of course. there are no absolutes.
TFKylewallunit: re.sub?
wallunitTFKyle: oh, right. I was just confused by its name.
thnks
MFenkarter: your posting got pwnd
jsoftwSo mr ConfigParser cant actually write files
MFenyes it can
jsoftwEh?
MFenjsoftw: ConfigParser.write(f)
jsoftwTrues.
karteryeah..some miscreants from another list i guess. here's another go at it:
http://seattle.craigslist.org/see/cps/323965097.html

Page: 2 9 16 23 30 37 44 51 58 

IrcArchive

NY Lost Funds