Re: [Pyzo] how to execute python magics from script

2017-01-30 Thread dietrich . pescoller
.py (where the entry points for executing a file > > are). > >   > > I am wary of forcing a reload for each module in the user directory. Maybe > > we can keep track of the file’s modified times to only reload those that > > changed? Let’s make a start and see how it

Re: [Pyzo] IEP and __file__

2016-10-07 Thread Dietrich Pescoller
I had the same issue recently. What would be the best way in a script to get its own filename than? Thanks, Dietrich Il giorno martedì 13 ottobre 2015 22:32:24 UTC+2, Almar Klein ha scritto: > > __file__ is only present when running a file as script. Similar to how > there is no __file__ in

Re: [Pyzo] how to execute python magics from script

2016-10-07 Thread Dietrich Pescoller
at you’re > trying to achieve? Maybe there are other ways to make it work. > > > > - Almar > > > > > > > > *From: *Dietrich Pescoller > *Sent: *27 September 2016 18:22 > *To: *Pyzo > *Subject: *[Pyzo] how to execute python magics fro

Re: [Pyzo] IEP and __file__

2016-10-10 Thread Dietrich Pescoller
anged now, would it work for you to put this at the top of > your file: > > > > __file__ = os.path.join(os.cwd(), ‘foo.py’) > > > > *From: *Dietrich Pescoller > *Sent: *10 October 2016 09:20 > *To: *Pyzo > *Cc: *dit...@gmail.com ; proj...@gmail.com > *S

Re: [Pyzo] Strange behavior in console history

2016-10-10 Thread Dietrich Pescoller
, Almar Klein ha scritto: > > That’s probably possible. But typing that code into the logger shell each > time would be tedious. So you’d have to modify the Pyzo source code. > > > > > > *From: *Dietrich Pescoller > *Sent: *10 October 2016 09:23 > *To: *Pyzo >

Re: [Pyzo] Very strange/possibly dangerous behaviour of %edit

2016-10-01 Thread Dietrich Pescoller
> think that the file is closed emmidiately, so it runs it at once. > > > > Therefore, I’d suggest to not use this command, but use “open some_object“ > instead. > > > > - Almar > > > > > > > > *From: *Dietrich Pescoller > *Sen

Re: [Pyzo] IEP and __file__

2016-10-11 Thread Dietrich Pescoller
n that there is no __file__ when you run the Python interpreter > interactively, without running a script. In your example you do run a > ascript. Try: > > > > $ python > > >> __file__ > > Traceback (most recent call last): > > File "", line

Re: [Pyzo] Strange behavior in console history

2016-10-11 Thread Dietrich Pescoller
/pyzo/pyzo/issues/248 > > > > > > > > *From: *Dietrich Pescoller > *Sent: *10 October 2016 14:39 > *To: *Pyzo > *Cc: *dit...@gmail.com > *Subject: *Re: [Pyzo] Strange behavior in console history > > > > Ok, > was thinking there is just a simple line/command to typ

Re: [Pyzo] IEP and __file__

2016-10-10 Thread Dietrich Pescoller
ctory when a file is run > also if its *not* run as a script. In this case practicality beats purity, > plus the current directory is expected to be more dynamic than the value of > __file__. > > > > - Almar > > > > > > > > *From: *Dietrich Pescoller &

Re: [Pyzo] Ipython autocompletion

2016-12-19 Thread dietrich . pescoller
On Monday, December 19, 2016 at 10:43:02 AM UTC+1, Almar Klein wrote: > Although IPython can be integrated with Pyzo’s shell, they use a different > autocompletion mechanism. >   > > From: dietrich@microgate.it > Sent: 16 December 2016 15:29 > To: Pyzo > Subject: [Pyzo] Ipython

[Pyzo] Re: Run File (Interactive mode) changes the working directory

2017-07-04 Thread Dietrich Pescoller
In your scenario wouldn't it be better to put your root folder to python's path? I find the rule of change directory before running a script very useful and more strightforward... ... anyway to have a configurable option will be the best solution for this. Bye, diti Il giorno lunedì 3 luglio