Re: [Tutor] can't import module

2006-07-02 Thread Kent Johnson
Dave S wrote: > One question, where is the rest of PYTHONPATH defined, my section in .bashrc > is only the first part, where do you get to define the /usr/lib part ? Much of sys.path is set up in site.py in the standard library. This module is always imported when the interpreter starts up. Read

Re: [Tutor] can't import module

2006-07-02 Thread Dave S
On Sunday 02 July 2006 18:48, Dave Kuhlman wrote: > On Sun, Jul 02, 2006 at 10:32:51AM -0700, Danny Yoo wrote: > > > PYTHONPATH=/home/dave/my_files/my_gg/gg1.4/configs:/home/dave/my_files/ > > >my_gg/gg1.4/logs:/home/dave/my_files/my_gg/gg1.4/get_data:/home/dave/my_ > > >files/my_gg/gg1.4/gg_utils:

Re: [Tutor] SOLVED :)

2006-07-02 Thread Dave S
On Sunday 02 July 2006 18:32, Danny Yoo wrote: > > PYTHONPATH=/home/dave/my_files/my_gg/gg1.4/configs:/home/dave/my_files/my > >_gg/gg1.4/logs:/home/dave/my_files/my_gg/gg1.4/get_data:/home/dave/my_file > >s/my_gg/gg1.4/gg_utils:/home/dave/my_files/my_gg/gg1.4/ipc:/home/dave/my_f > >iles/my_gg/gg1.

Re: [Tutor] can't import module

2006-07-02 Thread Dave S
On Sunday 02 July 2006 20:12, Alan Gauld wrote: > > As far a putting everything into a package - I am a bit lost. Do you > > mean one > > big .py script or am I misunderstanding you ? > > You misunderstand him. > > Python allows you to reate a package structure of directories and > files > such th

Re: [Tutor] can't import module

2006-07-02 Thread Alan Gauld
> As far a putting everything into a package - I am a bit lost. Do you > mean one > big .py script or am I misunderstanding you ? You misunderstand him. Python allows you to reate a package structure of directories and files such that all of the files within the top level directory and the su

Re: [Tutor] can't import module

2006-07-02 Thread Dave Kuhlman
On Sun, Jul 02, 2006 at 10:32:51AM -0700, Danny Yoo wrote: > > PYTHONPATH=/home/dave/my_files/my_gg/gg1.4/configs:/home/dave/my_files/my_gg/gg1.4/logs:/home/dave/my_files/my_gg/gg1.4/get_data:/home/dave/my_files/my_gg/gg1.4/gg_utils:/home/dave/my_files/my_gg/gg1.4/ipc:/home/dave/my_files/my_gg/gg1.

Re: [Tutor] can't import module

2006-07-02 Thread Danny Yoo
> PYTHONPATH=/home/dave/my_files/my_gg/gg1.4/configs:/home/dave/my_files/my_gg/gg1.4/logs:/home/dave/my_files/my_gg/gg1.4/get_data:/home/dave/my_files/my_gg/gg1.4/gg_utils:/home/dave/my_files/my_gg/gg1.4/ipc:/home/dave/my_files/my_gg/gg1.4/process_data:/home/dave/my_files/my_gg/gg1.4/common_utils:/

Re: [Tutor] can't import module

2006-07-02 Thread Dave S
Here goes ... I have two files test1 and test2 ... [EMAIL PROTECTED]:~$ ls -l total 37620 drwx-- 8 dave dave 4096 2006-06-30 23:26 Desktop drwxr-xr-x 9 dave dave 4096 2006-06-15 22:48 google-earth drwxr-xr-x 13 dave dave 4096 2006-05-27 09:51 my_files drwxr-xr-x 2 dave dave

[Tutor] Fw: Reg refreshing cache in Cheetah Templates

2006-07-02 Thread Alan Gauld
- Original Message - From: "anil maran" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 01, 2006 9:46 PM Subject: Reg refreshing cache in Cheetah Templates > hi > i m trying to use the cheetah templates do Sorry Anil, I've only read the Cheetah overview, I've never use

Re: [Tutor] can't import module

2006-07-02 Thread Dave S
On Sunday 02 July 2006 17:02, Dave Kuhlman wrote: > On Sun, Jul 02, 2006 at 11:55:24AM +0100, Dave S wrote: > > [snip] > > > Thanks for replying :) > > > > The app is fairly big and distributed around the gg1.4 directory. I get > > the feeling that 'from logger import log' is the first of a lot of

Re: [Tutor] can't import module

2006-07-02 Thread Dave Kuhlman
On Sun, Jul 02, 2006 at 11:55:24AM +0100, Dave S wrote: [snip] > > Thanks for replying :) > > The app is fairly big and distributed around the gg1.4 directory. I get the > feeling that 'from logger import log' is the first of a lot of import > problems, this script alone imports from another 7

Re: [Tutor] static variables - lock/semaphore

2006-07-02 Thread Alan Gauld
> if we compare rowlevel locking and global variables > which scales and is better >>Alan Gauld <[EMAIL PROTECTED]> wrote: >>> is there a way to use some sort of semaphore or lock >>> so that it is not accessed simultaneously > > > > There are ways of doing this in Python but if you are using >

Re: [Tutor] python debugger

2006-07-02 Thread Alan Gauld
> I have a small problem with python's debugger. > I don't know how can I debugg a script through this debugger. > Can you tell me? There are several debuggers available on top of the basic pdb module. If you know the Gnu debugger gdb then pdb is closely modelled on that. If you don't know gdb

Re: [Tutor] can't import module

2006-07-02 Thread Dave S
On Sunday 02 July 2006 11:29, Kent Johnson wrote: > Dave S wrote: > > > [EMAIL PROTECTED]:~/my_files/my_gg/gg1.4/get_data$ ./live_datad.py > > > > Traceback (most recent call last): > > File "./live_datad.py", line 15, in ? > > from logger import log > > ImportError: No module named logger >

Re: [Tutor] can't import module

2006-07-02 Thread Kent Johnson
Dave S wrote: > > [EMAIL PROTECTED]:~/my_files/my_gg/gg1.4/get_data$ ./live_datad.py > Traceback (most recent call last): > File "./live_datad.py", line 15, in ? > from logger import log > ImportError: No module named logger > > [EMAIL PROTECTED]:~/my_files/my_gg/gg1.4/get_data$ echo $PYTHO

Re: [Tutor] help regarding string

2006-07-02 Thread Kent Johnson
anil maran wrote: > please help me format this string from > input : 2006-06-16 16:23:27.703000 to > output: 2006-06-16 16:23:27 > > or 2006-06-16 4:23:27 PM str.split() can extract everything up to the first period: In [4]: '2006-06-16 16:23:27.703000'.split('.')[0] Out[4]: '2006-06-16 16:23:27

[Tutor] can't import module

2006-07-02 Thread Dave S
Hi all, I wrote some script a while back but can no longer get it to run, since then I have upgraded my system from breezy to dapper (kubuntu) I now cannot import a module I wrote. I just know its got to be simple and am somewhat embarrassed that I cannot see the problem :( [EMAIL PROTECTED]:~

[Tutor] help regarding string

2006-07-02 Thread anil maran
please help me format this string from input : 2006-06-16 16:23:27.703000 to output: 2006-06-16 16:23:27 or 2006-06-16 4:23:27 PM thanks a lot __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.co