Skip to content

Use configuration file in home directory #7

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

Closed
nirfse opened this issue Nov 25, 2017 · 5 comments · Fixed by geodav-tech/flask-shell-ptpython#1 · May be fixed by #15
Closed

Use configuration file in home directory #7

nirfse opened this issue Nov 25, 2017 · 5 comments · Fixed by geodav-tech/flask-shell-ptpython#1 · May be fixed by #15

Comments

@nirfse
Copy link

nirfse commented Nov 25, 2017

Please make flask-shell-ptpython apply configurations from ~/.ptpython/config.py in user's home directory.

maxnordlund added a commit to maxnordlund/flask-shell-ptpython that referenced this issue Mar 9, 2020
This uses the official/upstream way of finding the config and history file,
since ~/.ptpython/config.py is deprecated. It also uses the global ones,
though it can be easily extended to support per project config and history.
But that's for a rainy day.

Fixes jacquerie#7 and jacquerie#13.
@spookey
Copy link

spookey commented Apr 5, 2020

I just tried the changes from #15 and I can confirm that it works.
If it is not sure which merge request to accept, please don't pick #9 - it uses some hard coded path for the configuration file and therefore won't work on macOS (ptpython configuration is somewhere below ~/Library/Application Support/..)

Please merge this very soon, I have a very fine tuned ptpython configuration and would like to use it in a flask shell as well.

@mgd722
Copy link

mgd722 commented Sep 11, 2020

@jacquerie I think a lot of us find this very useful! If you could merge #15 and get it on pip that'd be great-- let us know if you need help!

@mgd722
Copy link

mgd722 commented Sep 11, 2020

for anyone else who is as impatient as i am, this command will install PR #15 directly:

pip install --no-cache-dir git+https://github.com/maxnordlund/flask-shell-ptpython.git@patch-1

you might be able to leave the --no-cache-dir if you don't mess it up like 7 times before getting it right like i did.

NOTE: this doesn't seem to work with pip==21.3, but i can confirm it's working on pip==20.2.3.

@junnplus
Copy link

@nirfse @mgd722
flask-shell always supported user custom config, we can use
pip install flask-shell[ptpython] to instead of flask-shell-ptpython, PR welcome.

@nirfse
Copy link
Author

nirfse commented Oct 10, 2023

Hey, closing this issue as irrelevant after many years. Feel free to reopen if necessary.

@nirfse nirfse closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants