How to write a warning to my log file?

2007-07-28 Thread MarkyMarc
Hi All, A small newbie Q. I have made a nice log function in me program. The program writes some data to me mysql database. When I write to the database I get som warnings back. Have do I write these to me log file? I know I have to use the the warnings api. But I can not figure out how to use i

How to do python and RESTful

2007-09-05 Thread MarkyMarc
Hi all, I want to make a web service application in python and keywords are RESTful, python and nice urls(urls mapped to python objects). I don't want a big framework but a nice small one, that can just do the things I want. I have be looking at quixote, but is this uptodate? "plain" mod_python,

Newbie packages Q

2007-10-07 Thread MarkyMarc
Hi All, I do not understand the packages system in python. I have read this http://docs.python.org/tut/node8.html a 100 times and I can not get it to work. I make a test app like this: *** Test/ __init__.py (a empty file) apack/ __init__.py (

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 2:16 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Would it hep to observe that the atest and btest submodules attemot to > import each other? > > There is no reason I can see for apack and bpack to be subpackages. Why > not just rename atest.py as apack.py at the same level as the Test >

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 4:24 pm, Bruno Desthuilliers wrote: > MarkyMarc a écrit : > (snip) > > > And the atest and btest, shouldn't they be able to import each > > other?? > > import is a statement. It's executed, like any other top-level code, > when the module is

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 5:22 pm, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > MarkyMarc wrote: > > On Oct 7, 4:24 pm, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > >> MarkyMarc a écrit : > >> import is a statement. It's executed, like any other top-level co

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 5:49 pm, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > MarkyMarc wrote: > > *** > > atest.py: > > > def printA(): > > print "This is Atest from Apack" > > *** >

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 6:04 pm, Bruno Desthuilliers wrote: > MarkyMarc a écrit : > (snip) > > > It was simply to make a point. But then lets say the to files looks > > like this: > > > *** > > atest.py: > > > def printA()

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 8:00 pm, Bruno Desthuilliers wrote: > > > And sys.path is /python/Test/bpack > > And you do wonder why you can't import ? Please reread with attention > the first and third points listed above (following the 'But anyway'). > The 'Test' package is *not* in your sys.path. I can say yes

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 10:05 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > MarkyMarc <[EMAIL PROTECTED]> wrote: > >... > > > > > And sys.path is /python/Test/bpack > > sys.path must be a LIST. Are you saying you set yours to NOT be a list, > but, e.g., a STRIN

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 10:31 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > MarkyMarc <[EMAIL PROTECTED]> wrote: > >... > > > > > > > And sys.path is /python/Test/bpack > > > > sys.path must be a LIST. Are you saying you set yours to NOT be a list, > &g