Re: import issues python3.4

2017-11-10 Thread Matt Wheeler
On Wed, 8 Nov 2017 at 15:58 Heli  wrote:

> Is there anyway I can run my external script without changing the absolute
> path from (1) to (2) in my code.
>

I would recommend using tox [0] to run your test script, and setting up an
entry point in your `setup.py` [1] so that your `main` command is
"installed" when you install the package.
This also means that regular users of your package will be able to run the
script by just typing the command name you choose, instead of needing to
know exactly where the package got installed.


> I use subprocess.call to run main.py within my external script and it gets
> few arguments to run.


tox handles setting up a virtualenv & installing your packages into it,
which means in the context of your tox run, when your test script calls out
to your `main` "entry point" using `subprocess.call` it will be available
in the local $PATH


[0] https://tox.readthedocs.io/en/latest/
[1]
http://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins
-- 

--
Matt Wheeler
http://funkyh.at
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: import issues python3.4

2017-11-09 Thread lingmaaki
Python Tutorial

http://net-informations.com/python/default.htm
-- 
https://mail.python.org/mailman/listinfo/python-list