1

Im a newbie to python and starting to learn Ninja IDE seemed good. but when trying to import "telnetlib" module from within the NINJA I get error:

>>> import telnetlib
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named telnetlib
>>> 

I successfully import modules like "sys" and "time".

Results of sys.path:

>>> sys.path
['C:\\Program Files (x86)\\Ninja\\Ninja.exe']
>>> 

I already have C:\python27\ folders in path and also created a system environment variable called PYTHONPATH as mentioned here: How to add to the pythonpath in windows 7?

It Works fine when using python for windows (from python.org).

Thanks

Community
  • 1
  • 1
Mario
  • 11
  • 1
  • you say you already have `C:\python27\ ` on the path, but it is very clearly not on `sys.path`, what is `sys.path` when you run python from python.org? – Tadhg McDonald-Jensen Mar 16 '16 at 20:05
  • I didn't know they are different. from python on windows. >>> import sys >>> sys.path ['', 'C:\\Python27\\Lib\\idlelib', 'C:\\Python27', 'C:\\Python27\\Lib', 'C:\\Python27\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27\\lib\\site-packages'] How to change sys.path? – Mario Mar 17 '16 at 13:32
  • [You can modify it using standard list operations:](https://docs.python.org/2/tutorial/modules.html#standard-modules) `import sys ; sys.path.append('/ufs/guido/lib/python')` – Tadhg McDonald-Jensen Mar 18 '16 at 02:19
  • 1
    Hi,Im looking for a way to have the path for every project and not have to do it every time I start a new project – Mario Mar 28 '16 at 15:44

0 Answers0