Consider moving all code into a top-level package
See original GitHub issueElectrum has now done this. As per the current setup.py
, I assume we’d want our package to be called electroncash
rather than electrum
, otherwise it would be impossible to install both programs in the same environment. This will unfortunately make merges from Electrum harder than they were before, but no harder than they are right now since Electrum made this change.
Advantages:
- Using the same directory names in the source code and at runtime is simpler, and is the normal Python practice.
- The workarounds for the mismatching names can be removed from each of the GUIs, and will be unnecessary in the new Android app.
- It would make it easier to run the unit tests, as discussed in #723. Tests which are easier to run are more likely to be kept up to date. (The other test issue in that PR had been broken for over a month, so evidently nobody had run the tests in that time.)
Disadvantages:
- All open branches and pull requests will have to be rebased.
- The workarounds for the mismatching names must be removed from each of the GUIs.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Set toplevel for Python package - Stack Overflow
Here my question: Is there any way i can define toplevel folder in main.py without moving the main file around? Note1: also there...
Read more >Python beyond top level package error in relative import
This code imports the file “printer” from the directory above app/. The directory above app/ is the main directory for our project. Our...
Read more >Python Tkinter - Toplevel Widget - GeeksforGeeks
A Toplevel widget is used to create a window on top of all other windows. The Toplevel widget is used to provide some...
Read more >Python import: Advanced Techniques and Tips
In Python, you use the import keyword to make code in one module available in another. Imports in Python are important for structuring...
Read more >Migrating from packages.config to PackageReference formats
Details on how to migrate a project from the packages.config ... Manage all project dependencies in one place: Just like project to project ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I don’t think that would be worth the trouble.
I think this is a good idea. Electron Cash now warns it’s using obsolete features with Python3.7 because of the current hack