Discussion:
[Pyzo] User defined alias in ipython profile not recognised
Krishnan V
2018-04-01 16:50:35 UTC
Permalink
Hi,
I use Pyzo for its speed and would like to thank the developers at the
outset.
I added an alias to ipython, saved it to the default profile file
~/.ipython/profile_default/ipython_config.py
It is a very simple alias really, just printing the file names instead of
all the information which ls gives.
If i launch ipython from command-line(anaconda prompt), the alias works.
From Spyder's ipython, the alias workds. unfortunately, from pyzo's
ipython, this does not. I have enabled "use ipython if available" option in
the shell configurations. There is only one python and this is windows.
Ipython: 6.2.1
pyzo: 4.5.0
python: 3.6.2
I wonder if this has something to do with pyzo, and can someone please help?
regards
Krishnan
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Almar Klein
2018-04-03 10:17:41 UTC
Permalink
Hi Krishnan,

I'm glad you like Pyzo!

I am not entirely sure if I understand it correctly. With alias do you
mean a Linux command alias?
Have you update the shell configuration to use this new command?
What kind of error message does the shell give you?

Regards,
  Almar
Post by Krishnan V
Hi,
I use Pyzo for its speed and would like to thank the developers at the
outset.
I added an alias to ipython, saved it to the default profile file
~/.ipython/profile_default/ipython_config.py
It is a very simple alias really, just printing the file names instead
of all the information which ls gives.
If i launch ipython from command-line(anaconda prompt), the alias
works. From Spyder's ipython, the alias workds. unfortunately, from
pyzo's ipython, this does not. I have enabled "use ipython if
available" option in the shell configurations. There is only one
python and this is windows.
Ipython: 6.2.1
pyzo: 4.5.0
python: 3.6.2
I wonder if this has something to do with pyzo, and can someone please help?
regards
Krishnan
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Krishnan V
2018-04-03 13:54:57 UTC
Permalink
Hi,
thanks for your reply. i have used pyzo from its iep days also!
Ok, by alias i meant an ipython alias. let me elaborate a bit more. On
Windows, if i type ls on ipython, i get all listing inclding directory and
file sized. sometimes it is contributes to visual clutter. alias maps to
dir /on. So, on ipython i just created new alias by using command alias
vdir ls /b. now the problem is that when i close the session, this alias
is not persistent. and even if i keep the current terminal/session open but
if i open another session in parallel, this new alias does not appear
there. So, i want this alias to be "permanent". One way of achieving this
is to stick in the alias in the ipython config file. i create ipython
config default and in the ~/.ipython/default_config file, i stick in this
alias. So far so good. If i open the ipython from anaconda shell, i can
type this alias and get the expected outcome(file and directory names). But
if i open the ipython shell inside pyzo and type vdir, i get error:
<ipython-input-1-somestuff> in module()
--------->1 vdir
NameError: name 'vdir' not defined.

I was thinking if this is related to pyzo? Because ipython from terminal
and also from Spyder recognise this new alias i created. This ls and vdir
may be trivial usage and i still continue to use pyzo by typing ls or
remember to type alias everytime; or maybe have some init file. However, I
just want to check if there is something I am missing or something to do
with pyzo.
I hope this is clearer..?
Thank for response.
Regards
Krishnan
Post by Almar Klein
Hi Krishnan,
I'm glad you like Pyzo!
I am not entirely sure if I understand it correctly. With alias do you
mean a Linux command alias?
Have you update the shell configuration to use this new command?
What kind of error message does the shell give you?
Regards,
Almar
Post by Krishnan V
Hi,
I use Pyzo for its speed and would like to thank the developers at the
outset.
I added an alias to ipython, saved it to the default profile file
~/.ipython/profile_default/ipython_config.py
It is a very simple alias really, just printing the file names instead of
all the information which ls gives.
If i launch ipython from command-line(anaconda prompt), the alias works.
From Spyder's ipython, the alias workds. unfortunately, from pyzo's
ipython, this does not. I have enabled "use ipython if available" option in
the shell configurations. There is only one python and this is windows.
Ipython: 6.2.1
pyzo: 4.5.0
python: 3.6.2
I wonder if this has something to do with pyzo, and can someone please help?
regards
Krishnan
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
egroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Almar Klein
2018-04-04 07:45:54 UTC
Permalink
Ah! Thanks for clarifying. Top be fair, the IPython support in Pyzo is
not optimal (and I never use it myself).

The first thing that comes to mind is that perhaps the config file will
need to be loaded by Pyzo explicitly. You could try to see whether this
is the problem by raising an error in it (or make it syntactically
invalid) and then starting IPython and a Pyzo kernel and see what
happens. If the Pyzo kernel starts up normally, we know that there has
been no attempt to load the config file, and we should probably add that.

Regads,
  Almar
Post by Krishnan V
Hi,
thanks for your reply. i have used pyzo from its iep days also!
Ok, by alias i meant an ipython alias. let me elaborate a bit more. On
Windows, if i type ls on ipython, i get all listing inclding directory
and file sized. sometimes it is contributes to visual clutter. alias
maps to  dir /on. So, on ipython i just created new alias by using
command alias vdir ls /b.  now the problem is that when i close the
session, this alias is not persistent. and even if i keep the current
terminal/session open but if i open another session in parallel, this
new alias does not appear there. So, i want this alias to be
"permanent". One way of achieving this is to stick in the alias in the
ipython config file.  i create ipython config default and in the
~/.ipython/default_config file, i stick in this alias. So far so good.
If i open the ipython from anaconda shell, i can type this alias and
get the expected outcome(file and directory names). But if i open the
<ipython-input-1-somestuff> in module()
--------->1 vdir
NameError: name 'vdir' not defined.
I was thinking if this is related to pyzo? Because ipython from
terminal and also from Spyder recognise this new alias i created. This
ls and vdir  may be trivial usage and i still continue to use pyzo by
typing ls or remember to type alias everytime; or maybe have some init
file.  However, I just want to check if there is something I am
missing or something to do with pyzo.
I hope this is clearer..?
Thank for response.
Regards
Krishnan
Hi Krishnan,
I'm glad you like Pyzo!
I am not entirely sure if I understand it correctly. With alias do
you mean a Linux command alias?
Have you update the shell configuration to use this new command?
What kind of error message does the shell give you?
Regards,
  Almar
Hi,
I use Pyzo for its speed and would like to thank the
developers at the outset.
I added an alias to ipython, saved it to the default profile
file ~/.ipython/profile_default/ipython_config.py
It is a very simple alias really, just printing the file names
instead of all the information which ls gives.
If i launch ipython from command-line(anaconda prompt), the
alias works. From Spyder's ipython, the alias workds.
unfortunately, from pyzo's ipython, this does not. I have
enabled "use ipython if available" option in the shell
configurations. There is only one python and this is windows.
Ipython: 6.2.1
pyzo: 4.5.0
python: 3.6.2
I wonder if this has something to do with pyzo, and can
someone please help?
regards
Krishnan
--
You received this message because you are subscribed to the
Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Krishnan V
2018-04-04 17:44:02 UTC
Permalink
Hello !
Yes ipython is slightly under utilised in pyzo but no complaints. I will
try what you suggested and report back. As of now i think it is the
problem as i put my alias in ipython config file. Another observation is
Ipython in pyzo cannot auto complete directories by hitting tab.
Which terminal do you use if not ipython?
Regards
Krishnan
Ah! Thanks for clarifying. Top be fair, the IPython support in Pyzo is not
optimal (and I never use it myself).
The first thing that comes to mind is that perhaps the config file will
need to be loaded by Pyzo explicitly. You could try to see whether this is
the problem by raising an error in it (or make it syntactically invalid)
and then starting IPython and a Pyzo kernel and see what happens. If the
Pyzo kernel starts up normally, we know that there has been no attempt to
load the config file, and we should probably add that.
Regads,
Almar
Hi,
thanks for your reply. i have used pyzo from its iep days also!
Ok, by alias i meant an ipython alias. let me elaborate a bit more. On
Windows, if i type ls on ipython, i get all listing inclding directory and
file sized. sometimes it is contributes to visual clutter. alias maps to
dir /on. So, on ipython i just created new alias by using command alias
vdir ls /b. now the problem is that when i close the session, this alias
is not persistent. and even if i keep the current terminal/session open but
if i open another session in parallel, this new alias does not appear
there. So, i want this alias to be "permanent". One way of achieving this
is to stick in the alias in the ipython config file. i create ipython
config default and in the ~/.ipython/default_config file, i stick in this
alias. So far so good. If i open the ipython from anaconda shell, i can
type this alias and get the expected outcome(file and directory names). But
<ipython-input-1-somestuff> in module()
--------->1 vdir
NameError: name 'vdir' not defined.
I was thinking if this is related to pyzo? Because ipython from terminal
and also from Spyder recognise this new alias i created. This ls and vdir
may be trivial usage and i still continue to use pyzo by typing ls or
remember to type alias everytime; or maybe have some init file. However, I
just want to check if there is something I am missing or something to do
with pyzo.
I hope this is clearer..?
Thank for response.
Regards
Krishnan
Post by Almar Klein
Hi Krishnan,
I'm glad you like Pyzo!
I am not entirely sure if I understand it correctly. With alias do you
mean a Linux command alias?
Have you update the shell configuration to use this new command?
What kind of error message does the shell give you?
Regards,
Almar
Post by Krishnan V
Hi,
I use Pyzo for its speed and would like to thank the developers at the
outset.
I added an alias to ipython, saved it to the default profile file
~/.ipython/profile_default/ipython_config.py
It is a very simple alias really, just printing the file names instead
of all the information which ls gives.
If i launch ipython from command-line(anaconda prompt), the alias works.
From Spyder's ipython, the alias workds. unfortunately, from pyzo's
ipython, this does not. I have enabled "use ipython if available" option in
the shell configurations. There is only one python and this is windows.
Ipython: 6.2.1
pyzo: 4.5.0
python: 3.6.2
I wonder if this has something to do with pyzo, and can someone please help?
regards
Krishnan
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Almar Klein
2018-04-05 12:20:25 UTC
Permalink
Great!
Another observation is  Ipython in pyzo cannot auto complete
directories by hitting tab.

Yes, this is because Pyzo does not make use of IPython's autocompletion
mechanism.
Which terminal do you use if not ipython?
The standard OS prompt and Xonsh.

Regards,
  Almar
Hello !
Yes ipython is slightly under utilised in pyzo but no complaints. I
will try what you suggested and report back.  As of now i think it is
the problem as i put my alias in ipython config file. Another
observation is  Ipython in pyzo cannot auto complete directories by
hitting tab.
Which terminal do you use if not ipython?
Regards
Krishnan
Ah! Thanks for clarifying. Top be fair, the IPython support in
Pyzo is not optimal (and I never use it myself).
The first thing that comes to mind is that perhaps the config file
will need to be loaded by Pyzo explicitly. You could try to see
whether this is the problem by raising an error in it (or make it
syntactically invalid) and then starting IPython and a Pyzo kernel
and see what happens. If the Pyzo kernel starts up normally, we
know that there has been no attempt to load the config file, and
we should probably add that.
Regads,
  Almar
Post by Krishnan V
Hi,
thanks for your reply. i have used pyzo from its iep days also!
Ok, by alias i meant an ipython alias. let me elaborate a bit
more. On Windows, if i type ls on ipython, i get all listing
inclding directory and file sized. sometimes it is contributes to
visual clutter. alias maps to  dir /on. So, on ipython i just
created new alias by using command alias vdir ls /b.  now the
problem is that when i close the session, this alias is not
persistent. and even if i keep the current terminal/session open
but if i open another session in parallel, this new alias does
not appear there. So, i want this alias to be "permanent". One
way of achieving this is to stick in the alias in the ipython
config file.  i create ipython config default and in the
~/.ipython/default_config file, i stick in this alias. So far so
good. If i open the ipython from anaconda shell, i can type this
alias and get the expected outcome(file and directory names). But
<ipython-input-1-somestuff> in module()
--------->1 vdir
NameError: name 'vdir' not defined.
I was thinking if this is related to pyzo? Because ipython from
terminal and also from Spyder recognise this new alias i created.
This ls and vdir  may be trivial usage and i still continue to
use pyzo by typing ls or remember to type alias everytime; or
maybe have some init file.  However, I just want to check if
there is something I am missing or something to do with pyzo.
I hope this is clearer..?
Thank for response.
Regards
Krishnan
On Tue, Apr 3, 2018 at 3:47 PM, Almar Klein
Hi Krishnan,
I'm glad you like Pyzo!
I am not entirely sure if I understand it correctly. With
alias do you mean a Linux command alias?
Have you update the shell configuration to use this new command?
What kind of error message does the shell give you?
Regards,
  Almar
Hi,
I use Pyzo for its speed and would like to thank the
developers at the outset.
I added an alias to ipython, saved it to the default
profile file ~/.ipython/profile_default/ipython_config.py
It is a very simple alias really, just printing the file
names instead of all the information which ls gives.
If i launch ipython from command-line(anaconda prompt),
the alias works. From Spyder's ipython, the alias workds.
unfortunately, from pyzo's ipython, this does not. I have
enabled "use ipython if available" option in the shell
configurations. There is only one python and this is windows.
Ipython: 6.2.1
pyzo: 4.5.0
python: 3.6.2
I wonder if this has something to do with pyzo, and can
someone please help?
regards
Krishnan
--
You received this message because you are subscribed to
the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the
Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...