Skip to main content
added 10 characters in body; edited body
Source Link
Mike Graham
  • 77.1k
  • 16
  • 105
  • 131

One reason this isn't mentioned in PEP 8 or other good Python style guides is that modifying sys.path isn't something you do in a real program. Itisn't something you want to do in a real program; it makes your program less robust and portable. A better solution might be to put your package somewhere that would already be in sys.path or to define PYTHONPATH systemwide to include your package.

One reason this isn't mentioned in PEP 8 or other good Python style guides is that modifying sys.path isn't something you do in a real program. It makes your program less robust and portable. A better solution might be to put your package somewhere that would already be in sys.path or to define PYTHONPATH systemwide to include your package.

One reason this isn't mentioned in PEP 8 or other good Python style guides is that modifying sys.path isn't something you want to do in a real program; it makes your program less robust and portable. A better solution might be to put your package somewhere that would already be in sys.path or to define PYTHONPATH systemwide to include your package.

Source Link
Mike Graham
  • 77.1k
  • 16
  • 105
  • 131

One reason this isn't mentioned in PEP 8 or other good Python style guides is that modifying sys.path isn't something you do in a real program. It makes your program less robust and portable. A better solution might be to put your package somewhere that would already be in sys.path or to define PYTHONPATH systemwide to include your package.