Re: [Tutor] Beginners

2007-01-17 Thread raghu raghu
I dont have any programming background, i know only c language. On 1/18/07, wesley chun <[EMAIL PROTECTED]> wrote: On 1/17/07, raghu raghu <[EMAIL PROTECTED]> wrote: > can i follow 'Learning Python' by oreily. Is it good for beginners? can any > one suggest me i am planning to buy a hard copy

Re: [Tutor] Beginners

2007-01-17 Thread wesley chun
On 1/17/07, raghu raghu <[EMAIL PROTECTED]> wrote: > can i follow 'Learning Python' by oreily. Is it good for beginners? can any > one suggest me i am planning to buy a hard copy (text book) what is your programming background, what languages do you know already? or are you completely new to p

[Tutor] Beginners

2007-01-17 Thread raghu raghu
can i follow 'Learning Python' by oreily. Is it good for beginners? can any one suggest me i am planning to buy a hard copy (text book) -- Vanam ___ Tutor maillist - Tutor@python.org http://mail.python.org/

Re: [Tutor] What is a mixin class?

2007-01-17 Thread Don Taylor
Don Taylor wrote: > I have a vague idea what a mixin class is, I would like to get a better > handle on it. > Thanks for the information and the links, I have a much better idea about mix-ins now. I also found the following informative: http://www.linuxjournal.com/article/4540 and http://aspn

Re: [Tutor] Graphics with Python: wxPython vs. tkinter vs. PyCairo vs. PyX vs...

2007-01-17 Thread John Fouhy
On 18/01/07, Vijay Pattisapu <[EMAIL PROTECTED]> wrote: > Hey friends-- > > I've been looking through the archives and haven't found any > comparative evaluation of Python graphics libraries... > > Which is the best (or your favorite), and for what tasks? I only have experience with Tkinter and wx

Re: [Tutor] What is a mixin class?

2007-01-17 Thread Kent Johnson
(resending to the whole list) Don Taylor wrote: > I have a vague idea what a mixin class is, I would like to get a better > handle on it. > > It is a term that is used quite often in Python circles, but I can't > find a definition. > > I guess that because of multiple inheritance Python does n

Re: [Tutor] What is a mixin class?

2007-01-17 Thread Danny Yoo
On Wed, 17 Jan 2007, Don Taylor wrote: > I have a vague idea what a mixin class is, I would like to get a better > handle on it. Hi Don, This post might help: http://mail.python.org/pipermail/tutor/2006-October/050448.html The core idea is that, since classes themselves are first-clas

Re: [Tutor] What is a mixin class?

2007-01-17 Thread Chris Lasher
On 1/17/07, Don Taylor <[EMAIL PROTECTED]> wrote: > So, what constitutes a mixin class and what are the conventional ways to > denote them in code? A mixin is a specific type of superclass, just called a mixin because of the concept it represents. A common type of mixin would be a class that defin

Re: [Tutor] Perfect Python web stack?

2007-01-17 Thread Vijay Pattisapu
I personally like Zope's object-oriented database. -Vijay On 17/01/07, OkaMthembo <[EMAIL PROTECTED]> wrote: > Ok pythonistas! > > Please help me to decide. I might have asked some of you before, so please > bear with me. > > I want to build a database driven python web app and i need to decide,

[Tutor] Graphics with Python: wxPython vs. tkinter vs. PyCairo vs. PyX vs...

2007-01-17 Thread Vijay Pattisapu
Hey friends-- I've been looking through the archives and haven't found any comparative evaluation of Python graphics libraries... Which is the best (or your favorite), and for what tasks? Thanks a lot! Vijay -- 3506 Speedway Austin, TX 78705 Cell: (469)877-9166

Re: [Tutor] Perfect Python web stack?

2007-01-17 Thread Dave Kuhlman
On Wed, Jan 17, 2007 at 10:09:02AM -0500, Kent Johnson wrote: > OkaMthembo wrote: > > Ok pythonistas! > > > > Please help me to decide. I might have asked some of you before, so > > please bear with me. > > > > I want to build a database driven python web app and i need to decide, > > so please

Re: [Tutor] problem with telnetlib, threading class and try/except

2007-01-17 Thread Kent Johnson
Chris Hallman wrote: > > I'm writing a multithreaded program that initiates a dial backup > connection to check the B channels on ISDN BRI connections. I recently > added logic to check for offline devices (Operation timed out) and DNS > errors (getaddrinfo failed). When it encounters the excep

Re: [Tutor] possible import locations

2007-01-17 Thread Dave Kuhlman
On Wed, Jan 17, 2007 at 06:07:19AM -0500, Kent Johnson wrote: > Andre Engels wrote: > > Is it possible to see from a python program where it searches for > > possible imports? Is it possible to import from another location than > > those? (Of course with an "if so, how" attached). > > > > The is

[Tutor] What is a mixin class?

2007-01-17 Thread Don Taylor
I have a vague idea what a mixin class is, I would like to get a better handle on it. It is a term that is used quite often in Python circles, but I can't find a definition. I guess that because of multiple inheritance Python does not need a formal way of specifying mixin classes so I presume

[Tutor] problem with telnetlib, threading class and try/except

2007-01-17 Thread Chris Hallman
I'm writing a multithreaded program that initiates a dial backup connection to check the B channels on ISDN BRI connections. I recently added logic to check for offline devices (Operation timed out) and DNS errors (getaddrinfo failed). When it encounters the exception, it doesn't appear to be exit

Re: [Tutor] Perfect Python web stack?

2007-01-17 Thread Python
On Wed, 2007-01-17 at 16:46 +0200, OkaMthembo wrote: > > 1) MySQL vs PostGRES PostGRES is a more sophisticated SQL server. It should probably be the default choice. However, I'm primarily using MySQL. The reasons: easy administration - I think supporting dozens of remote databas

Re: [Tutor] Perfect Python web stack?

2007-01-17 Thread Kent Johnson
OkaMthembo wrote: > Ok pythonistas! > > Please help me to decide. I might have asked some of you before, so > please bear with me. > > I want to build a database driven python web app and i need to decide, > so please vote on the best components (im developing on XP SP2): > > 1) MySQL vs PostG

Re: [Tutor] Query about getattr used as a dispatcher

2007-01-17 Thread Kent Johnson
raghu raghu wrote: > i am following 'dive into python' for learning. i dont know whether i am > following the right book. as i > am a beginner is it right to follow this book?or is there any other > book which is best for beginners? I don't think Dive Into Python is a great book for beginners

Re: [Tutor] Perfect Python web stack?

2007-01-17 Thread OkaMthembo
Thanks, gentlemen. Input appreciated and noted. "Shortash" On 1/17/07, Mike Hansen <[EMAIL PROTECTED]> wrote: > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of OkaMthembo > Sent: Wednesday, January 17, 2007 3:59 AM > To: tutor > Subject: [Tutor]

Re: [Tutor] Query about getattr used as a dispatcher

2007-01-17 Thread Chris Calloway
raghu raghu wrote: > Actually i installed python 2.5 i ran this script and its showing error > it could not import statsout. why is it so? statsout is a *hypothetical* module used for an example only. The statsout module does not actually exist. When Dive Into Python wants you to type in an exa

Re: [Tutor] help with telnet error

2007-01-17 Thread Kent Johnson
Chris Hallman wrote: > > I'm working on a program that telnets to multiple devices to test their > backup ISDN BRI connections. I'm trying to build in error recovery with > try/except logic, but I'm having trouble getting it to work. This first > example uses a host name that isn't in our DNS (

Re: [Tutor] Perfect Python web stack?

2007-01-17 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of OkaMthembo > Sent: Wednesday, January 17, 2007 3:59 AM > To: tutor > Subject: [Tutor] Perfect Python web stack? > > Ok pythonistas! > > Please help me to decide. I might have asked some of you > b

[Tutor] help with telnet error

2007-01-17 Thread Chris Hallman
I'm working on a program that telnets to multiple devices to test their backup ISDN BRI connections. I'm trying to build in error recovery with try/except logic, but I'm having trouble getting it to work. This first example uses a host name that isn't in our DNS (yes, this does happen): import t

Re: [Tutor] import and unittest

2007-01-17 Thread Thomas Coopman
On 1/17/07, Kent Johnson <[EMAIL PROTECTED]> wrote: Thomas Coopman wrote: > When I run One.py from in the directory A, doesn't look python in it's > parent directory when it can't find the module? > And if that's not the case where and what should I add to the sys.path > variable? No, Python wo

Re: [Tutor] import and unittest

2007-01-17 Thread Kent Johnson
Thomas Coopman wrote: > When I run One.py from in the directory A, doesn't look python in it's > parent directory when it can't find the module? > And if that's not the case where and what should I add to the sys.path > variable? No, Python won't look in parent directories for imports. Try runni

Re: [Tutor] import and unittest

2007-01-17 Thread Thomas Coopman
On 1/17/07, Kent Johnson <[EMAIL PROTECTED]> wrote: Thomas Coopman wrote: > Well I don't really > need the circular imports but I would like to know how to do the imports correct. > > Suppose that in the example that I showed only One needs Two. > > So then we have this: > > M/ > __init__.py > A

[Tutor] Query about getattr used as a dispatcher

2007-01-17 Thread raghu raghu
i am following 'dive into python' for learning. i come across a term getattr() which gives reference about a function.Its written it can be used as a dispatcher. Below example given for that builtin function: import statsout def output(data,format='text'): output_function = getattr(statsou

Re: [Tutor] import and unittest

2007-01-17 Thread Kent Johnson
Thomas Coopman wrote: > Well I don't really > need the circular imports but I would like to know how to do the imports > correct. > > Suppose that in the example that I showed only One needs Two. > > So then we have this: > > M/ > __init__.py > A/ > __init__.py > One.py > B/ > __init__.py > T

Re: [Tutor] import and unittest

2007-01-17 Thread Thomas Coopman
On 1/17/07, Kent Johnson <[EMAIL PROTECTED]> wrote: thomas coopman wrote: > On Tue, 16 Jan 2007 10:06:37 - > "Alan Gauld" <[EMAIL PROTECTED]> wrote: > >> "Thomas Coopman" <[EMAIL PROTECTED]> wrote >> . >>> I wondered if it was possible to do something like this: >>> >>> src/ >>>-a_module

Re: [Tutor] import and unittest

2007-01-17 Thread Kent Johnson
thomas coopman wrote: > On Tue, 16 Jan 2007 10:06:37 - > "Alan Gauld" <[EMAIL PROTECTED]> wrote: > >> "Thomas Coopman" <[EMAIL PROTECTED]> wrote >> . >>> I wondered if it was possible to do something like this: >>> >>> src/ >>>-a_module/ >>>-sub_module/ >>> test/ >>>-a_module/

Re: [Tutor] possible import locations

2007-01-17 Thread Kent Johnson
Andre Engels wrote: > Is it possible to see from a python program where it searches for > possible imports? Is it possible to import from another location than > those? (Of course with an "if so, how" attached). > > The issue is that the company I work for is switching providers. With > the old

Re: [Tutor] import and unittest

2007-01-17 Thread thomas coopman
On Tue, 16 Jan 2007 10:06:37 - "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > "Thomas Coopman" <[EMAIL PROTECTED]> wrote > . > > I wondered if it was possible to do something like this: > > > > src/ > >-a_module/ > >-sub_module/ > > test/ > >-a_module/ > >-sub_module/ > >

Re: [Tutor] Difference between 'yield' and 'print'

2007-01-17 Thread Kent Johnson
Luke Paireepinart wrote: > Refer to http://docs.python.org/ref/yield.html for information about yield. > Disclaimer: The following information I'm going to present you I came up > with after reading that short explanation of 'yield' so it may not be > exactly correct. There is a longer explanat

[Tutor] Perfect Python web stack?

2007-01-17 Thread OkaMthembo
Ok pythonistas! Please help me to decide. I might have asked some of you before, so please bear with me. I want to build a database driven python web app and i need to decide, so please vote on the best components (im developing on XP SP2): 1) MySQL vs PostGRES 2) Lighttpd + FastCGI vs Apache +

[Tutor] possible import locations

2007-01-17 Thread Andre Engels
Is it possible to see from a python program where it searches for possible imports? Is it possible to import from another location than those? (Of course with an "if so, how" attached). The issue is that the company I work for is switching providers. With the old provider (as well as in my local

Re: [Tutor] Difference between 'yield' and 'print'

2007-01-17 Thread Luke Paireepinart
raghu raghu wrote: > Is there any difference between yield and print in python script?i > have written a script based on fibonacci series where in i used yield > and print in two different scripts: > the script is given below: > def fib(n): > a,b = 0,1 > while a<=n: >print a >