calling Python script from another Python script (Windows, multiple installation problem)

2014-03-26 Thread Martin Landa
Hi all, I am trying to fix a bug in the project which I am working for. The program starts on Windows via bat file which calls a Python script to set up the environment including GUI and allow to launch program-specific tools. Some of the tools are written in C, some in Python. These commands

Re: calling Python script from another Python script (Windows, multiple installation problem)

2014-03-26 Thread Vlastimil Brom
2014-03-26 10:40 GMT+01:00 Martin Landa landa.mar...@gmail.com: Hi all, I am trying to fix a bug in the project which I am working for. The program starts on Windows via bat file which calls a Python script to set up the environment including GUI and allow to launch program-specific tools.

Re: calling Python script from another Python script (Windows, multiple installation problem)

2014-03-26 Thread Martin Landa
Hi, it should be possible to specify the path of the desired python interpreter along with the executed script as an argument to Popen(...). This should make the selection of the used python explicit. Or are there any other disadvantages of the current approach, which you are

Re: calling Python script from another Python script (Windows, multiple installation problem)

2014-03-26 Thread Martin Landa
Dne středa, 26. března 2014 13:29:47 UTC+1 Martin Landa napsal(a): not really, I am just searching for a better solution based on virtualenv or something similar... particularly I am using something like if sys.platform == win32: # get full path including file extension

Re: calling Python script from another Python script (Windows, multiple installation problem)

2014-03-26 Thread Chris Angelico
On Wed, Mar 26, 2014 at 11:49 PM, Martin Landa landa.mar...@gmail.com wrote: # get full path including file extension for scripts fcmd = get_real_command(args[0]) What's that function do? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: calling Python script from another Python script (Windows, multiple installation problem)

2014-03-26 Thread Martin Landa
Dne středa, 26. března 2014 13:54:02 UTC+1 Chris Angelico napsal(a): On Wed, Mar 26, 2014 at 11:49 PM, Martin Landa landa.mar...@gmail.com wrote: # get full path including file extension for scripts fcmd = get_real_command(args[0]) this function returns a full

Re: calling Python script from another Python script (Windows, multiple installation problem)

2014-03-26 Thread Cameron Simpson
On 26Mar2014 05:49, Martin Landa landa.mar...@gmail.com wrote: Dne středa, 26. března 2014 13:29:47 UTC+1 Martin Landa napsal(a): not really, I am just searching for a better solution based on virtualenv or something similar... particularly I am using something like if