Re: [Tutor] python logging module: two handlers writing to the same file - okay?

2007-12-15 Thread Kent Johnson
Hans Fangohr wrote: (i) is this (as in the log.conf file) the right use of the logging module to achieve what I need? I think you understand the module correctly. (ii) in particular, it appears we have two filehandlers that write to the same file (in mode 'a+'). While this seems to work

[Tutor] windowsfiles permissions

2007-12-15 Thread Kirk Bailey
So, in windows, when my wiki's editor saves a file, i want to have the option to set it to read only. In windows, how do i get python to set a file's permissions? -- Salute! -Kirk Bailey Think +-+ | BOX | +-+ knihT Fnord.

Re: [Tutor] python logging module: two handlers writing to the same file - okay?

2007-12-15 Thread Ricardo Aráoz
Kent Johnson wrote: Hans Fangohr wrote: (i) is this (as in the log.conf file) the right use of the logging module to achieve what I need? I think you understand the module correctly. (ii) in particular, it appears we have two filehandlers that write to the same file (in mode 'a+').

Re: [Tutor] python logging module: two handlers writing to the same file - okay?

2007-12-15 Thread Kent Johnson
Ricardo Aráoz wrote: Kent Johnson wrote: I don't know the answer, but it has nothing to do with the logging module. The question is, can the same file reliably be opened twice for writing in the same module. Well, the question would actually be if the logging module is smart enough to

Re: [Tutor] user-given variable names for objects

2007-12-15 Thread Tiger12506
Mmm, to nit-pick a little, dictionaries are iterables, not iterators. They don't have a next() method. I'm a little fuzzy on the details of that, I will have to look over some reference material again. [a for a in eventData if eventData[a] time.time()] This is more efficient. The keys

Re: [Tutor] upper and lower case input for file name

2007-12-15 Thread earlylight publishing
I don't know if this'll help or not but I just learned about this: file = raw_input(info).lower The .lower is supposed to convert any input to lower case. -- Message: 4 Date: Fri, 14 Dec 2007 11:14:13 -0500 From: Bryan Fodness [EMAIL PROTECTED]

[Tutor] Python Versions

2007-12-15 Thread earlylight publishing
No prob about the gender confusion. :-) I'd be willing to bet most folks around here are male so it's not unreasonable to assume. I wasn't offended, just thought I'd share in the interest of accuracy. Thanks for the kind appology anyway. Hope I haven't set off a firestorm! Message: 1

Re: [Tutor] upper and lower case input for file name

2007-12-15 Thread Alan Gauld
earlylight publishing [EMAIL PROTECTED] wrote I don't know if this'll help or not but I just learned about this: file = raw_input(info).lower file = raw_input(prompt).lower() # note the parens! The .lower is supposed to convert any input to lower case. It will indeed. There is

Re: [Tutor] windowsfiles permissions

2007-12-15 Thread Kirk Bailey
Found it. tested it. worked it. sgharinig it for otheers. # os.chmod(filename,stat.S_IREAD ) # print 'This page is now set to read only. Use WindowsExplorer to turn this off.P' Let's me edit the terms and conditions page then set it to read only- thought others would also value a

Re: [Tutor] upper and lower case input for file name

2007-12-15 Thread Tiger12506
earlylight publishing [EMAIL PROTECTED] wrote I don't know if this'll help or not but I just learned about this: file = raw_input(info).lower file = raw_input(prompt).lower() # note the parens! The .lower is supposed to convert any input to lower case. It will indeed. There is also

Re: [Tutor] Python Versions

2007-12-15 Thread Thorsten Kampe
* Tiger12506 (Fri, 14 Dec 2007 16:23:00 -0500) Despite what your english teacher might have tried to make you believe, they were wrong about the lack of a neutral in english. Just like ending sentences with prepositions has always been done and always will be done, the use of they to refer

[Tutor] binary translator

2007-12-15 Thread 2face xzibit
Hey i have created a program that turns a string into a binary one. But when i began to test the program it turned out that it could not handle some special characters (e.g ÆØÅ). Could someone please help me? p.s i am a newbie so if you have any comments on the source code please let me

Re: [Tutor] binary translator

2007-12-15 Thread Tiger12506
Hey i have created a program that turns a string into a binary one. But when i began to test the program it turned out that it could not handle some special characters (e.g ÆØÅ). Could someone please help me? These special characters have different values than those you have put into your

Re: [Tutor] binary translator

2007-12-15 Thread Alan Gauld
2face xzibit [EMAIL PROTECTED] wrote ...f you have any comments on the source code please let me know I'll add a few. def ChooSe(): Its kind of conventional to have function names start lowercase and use uppercase for classes. Not a rule but it helps when code includes both to know