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
.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
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/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
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
, 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
>
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
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
&
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
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
> 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
11 matches
Mail list logo