Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-14 Thread Dave WB3DWE
>The python 3 version in the 9.10 repo is 3.1.1
>
>Actually, if I/O is important, I'd recommend a full install of 9.10 so that
>you can get the ext4 file system. I have found it offers some very
>impressive speedups with the disk -- especially for deleting files.

Thanks casevh and Lee.
I intend to remove all versions python 3, update Ubuntu to 9.10
and then do a clean installation of python 3.1.1 via Synaptic.
Dave  WB3DWE
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-13 Thread Lee Harr

>> When you first had this problem, was python3 installed from
>> source, or was it from the Ubuntu repository?


> Over a month ago I downloaded the tarball Python-3.1.1 from
> the python website.  Then the Synaptic Package Manager did not
> contain this ( latest ) version. There is already python 2.x on my
> Ubuntu 9.04 ( think its 2.6 ).  Think I saw 3.0 on Synaptic but
> not 3.1  Supposedly 3.1 has faster i/o .


If you are mostly using your Ubuntu system to work with Python 3.1,
I recommend upgrading to 9.10 if that is not a big problem.

The python 3 version in the 9.10 repo is 3.1.1

Actually, if I/O is important, I'd recommend a full install of 9.10 so that
you can get the ext4 file system. I have found it offers some very
impressive speedups with the disk -- especially for deleting files.

  
_
Windows Live: Keep your friends up to date with what you do online.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-12 Thread casevh
On Jan 12, 9:03 pm, Dave WB3DWE wrote:
> On Sun, 10 Jan 2010 22:08:20 -0800 (PST), casevh 
> wrote:
>
>
>
>
>
> >On Jan 10, 8:16 pm, Dave WB3DWE wrote:
> >> On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh 
> >> wrote:
>
> >> >On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote:
> >> >> On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh 
> >> >> wrote:
>
> >Are you sure you are using the new version of python3.1 (the one
> >located in /usr/local/bin/)?
>
> >What is the result of "which python3.1"?
>
> >What happens if you run "/usr/local/bin/python3.1"?
>
> >casevh
>
> You're correct : there are now two versions of Python 3 on my machine.
>
> Two weeks ago when I installed the Python-3.1.1 from the tarball somehow
> it got called up with "python3" .  Thats what I've continued to run and
> now has all the errors.
>
> in my usr/local/bin are
>     2to3  idle3  pydoc3  python3  python3.1  python3.1-config  and,
>         in light blue, python3-config
>
> Running  " python3.1 "  solves _most_ of the problems :
>     It imports the random & time modules and runs most of my modules in
> the pycode dir.
>     The libreadline5-dev works fine and all my issues with the keys are
> gone. I'm astonished.
>
> However now my modules that import  msvcrt  will not run.  I use this
> for single char keyboard input.  Trying to import msvcrt yields
>     InputError : No module named msvcrt
> I believe a module using this ran before recompilation.  Furthermore I
> can find  msvcrtmodule.c in  /home/dave/python31/Python-3.1.1/PC
> and msvcrt.rst in /home/dave/python31/Python-3.1.1/Doc/library
> I use this a lot.  Suppose I should now learn curses module.
>
> Thanks for everything         Dave WB3DWE      pdlem...@earthlink.net- Hide 
> quoted text -
>
> - Show quoted text -

msvcrt provides support for the MicroSoft Visual C RunTime so it won't
run on Ubuntu.

The files that you see are the source code and documentation but the
source code is only compiled on Windows.

casevh
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-12 Thread Dave WB3DWE
On Wed, 13 Jan 2010 03:29:05 +0430, Lee Harr 
wrote:
>When you first had this problem, was python3 installed from
>source, or was it from the Ubuntu repository? 
>
>(ie, did you install using apt-get or synaptic or did you just start
>out building from source?)
>
>I have python 3 on Ubuntu 9.10 installed using synaptic and
>readline works fine.
>
>If yours was from the repo, it's possible that the problem is not
>python, but your terminal emulator. Which terminal program
>are you using (xterm, konsole, gnome-terminal, etc)?

Lee ,

Over a month ago I downloaded the tarball Python-3.1.1 from
the python website.  Then the Synaptic Package Manager did not
contain this ( latest ) version. There is already python 2.x on my 
Ubuntu 9.04 ( think its 2.6 ).  Think I saw 3.0 on Synaptic but
not 3.1  Supposedly 3.1 has faster i/o .

I know less about Ubuntu than python. I struggled with Linux for 
several weeks. On Jan 2  I attempted installation ( in dir containing
Python-3.1.1 ) with :
$  ./configure
$  make
$  make test
$  sudo make install

Did not seem to work ( didn't record exactly what happened, perhaps
I didn't put in sudo ), so I ran above again.  Did not use altinstall.

Did not get the tarball with apt-get or from Synaptic.  Just downloaded
it from python site.  The readme gave the "build" instructions above.

I've exclusively used gnome.  Quite happy with gedit's handling of
python code.

I shouldn't have been greedy and should have settled for 3.0
from Synaptic.

Now I have problems with three versions on my machine.  Please see
my exchanges with casevh for details.

Perhaps the best solution would be to wipe off all 3.1 versions and
simply install 3.0 from Synaptic.

This whole thing with the Python interactive interpreter keys actually
started with my sons, who are Mac enthusiasts. One gave me a MacBook.
Alas the Python interpreter keys were fouled up, as well as it having a
"simplified" keyboard. Apple took it back, but it was disconcerting when
I found the same key problem in Ubuntu python 3.1  Apple must change
their software as I retried a new MacBook yesterday. To my great
surprise the python 2.6 interpreter worked fine, while on at least two
MacBooks last month it did not.

Thanks for your help, Dave pdlem...@earthlink.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-12 Thread Dave WB3DWE
On Sun, 10 Jan 2010 22:08:20 -0800 (PST), casevh 
wrote:

>On Jan 10, 8:16 pm, Dave WB3DWE wrote:
>> On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh 
>> wrote:
>>
>> >On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote:
>> >> On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh 
>> >> wrote:
>
>Are you sure you are using the new version of python3.1 (the one
>located in /usr/local/bin/)?
>
>What is the result of "which python3.1"?
>
>What happens if you run "/usr/local/bin/python3.1"?
>
>casevh

You're correct : there are now two versions of Python 3 on my machine.

Two weeks ago when I installed the Python-3.1.1 from the tarball somehow
it got called up with "python3" .  Thats what I've continued to run and
now has all the errors.

in my usr/local/bin are 
2to3  idle3  pydoc3  python3  python3.1  python3.1-config  and,
in light blue, python3-config

Running  " python3.1 "  solves _most_ of the problems :
It imports the random & time modules and runs most of my modules in
the pycode dir.
The libreadline5-dev works fine and all my issues with the keys are
gone. I'm astonished.

However now my modules that import  msvcrt  will not run.  I use this
for single char keyboard input.  Trying to import msvcrt yields 
InputError : No module named msvcrt
I believe a module using this ran before recompilation.  Furthermore I
can find  msvcrtmodule.c in  /home/dave/python31/Python-3.1.1/PC
and msvcrt.rst in /home/dave/python31/Python-3.1.1/Doc/library
I use this a lot.  Suppose I should now learn curses module.

Thanks for everything Dave WB3DWE  pdlem...@earthlink.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-12 Thread Lee Harr

> And my original problem still there : fouled up keys in interactive
> terminal.

When you first had this problem, was python3 installed from
source, or was it from the Ubuntu repository? 

(ie, did you install using apt-get or synaptic or did you just start
out building from source?)

I have python 3 on Ubuntu 9.10 installed using synaptic and
readline works fine.

If yours was from the repo, it's possible that the problem is not
python, but your terminal emulator. Which terminal program
are you using (xterm, konsole, gnome-terminal, etc)?

  
_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-10 Thread casevh
On Jan 10, 8:16 pm, Dave WB3DWE wrote:
> On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh 
> wrote:
>
> >On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote:
> >> On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh 
> >> wrote:
>
> >1) Try the commands again. Make sure all the "./configure" options are
> >on one line. Make sure to do "sudo make altinstall". (Don't use "sudo
> >make install"; it will give your version of Python the name "python"
> >and that can cause confusion on your system.)
>
> >2) Move your applications to another directory.
>
> >3) Try running "python3.1" while you are in that directory.
>
> >If this doesn't work, report back on the error messages you receive.
>
> Thanks casevh for your time & patience.
> The ./configure . . .  was a "continuous" line , although it ran over to
> next line even on 132 char wide terminal because of names of system &
> dir.  I was careful with the spaces and hyphens.
> In my reply the "make install" was a typo , I did run  make altinstall.
>
> Moved all my code to pycode dir on my home directory.  Removed all
> files from /usr/local/lib/python3.1/dlmodules and removed that dir.
>
> Twice ran the recompile :
>     make distclean
>     ./configure --prefix=/usr/local --with-computed-gotos
>             --with-wide-unicode
>         <^ one space>
>     make
>     sudo make altinstall
> After each reinstall had same problems :  cannot import  random  or
> any code using it, although random.py is in Lib :
>     Traceback
>         File "", line 1, in 
>         File "random.py", line 46, in 
>             import collections as _collections
>         File "collections.py", line 9 in 
>             from _collections import deque, default dict
>     ImportError: /usr/local/lib/python3.1/lib-dynload/collections.so:
>         undefined symbol: PyUnicodeUCS4_FromString
>
> After second reinstall today I also found that a module importing
>     "time"  would not run.  Likewise could not import  time  at  >>> .
> Same error, ending : undefined symbol: PyUnicode UCS4_FromString
>
> And my original problem still there : fouled up keys in interactive
> terminal. Seems minor now ; )   Should I try to remove everything
> and reopen the tarball ?
> Dave WB3DWE,  central Texas

Are you sure you are using the new version of python3.1 (the one
located in /usr/local/bin/)?

What is the result of "which python3.1"?

What happens if you run "/usr/local/bin/python3.1"?

casevh
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-10 Thread Dave WB3DWE
On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh 
wrote:

>On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote:
>> On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh 
>> wrote:
>
>1) Try the commands again. Make sure all the "./configure" options are
>on one line. Make sure to do "sudo make altinstall". (Don't use "sudo
>make install"; it will give your version of Python the name "python"
>and that can cause confusion on your system.)
>
>2) Move your applications to another directory.
>
>3) Try running "python3.1" while you are in that directory.
>
>If this doesn't work, report back on the error messages you receive.
>
Thanks casevh for your time & patience.
The ./configure . . .  was a "continuous" line , although it ran over to
next line even on 132 char wide terminal because of names of system &
dir.  I was careful with the spaces and hyphens.
In my reply the "make install" was a typo , I did run  make altinstall.

Moved all my code to pycode dir on my home directory.  Removed all
files from /usr/local/lib/python3.1/dlmodules and removed that dir. 

Twice ran the recompile :
make distclean
./configure --prefix=/usr/local --with-computed-gotos
--with-wide-unicode
<^ one space>
make
sudo make altinstall 
After each reinstall had same problems :  cannot import  random  or
any code using it, although random.py is in Lib :
Traceback
File "", line 1, in 
File "random.py", line 46, in 
import collections as _collections
File "collections.py", line 9 in 
from _collections import deque, default dict
ImportError: /usr/local/lib/python3.1/lib-dynload/collections.so:
undefined symbol: PyUnicodeUCS4_FromString

After second reinstall today I also found that a module importing
"time"  would not run.  Likewise could not import  time  at  >>> .
Same error, ending : undefined symbol: PyUnicode UCS4_FromString

And my original problem still there : fouled up keys in interactive
terminal. Seems minor now ; )   Should I try to remove everything
and reopen the tarball ?
Dave WB3DWE,  central Texas
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-09 Thread casevh
On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote:
> On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh 
> wrote:
> >Did you recompile Python 3.1.1 after installing libreadline5-dev?
>
> >(From the Python 3.1.1 directory. Your options to configure may vary.)
>
> >make distclean
> >./configure --prefix=/usr/local --with-computed-gotos --with-wide-
> >unicode
> >make
> >make altinstall
>
> >casevh
>
> Thanks so much for your help . . . but I'm going backwards, probably
> due to my inadequate knowledge of Linux.
>
> Ran the above vebatim, except had to do      sudo make install    .
> Python recompiled and the system appears to be in same path/dir as
> before :  /home/dave/python31/Python-3.1.1
> Called up interactive prompt  >>>  with  $ python3 , as before.
>

It looks like you now have two copies of Python 3.1.1 installed.
That's probably a side-effect of my instructions. I'll got through
each instruction individually.

It looks like your Python source code is in "/home/dave/python31/
Python-3.1.1". The commnad "make distclean" should remove the results
of the prior configuration so to won't need to extract the source code
again.

The command "./configure" accepts several options that control how the
source code is configured. To see all the available options, use the
command "./configure --help". The first option - "--prefix=/usr/local"
- identifies the location where Python 3.1.1 will be installed. The "/
usr/local" directory is a common location for user-compiled programs.
If no location is specified, many applications assume "/usr/local".
The option - "--with-computed-gotos" - is just a compiler options that
produces a slightly faster interpreter. The final option - "--with-
wide-unicode" - identifies the proper Unicode format to use. (I looks
like this option may have been split via line wrapping on my earlier
email. I think it is causing the UCS4 error.)

The command "make" compiles Python 3.1.1.

The command "sudo make altinstall" installs Python 3.1.1 under the "/
usr/local" directory. The option "altinstall" installs Python 3.1.1
and leaves its name as "python3.1". It should be located in "/usr/
local/bin/python3.1".

Your own programs (Ackermann.py) should be kept somewhere in your home
directory, for example "/home/dave/code". Typing "python3.1" will look
in the current directory first, and then search the path where it
should find "/usr/local/bin/python3.1".

What will you need to do fix this?

1) Try the commands again. Make sure all the "./configure" options are
on one line. Make sure to do "sudo make altinstall". (Don't use "sudo
make install"; it will give your version of Python the name "python"
and that can cause confusion on your system.)

2) Move your applications to another directory.

3) Try running "python3.1" while you are in that directory.

If this doesn't work, report back on the error messages you receive.

Don't give up; we can fix this.

casevh
> Problems :
>     1. prompt keys remain fouled up as before.
>     2. will not import  random  module, either from prompt or
>             from any of my prewritten modules.  Get ImportError
>            /usr/local/lib/Python3.1/lib-dynload/_collections.so :
>             undefined symbol : PyUnicode UCS4_FromString
>                 Some other modules will import : math , sys, os
>     3. Some of my pre-existing modules will not run : have
>           not checked them all, but apparently those with random.
>     4. Attempted to read my modules with gedit.  Pulls them
>           up but refuses to save :          could not save file
>           /usr/local/lib/python3.1/dlmodules/Ackermann.py
>                You do not have permission necessary to save file.
>           This is same path my modules were in before the
>           recompile and the dir I made for them. Had no trouble
>           saving them previously.
>
> If no fix available, I'll reinstall from the Python-3.1.1 that
> I extracted from the tarball , and go back to XP for a while  : (
>
> Dave WB3DWE       pdlem...@earthlink.net

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-09 Thread pdlemper
On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh 
wrote:

>
>Did you recompile Python 3.1.1 after installing libreadline5-dev?
>
>(From the Python 3.1.1 directory. Your options to configure may vary.)
>
>make distclean
>./configure --prefix=/usr/local --with-computed-gotos --with-wide-
>unicode
>make
>make altinstall
>
>casevh

Thanks so much for your help . . . but I'm going backwards, probably
due to my inadequate knowledge of Linux.

Ran the above vebatim, except had to do  sudo make install.
Python recompiled and the system appears to be in same path/dir as
before :  /home/dave/python31/Python-3.1.1
Called up interactive prompt  >>>  with  $ python3 , as before.

Problems :
1. prompt keys remain fouled up as before.
2. will not import  random  module, either from prompt or
from any of my prewritten modules.  Get ImportError 
   /usr/local/lib/Python3.1/lib-dynload/_collections.so :
undefined symbol : PyUnicode UCS4_FromString
Some other modules will import : math , sys, os
3. Some of my pre-existing modules will not run : have
  not checked them all, but apparently those with random.
4. Attempted to read my modules with gedit.  Pulls them
  up but refuses to save :  could not save file
  /usr/local/lib/python3.1/dlmodules/Ackermann.py
   You do not have permission necessary to save file.
  This is same path my modules were in before the
  recompile and the dir I made for them. Had no trouble 
  saving them previously.

If no fix available, I'll reinstall from the Python-3.1.1 that 
I extracted from the tarball , and go back to XP for a while  : (

Dave WB3DWE   pdlem...@earthlink.net 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-09 Thread casevh
On Jan 9, 10:06 am, Dave WB3DWE wrote:
> On Jan 6 I inquired how to "fix" the 3.1.1 interactive terminal
> in Ubuntu Linux.   Left arrow yields ^[[D , etc.
>
> casevh helped by suggesting "libreadline5-dev" be installed.
> Did so with Synaptic Package Manager.
> The behavior of the Python 3.3.1 terminal is unchanged but
> the 2.6.2 terminal is corrected.
>
> Is there any way to fix the 3.1.1 terminal command line ?
>
> Thanks,     Dave WB3DWE      pdlem...@earthlink.net

Did you recompile Python 3.1.1 after installing libreadline5-dev?

(From the Python 3.1.1 directory. Your options to configure may vary.)

make distclean
./configure --prefix=/usr/local --with-computed-gotos --with-wide-
unicode
make
make altinstall

casevh
-- 
http://mail.python.org/mailman/listinfo/python-list


interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-09 Thread Dave WB3DWE
On Jan 6 I inquired how to "fix" the 3.1.1 interactive terminal
in Ubuntu Linux.   Left arrow yields ^[[D , etc. 

casevh helped by suggesting "libreadline5-dev" be installed.
Did so with Synaptic Package Manager.
The behavior of the Python 3.3.1 terminal is unchanged but
the 2.6.2 terminal is corrected.

Is there any way to fix the 3.1.1 terminal command line ?

Thanks, Dave WB3DWE  pdlem...@earthlink.net
-- 
http://mail.python.org/mailman/listinfo/python-list