Python Forum
A bash script that is a hack to enable very easy Python Imports
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A bash script that is a hack to enable very easy Python Imports
#1
Python projects that have complex codebase directory structures introduce a fairly common problem with imports within the project. While providing absolute paths is recommended, it is cumbersome, repetitive, and rather boilerplate. Absolute imports may also decrease application portability. pyosphere.sh mitigates these issues by simply providing a flattened execution environment, allowing all files to relatively import each other trivially, while allowing developers to maintain their choice of directory structure.

Note: This is just a hack to make things easy while importing. Use at own will.

I do hope people will like this since it does make importing files easy as well as running files from other directories as well.

It is completely open source and can be found at: https://github.com/vedantpuri/pyosphere

Feel free to check it out and leave behind a star if you like it !
Reply


Messages In This Thread
A bash script that is a hack to enable very easy Python Imports - by vedant13 - Aug-03-2018, 07:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SeePy and Loge - easy and fast dynamic report generation with Python lucke 1 3,924 Dec-10-2020, 07:58 PM
Last Post: lucke
  script to check bash scripts Skaperen 3 2,789 Sep-19-2019, 10:26 PM
Last Post: Skaperen
Lightbulb Script broke with Python 3 / improve script for printing aspecteleven 4 4,658 Feb-22-2019, 12:23 PM
Last Post: buran
  bash to python: keep.py Skaperen 0 2,825 Apr-08-2017, 07:27 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020