Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch addresses a runtime issue not found in PR 46.
This project is named INDXParse. A script installed by the packing setup is named INDXParse.py. That script also provides some functionality as a module, exporting symbols re-used in other scripts used in this package.
The package, before this patch, was called
INDXParse
. Re-use of the name spelled asINDXParse
unfortunately caused some runtime issues when attempting to call package-installed scripts from the command line. The last line of the stack trace from callingMFTINDX.py
reported this:A StackOverflow thread (see refs) showed one resolution to this issue was de-conflicting the name of the package from the name of a module in the package. In the StackOverflow thread, adding
_base
to the included module resolved the poster's issue.PEP-8 includes a prescription that goes part of the way to resolving the package/module name conflict: Package names are suggested to be lowercase, rather than the mixed-case used by the INDXParse project. This patch applies that convention to the package name.
One matter left unresolved is that PEP-8 also suggests module names be lowercase. If the INDXParse.py file is renamed to indxparse.py, the same
ModuleNotFoundError
described above is likely to recur.Since Issue 40 is considering splitting modules from scripts, the question of how to rename INDXParse.py is left for a future patch. This patch is scoped to addressing the runtime issue.
This patch was tested by installing this package into a virtual environment and running MFTINDX.py against a test disk image. That call failed, as the script's full functionality hasn't yet been restored since the Python 2 code state; but it did run to a more interesting internal code point, rather than fail immediately with a
ModuleNotFoundError
.References: