Skip to content

Commit e466d16

Browse files
committed
Add __main__.py to allow running amifuse as a Python module
Without __main__.py, "python3 -m amifuse" fails with: No module named amifuse.__main__; 'amifuse' is a package and cannot be directly executed Add the module entry point and set prog="amifuse" in ArgumentParser so that usage messages show "amifuse" rather than "__main__.py". Document "python3 -m amifuse" as an alternative to pip-installing the package, useful for development and debugging from a local checkout.
1 parent 24f47aa commit e466d16

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ sudo apt install fuse libfuse-dev
6767
sudo dnf install fuse fuse-devel
6868
```
6969

70+
### Running from source (without installing)
71+
72+
To run amifuse directly from a local checkout (useful for development/debugging):
73+
74+
```bash
75+
python3 -m amifuse mount disk.hdf
76+
```
77+
7078
## Quick Start
7179

7280
To download a test PFS3 disk image and the pfs3aio handler:

amifuse/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from amifuse.fuse_fs import main
2+
3+
main()

amifuse/fuse_fs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,6 +2355,7 @@ def cmd_format(args):
23552355

23562356
def main(argv=None):
23572357
parser = argparse.ArgumentParser(
2358+
prog="amifuse",
23582359
description=f"{__banner__}\n\n"
23592360
"Mount Amiga filesystem images via FUSE.",
23602361
formatter_class=argparse.RawDescriptionHelpFormatter,

0 commit comments

Comments
 (0)