git - python- dulwich only working in interpreter, but not as a script -


i trying use dulwich access git repositories. have followed documentation , installed required, , tried running simple script:

>>> dulwich.repo import repo >>> r = repo(<path/to/my/repo>) >>> r.head() >>> c = r[r.head()] >>> c >>> c.message 

when type line line in python interpreter, works fine, , intended results.

however, when create script same commands, , try running terminal using python script-name.py, no results @ all.

and finally, when run same script in pycharm, error says modulenotfounderror: no module named 'dulwich.repo'; 'dulwich' not package.

any idea happening here, because can't find helpful?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -