Re: PYTHONPATH: dev and prod

2013-06-13 Thread jacopo
On Wednesday, June 12, 2013 5:10:05 PM UTC+1, rusi wrote: > On Jun 12, 6:29 pm, jacopo wrote: > > > > 1. How you run -- 'launch' -- the code -- from py and from prod > > > > > > when I have to test I use "python any_script.py"  but in production there > > is a c++ program that is able to wrap

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 6:29 pm, jacopo wrote: > > 1. How you run -- 'launch' -- the code -- from py and from prod > > when I have to test I use "python any_script.py"  but in production there is > a c++ program that is able to wrap and run python code (the technical details > are a bit beyond my knowledge)

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
> 1. How you run -- 'launch' -- the code -- from py and from prod when I have to test I use "python any_script.py" but in production there is a c++ program that is able to wrap and run python code (the technical details are a bit beyond my knowledge) > 2. What error you get when I run as "pyt

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 4:10 pm, jacopo wrote: > this idea seemed perfect but it turned out that you have to execute the > module as a package > (python -m py.myscripts.any_script) otherwise I get an error on the relative > import. > Unfortunately I am working in a team and I do not have control on how the

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
this idea seemed perfect but it turned out that you have to execute the module as a package (python -m py.myscripts.any_script) otherwise I get an error on the relative import. Unfortunately I am working in a team and I do not have control on how the module is launched. On Tuesday, June 11, 2

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
this idea seemed perfect but it turned out that you have to execute the module as a package (python -m scripts.myscript) otherwise I get an error on the relative import. Unfortunately I am working in a team and I do not have control on how the module is launched. On Tuesday, June 11, 2013 6:1

Re: PYTHONPATH: dev and prod

2013-06-11 Thread rusi
On Jun 11, 9:28 pm, jacopo wrote: > I am developing my code in the path: > /py/myscripts > /py/mylib > In order to "import mylib", I need to add /py/mylib to PYTHONPATH. > > Now I want to save a snapshot of the current code in the production > directory, I will copy all in: > /prod/myscripts > /p

PYTHONPATH: dev and prod

2013-06-11 Thread jacopo
I am developing my code in the path: /py/myscripts /py/mylib In order to "import mylib", I need to add /py/mylib to PYTHONPATH. Now I want to save a snapshot of the current code in the production directory, I will copy all in: /prod/myscripts /prod/mylib The problem now is that when I execute