Skip to content

Configuration is not saved #339

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

Open
vict0rsch opened this issue Feb 7, 2020 · 6 comments
Open

Configuration is not saved #339

vict0rsch opened this issue Feb 7, 2020 · 6 comments

Comments

@vict0rsch
Copy link

Whenever I start ptipython and change something in the menu (say, syntax highlighting, but anything, really), it is forgotten at next startup. Is this expected?

ipython: 7.12.0
python: 4.7.4
ptipython: 1.0.1
ptpython: 3.0.0

@SongRb
Copy link

SongRb commented Mar 3, 2020

You should edit $HOME/.config/ptpython/config.py to reflect your configuration.

@treatmesubj
Copy link

https://github.com/prompt-toolkit/ptpython/blob/master/examples/ptpython_config/config.py looks easy enough to use, but how would I implement this in Windows? Just drop it in AppData\Local\Programs\Python\Python38-32\Lib\site-packages\ptpython and add a function to init.py or main.py to use it or something?

@treatmesubj
Copy link

treatmesubj commented Mar 3, 2020

Not sure if this is the best way to do this, but I just went into ptpython/python_input.py and changed self.insert_blank_line_after_output's bool to False, show_signature to True, and show_docstring to True. Probably have to pay attention to which things aren't compatible in menu if you do this.

@mgd722
Copy link

mgd722 commented Jun 2, 2020

i get this message:

~/.ptpython/config.py is deprecated, move your configuration to /Users/mike/Library/Application Support/ptpython/config.py

on macOS 10.15.2, so it would seem that the preferred config location has changed again?

@Aeron
Copy link

Aeron commented Dec 7, 2020

@mgd722 looks like you’re correct. I’ve faced a similar problem. Probably, those are appdirs changes rather than ptpython’s.

I solved it by sym-linking ~/.config/ptpython/config.py to ~/Library/Application Support/ptpython/config.py. It should work for any modern $XDG_CONFIG_HOME definition.

Thanks for pointing it out; it helped a lot.

@skrat
Copy link

skrat commented Feb 15, 2021

I don't think having users editing the config.py is the way to go. If there's GUI for that, then all I need is a Save command, as opposed to going and studying ptpython's configuration types. That kind of negates the point of having the GUI there, doesn't it?

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

Successfully merging a pull request may close this issue.

6 participants