Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to specify name of module #14

Open
lydia-duncan opened this issue Jan 2, 2015 · 3 comments
Open

Allow users to specify name of module #14

lydia-duncan opened this issue Jan 2, 2015 · 3 comments

Comments

@lydia-duncan
Copy link
Member

At the moment, compiling a Chapel module into a Python module will always generate an a_out.py file which the user must move to a different filename if they don't like the name a_out.py. It would be nice to be able generate a user-defined name from the pych command, so that this step can be skipped.

First idea, should it look like this? What would be better syntax?

pych --compile blah.chpl -o blah.py

@thomasvandoren
Copy link
Member

What if the default name was the same as the chapel file replacing .chpl with .py? It probably should do some name massaging to ensure the python module name is valid and importable (e.g. substitute _ for .). For example:

pych --compile blah.chpl        # --> blah.py
pych --compile MyCoolCode.chpl  # --> MyCoolCode.py
pych --compile a.out.chpl       # --> a_out.py

@thomasvandoren
Copy link
Member

I also like the -o some_other_name.py option. It allows the python module name to be anything.

@lydia-duncan
Copy link
Member Author

I definitely like that general default behavior better, though I would hesitate to replace periods with underscores by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants