Re: [Tutor] logging module, how to print line numbers?

2006-08-31 Thread Hans Fangohr
Hi Kent, > > I have some trouble with the logging module. > > > > When I run this program with python2.3: > > > > # > > import logging,sys > > formatter = logging.Formatter('%(name)s :%(asctime)s %(filename)s > > %(lineno)s %(levelname)s %(message)s') > > stdout_handler = logging.Stre

Re: [Tutor] Python decorator

2006-08-31 Thread Sean Perry
János Juhász wrote: > Hi, > > I have just started to play with TurboGears - it is really nice - and I > couldn't understand the decorators used by it. > I have tried to interpret the http://wiki.python.org/moin/PythonDecorators > about decorators, but it is too difficult for me. > > May someone

Re: [Tutor] logging module, how to print line numbers?

2006-08-31 Thread ralf . steckel
Dear Hans, i haven't worked with the logging module yet but as a guess from what you write in your message: according to the documentation the format statement for lineno should be %(lineno)d, but you use %(lineno)s. Best regards, Ralf > Hi, > > I have some trouble with the logging module.

Re: [Tutor] logging module, how to print line numbers?

2006-08-31 Thread Kent Johnson
Hans Fangohr wrote: > Hi, > > I have some trouble with the logging module. > > When I run this program with python2.3: > > # > import logging,sys > formatter = logging.Formatter('%(name)s :%(asctime)s %(filename)s > %(lineno)s %(levelname)s %(message)s') > stdout_handler = logging.Stre

Re: [Tutor] GUI Programing

2006-08-31 Thread John Fouhy
On 01/09/06, Amadeo Bellotti <[EMAIL PROTECTED]> wrote: > I'm going to try some GUI programming does anyone know where the start like > using tk or wx or what ever i want it to it will run on Windows UNIX and Mac > systems can you tell me whats best to use and give me a link to a good > tutorial?

Re: [Tutor] GUI Programing

2006-08-31 Thread Henry Dominik
This guy has been documenting his progress as he learns Python GUI programming. See if you can pick up a few tips http://www.learningpython.com/   - Original Message - From: Amadeo Bellotti To: Tutor Sent: Thursday, August 31, 2006 9:12 PM Subject: [Tutor] GUI Progra

Re: [Tutor] Securing a Computer...

2006-08-31 Thread Luke Paireepinart
On 8/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I just got into high school, and the network and all the computers aren't secure at all...I'm trying to make a program that password protects the computer after an inactivity time, but there are some specific things I can't find how I'm supp

[Tutor] logging module, how to print line numbers?

2006-08-31 Thread Hans Fangohr
Hi, I have some trouble with the logging module. When I run this program with python2.3: # import logging,sys formatter = logging.Formatter('%(name)s :%(asctime)s %(filename)s %(lineno)s %(levelname)s %(message)s') stdout_handler = logging.StreamHandler(sys.stdout) stdout_handler.se

[Tutor] GUI Programing

2006-08-31 Thread Amadeo Bellotti
I'm going to try some GUI programming does anyone know where the start like using tk or wx or what ever i want it to it will run on Windows UNIX and Mac systems can you tell me whats best to use and give me a link to a good tutorial? Thanks ___ Tutor mai

Re: [Tutor] Python decorator

2006-08-31 Thread Kent Johnson
János Juhász wrote: > Hi, > > I have just started to play with TurboGears - it is really nice - and I > couldn't understand the decorators used by it. > I have tried to interpret the http://wiki.python.org/moin/PythonDecorators > about decorators, but it is too difficult for me. That's not the b

[Tutor] Python decorator

2006-08-31 Thread János Juhász
Hi, I have just started to play with TurboGears - it is really nice - and I couldn't understand the decorators used by it. I have tried to interpret the http://wiki.python.org/moin/PythonDecorators about decorators, but it is too difficult for me. May someone explain decorators in very sortly, w

Re: [Tutor] Unicode problems

2006-08-31 Thread Kent Johnson
Ed Singleton wrote: > On 8/29/06, Kent Johnson <[EMAIL PROTECTED]> wrote: >>> The main problem I am having is in getting python not to give an >>> error when it encounters a sterling currency sign (£, pound sign here >>> in UK), which I suspect might be some wider problem on the mac as when >>> I

Re: [Tutor] IP-range

2006-08-31 Thread Kent Johnson
Øyvind wrote: > Hello. > > I have a database where I have some IP-ranges. Then I have some logs over > IPs from customers and need to connect the two. Also you might be interested in http://c0re.23.nu/c0de/IPy/ Kent ___ Tutor maillist - Tutor@python.

Re: [Tutor] IP-range

2006-08-31 Thread Kent Johnson
Øyvind wrote: > Hello. > > I have a database where I have some IP-ranges. Then I have some logs over > IPs from customers and need to connect the two. > > So, for example: > > Range 1: > 123.132.122.4-123.132.122.255 > > How do I check if IP 123.132.122.58 is a part of that? I have thought > about

Re: [Tutor] IP-range

2006-08-31 Thread Danny Yoo
On Thu, 31 Aug 2006, �yvind wrote: I have a database where I have some IP-ranges. Then I have some logs over IPs from customers and need to connect the two. So, for example: Range 1: 123.132.122.4-123.132.122.255 Hello, You might want to consider using tuple comparison. For example: ##

[Tutor] IP-range

2006-08-31 Thread Øyvind
Hello. I have a database where I have some IP-ranges. Then I have some logs over IPs from customers and need to connect the two. So, for example: Range 1: 123.132.122.4-123.132.122.255 How do I check if IP 123.132.122.58 is a part of that? I have thought about 4 if statements: split(.) if ip[0