Re: ipython in different loctions.

2019-10-05 Thread Cameron Simpson
On 03Oct2019 00:45, Hongyi Zhao wrote: On Thu, 03 Oct 2019 10:19:23 +1000, Cameron Simpson wrote: bash -x ~/.pyenv/shims/ipython3 and see what its final command does. Tried as follows: - werner@localhost:~$ bash -x ~/.pyenv/shims/ipython3 [...] + exec /home/werner/.pyenv/

Get __name__ in C extension module

2019-10-05 Thread Ian Pilcher
On 10/4/19 4:30 PM, Ian Pilcher wrote: Ideally, I would pass my existing Logging.logger object into my C function and use PyObject_CallMethod to call the appropriate method on it (info, debug, etc.). As I've researched this further, I've realized that this isn't the correct approach. My extens

Re: pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Terry Reedy
On 10/5/2019 10:49 AM, Dennis Lee Bieber wrote: On Sat, 5 Oct 2019 16:24:14 +0200, Friedrich Rentsch declaimed the following: Thank you, Peter. I guess, then, that not only 'inspect', but the compiler as well reads source off the line cache and clearing the latter would make 'reload' work as

Re: pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Peter Otten
Friedrich Rentsch wrote: > > > On 10/5/19 2:48 PM, Peter Otten wrote: >> Friedrich Rentsch wrote: >> >>> Hi all, >>> >>> Python 2.7. I habitually work interactively in an Idle window. >>> Occasionally I correct code, reload and find that edits fail to load. I >>> understand that reloading is not

Re: pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Terry Reedy
On 10/5/2019 10:24 AM, Friedrich Rentsch wrote: Thank you, Peter. I guess, then, that not only 'inspect', but the compiler as well reads source off the line cache and clearing the latter would make 'reload' work as expected. Are there other snags lurking, that you advise against using 'reload'

Re: pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Friedrich Rentsch
On 10/5/19 2:48 PM, Peter Otten wrote: Friedrich Rentsch wrote: Hi all, Python 2.7. I habitually work interactively in an Idle window. Occasionally I correct code, reload and find that edits fail to load. I understand that reloading is not guaranteed to reload everything, but I don't unders

Re: pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Peter Otten
Friedrich Rentsch wrote: > Hi all, > > Python 2.7. I habitually work interactively in an Idle window. > Occasionally I correct code, reload and find that edits fail to load. I > understand that reloading is not guaranteed to reload everything, but I > don't understand the exact mechanism and woul

pre-edit stuff persists in a reloaded a module

2019-10-05 Thread Friedrich Rentsch
Hi all, Python 2.7. I habitually work interactively in an Idle window. Occasionally I correct code, reload and find that edits fail to load. I understand that reloading is not guaranteed to reload everything, but I don't understand the exact mechanism and would appreciate some illumination. R