H
horos11
hey all,
I'm trying to make a syntax checker, where I say:
python -c "import /path/to/script"
to check the syntax of the script named '/path/to/script' (note: no py
extension needed). Of course this doesn't work because the
functionality for import is bundled up with the environment..
So - is there any simple, generic way in python to import a python
file without worrying about naming convention or environment? Sort of
like require in perl?
Ed
I'm trying to make a syntax checker, where I say:
python -c "import /path/to/script"
to check the syntax of the script named '/path/to/script' (note: no py
extension needed). Of course this doesn't work because the
functionality for import is bundled up with the environment..
So - is there any simple, generic way in python to import a python
file without worrying about naming convention or environment? Sort of
like require in perl?
Ed