简体   繁体   中英

Adding directory to python PATH

I'm trying to achieve this https://github.com/strycore/fakegir

As this page says:

After inserting this package in your editor's python path, you will get autocompletion for every PyGObject module! By default the package is saved in ~/.cache/fakegir/. This is the directory you want to add to your Python PATH. Of course, you shouldn't put this package in your global PYTHONPATH or your PyGObject applications will stop working immediatly ;)

How do I achieve this with Sublime Text?

Try this in your python program/script:

import sys
sys.path.append("/var/mydirectory")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM