Hello Lie Ryan,

    Thanks so much for your reply.  Well when I ran:

whereis python

I get this:

python: /usr/bin/python3.1-config /usr/bin/python2.6-dbg /usr/bin/python3.1 /usr/bin/python2.6-config /usr/bin/python2.7 /usr/bin/python3.1-dbg-config /usr/bin/python2.6-dbg-config /usr/bin/python /usr/bin/python2.7-config /usr/bin/python3.1-dbg /usr/bin/python2.6 /etc/python3.1 /etc/python2.7 /etc/python /etc/python2.6 /usr/lib/python2.5 /usr/lib/python3.1 /usr/lib/python2.7 /usr/lib/python /usr/lib/python2.6 /usr/local/bin/python3.2m-config /usr/local/bin/python3.2 /usr/local/bin/python3.2-config /usr/local/bin/python3.2m /usr/local/lib/python3.1 /usr/local/lib/python2.7 /usr/local/lib/python3.2 /usr/local/lib/python2.6 /usr/include/python2.5 /usr/include/python3.1 /usr/include/python2.6_d /usr/include/python2.7 /usr/include/python3.1_d /usr/include/python2.6 /usr/share/python /opt/py31/bin/python3.1-config /opt/py31/bin/python3.1 /opt/py32/bin/python3.2m-config /opt/py32/bin/python3.2 /opt/py32/bin/python3.2m /opt/ActivePython-3.1/bin/python3.1-config /opt/ActivePython-3.1/bin/python3.1 /opt/ActivePython-3.2/bin/python3.2m-config /opt/ActivePython-3.2/bin/python3.2 /opt/ActivePython-3.2/bin/python3.2-config /opt/ActivePython-3.2/bin/python3.2m /usr/share/man/man1/python.1.gz

And, when I run:

echo $PATH

I get this:

/myhome/myname/.local/bin:/opt/ActivePython-3.2/bin:/myhome/myname/Komodo-IDE-6/bin:/myhome/myname/source/arduino-0022:/myhome/myname/qtsdk-2010.05/bin:/usr/bin//tclsh8.4:/usr/bin//tclsh8.5:/myhome/myname/source/Logic1.1.4:/myhome/myname/source/blender-2.56a-beta-linux-glibc27-i686:/myhome/myname/source/processing-1.2.1:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/blender-2.56-beta-linux-glibc27-i686/2.56/python/lib/python3.1


This is the link to the instructions that I followed to install Python3.2 on my system:

http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Troubleshooting


     Compiling with Ubuntu

# get required packages for build
sudo  apt-get  install  build-essential libncursesw5-dev libreadline5-dev 
libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev

# get source
wget  http://www.python.org/ftp/python/3.2/Python-3.2.tgz&&;  tar  -xvf  
Python-3.2.tgz

# make install
./configure
make
sudo  make  altinstall

# make 3.2 the default python system wide (number 1 at the end stays there)
sudo  update-alternatives--install  /usr/bin/python pythonopt/py32/bin1

# ensure various versions of python play nice with each other
sudo  update-alternatives--config  python


Again I really appreciate your help, getting over this hurdle would help me be 
confident in what goes on under the hood.
At this point, it seems that I will need instructions on how to remove 
python3.2 in order to get a reattempt at installing it
properly.




Thanks again for all your help.

Best Regards,

freespark



On 04/09/2011 06:00 AM, tutor-requ...@python.org wrote:
Send Tutor mailing list submissions to
        tutor@python.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.python.org/mailman/listinfo/tutor
or, via email, send a message with subject or body 'help' to
        tutor-requ...@python.org

You can reach the person managing the list at
        tutor-ow...@python.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tutor digest..."


Today's Topics:

    1. Re: How to use a module when only import package (Karim)
    2. Re: Sound question (Alan Gauld)
    3. Python 3.2 Install Not Responding To Python Command!!
       (Nevins Duret)
    4. Re: Sound question (Nick Stinemates)
    5. Re: Python 3.2 Install Not Responding To Python Command!!
       (Lie Ryan)
    6. Re: Evaluating program running time? (Lie Ryan)


----------------------------------------------------------------------

Message: 1
Date: Fri, 08 Apr 2011 23:44:06 +0200
From: Karim<karim.liat...@free.fr>
To: leechau<char...@sohu.com>
Cc: Python Tutor Maillist<tutor@python.org>
Subject: Re: [Tutor] How to use a module when only import package
Message-ID:<4d9f81a6.2060...@free.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 04/08/2011 11:13 AM, leechau wrote:
Steven wrote:
leechau wrote:
I wrote module1 in package1, and want to use a method named
'method1' in
module1, the caller(test.py) is like this:

import package1
package1.module1.method1()
[...]
When i run test.py, the output is:
AttributeError: 'module' object has no attribute 'module1'
File "e:\MyDoc\GODU_BVT\test.py", line 2, in<module>
   package1.module1.method1()

If test.py is modified to:
import package1.module1
...
then everything goes well.
Yes, that is correct, and that is a deliberate design.

What if your package had a 1000 sub-modules, each of which were big? You
wouldn't want loading the main package to automatically load all 1000
sub-modules, if you only needed 1.

You either import the sub-module by hand:

import package1.module1

and now you can use package1.module1.method1 (not really a method,
actually a function). If you want module1 to automatically be available
after importing the package, include one of these in the package1
__init__.py file:

import module1  # should work in Python 2


and now package1 will include the module1 in its namespace.


--
Steven
Thanks for Steven's exellent and patient explanations. How should I do
if automatically import a module in Python 3? Thanks again.

--
leechau
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Hello,

Test it simply!
You will get answer in 3 seconds.

;o)
Regards
Karim


------------------------------

Message: 2
Date: Sat, 9 Apr 2011 01:12:55 +0100
From: "Alan Gauld"<alan.ga...@btinternet.com>
To: tutor@python.org
Subject: Re: [Tutor] Sound question
Message-ID:<ino8ab$lkq$1...@dough.gmane.org>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
        reply-type=original


"Jan Erik Mostr?m"<li...@mostrom.pp.se>  wrote

A couple of my students need to be able to play sounds, ...

I looked around and found several packages but they all
seem to have some kind platform restrictions.
Sound tends to be platform specific but pygame seems
to have hidden most of that. Then again it may not offer
all the facilities the dedicated packages do, and it may
be a bit heavyweight for sound alone. But worth a look see.

Personally I've only played with it on Windows but it
claims to work across platforms...

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to