GitXplorerGitXplorer
m

trial_package

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
251a2b5dd3c6768c488f7f0094c2a5ee3ee63f5c

Initial commit

mmpariente committed 7 years ago
Verified
9db95a9cb0145505977313cda34d5fc1d4ec21de

Initial commit

mmpariente committed 7 years ago

README

The README file for this repository.

trial_package

Trial package to test relative imports before running setup.py

Why this repo?

So I had some trouble understanding in which case relative imports are working or not, so I made a repo for it. It will evolve as long as I understand more things on the subject.

How do relative imports work?

  • Say you cloned the repo, you obtain a folder like this folder strucure

  • If you want to run core.py, you can run it from the path ~/trial_package/ with python -m trial_package.core (the option -m is here to run library module as a script)

  • However, if you try from ~/trial_package/trial_package/, neither python -m core and python core.py