Can I install Python 2.4 and 2.5 ?
I am reviewing various visualization programs (Scipy, PYGNL, etc) and IDE´s. Some run on Python 2.4 others in 2.5. Can I have both installed at the same time if I don´t run them concurrently? Now in Windows XP soon on Ubuntu 8 Appreciating your help, Adolfo -- http://mail.python.org/mailman/listinfo/python-list
Numpy not found
I downloaded and installed Phyton 2.52 (it works), numpy-1.0.4.win32- py2.5, and scipy-0.6.0.win32-py2.5 I can´t get Numpy to show up at Python´s IDLE, or command line. If I do: >>>> import Numeric # I get >>>> Traceback (most recent call last): File "", line 1, in import Numeric ImportError: No module named Numeric And if I do: >>>> import Numeric * # I get SyntaxError: invalid syntax I restarted the machine and double clicked in the same file numpy-1.0.4.win32-py2.5 again, it asked whether I wanted to reinstall or repair, I chose repair. I tried the same commands again after this but I got the same results. Next, I went o the Python25 "site packages" subdirectory and there I found "setup.py" and "readme.txt" files. I did run the setup with no changes and the readme file suggested to run the setup.py scrip. No changes. Any help with this mater will be much appreciated, Adolfo -- http://mail.python.org/mailman/listinfo/python-list
DISLIN Manual
I am at the very beginning of the DISLIN 9.3 Manual: 1.4 Quickplots Some quickplots are added to the DISLIN module which are collections of DISLIN routines for displaying data with one command. For example, the function ’plot’ displays two-dimensional curves. Example: from Numeric import * from dislin import * x = arange (100, typecode=Float32) plot (x, sin (x/5)) disfin () Problems: 1. "from Numeric import * " statement produced an error message, I had to replace it with "from numpy import *" 2. The "from dislin import *" statement produced an error message: Traceback (most recent call last): File "", line 1, in from dislin import * ImportError: No module named dislin I checked the environmental variables paths and they are according to instructions. What else to do? Any help will be much appreciated Adolfo -- http://mail.python.org/mailman/listinfo/python-list
DISLIN 9.3 starting issues
*** I thought I posted this subject 45 min ago but it does not show so something went wrong and it does not show up. Excuse me if I repeat myself *** DISLIN 9.3 old manual problems I just installed DISLIN 9.3 for python (DISPY is installed too) and I am up to: 1.4 Quickplots Some quickplots are added to the DISLIN module which are collections of DISLIN routines for displaying data with one command. For example, the function ’plot’ displays two-dimensional curves. Example: from Numeric import * from dislin import * x = arange (100, typecode=Float32) plot (x, sin (x/5)) disfin () I built the following little program: from numpy import * from dislin import * def main(): x = arange (100, typecode=Float32) plot (x, sin (x/5)) disfin () main() *** Here are the problems: 1. The "from Numeric import" statement did not work, I replaced with "from numpy import*" and no complains form the interpreter. 2. If I enyter "from dislin import *" I get: Traceback (most recent call last): File "", line 1, in from dislin import * ImportError: No module named dislin >>> I checked the environmental variables paths and it all seems Ok: c:\dislin SYSTEM PATH = %SystemRoot%\system32;%SystemRoot%;\System32;\Wbem;C: \Archivos de programa;\QuickTime;\QTSystem;C:\dislin\win PYTHON PATH = C:\Archivos de programa\ArcGIS\bin;c:\dislin\python WHAT ELSE TO DO? any help will be much apreciated -- http://mail.python.org/mailman/listinfo/python-list
Re: Looking for Fredrik Lundh; documentation and code examples for elementtree
On May 7, 4:43 pm, dj <[EMAIL PROTECTED]> wrote: > Hello All, > > I am trying to get in touch with Mr. Lundh. I am looking for exmaple > code regarding the use of elementtree. I have read through most of the > examples onhttp://effbot.organd I am hoping he can suggest some > others. Additionally, I am hoping he can give me an example use of the > comment method. I have tried a couple times, but I can not figure it > out. Thank you so very much. > > DJ Las address I had of him was: [EMAIL PROTECTED] good luck, Adolfo -- http://mail.python.org/mailman/listinfo/python-list
DISLIN 9.3 stuck
On May 7, 2:03 am, Weinhandl Herbert <[EMAIL PROTECTED]> wrote: > adolfo wrote: > > I built the following little program: > > > from numpy import * > > fromdislinimport * > > > def main(): > > x = arange (100, typecode=Float32) > > plot (x, sin (x/5)) > > disfin () > > > main() > > > *** Here are the problems: > > > 1. The "from Numeric import" statement did not work, I replaced with > > "from numpy import*" and no complains form the interpreter. > > > 2. If I enyter "fromdislinimport *" I get: > > Traceback (most recent call last): > > File "", line 1, in > > fromdislinimport * > > ImportError: No module nameddislin > > > I checked the environmental variables paths and it all seems Ok: > > c:\dislin > > SYSTEM PATH = %SystemRoot%\system32;%SystemRoot%;\System32;\Wbem;C: > > \Archivos de programa;\QuickTime;\QTSystem;C:\dislin\win > > PYTHON PATH = C:\Archivos de programa\ArcGIS\bin;c:\dislin\python > > the environment variable is PYTHONPATH and i has to contain the directory > where thedislin.pyd module can be found; ** Thank you for the comments: 1- The strange thing is that I went to the dislin directory in the C: drive and there was no disli.pyd file anywhere. I found the file in the My Documents subdirectory where I had originally unzipped the dislin archived files I downloaded and from where I run the setup. > you should set environment variableDISLINtoo > (see python.inf, which you can find in thedislin-distribution) 2 - Well I have followed the DISLIN 9.3 inf file for Python 2.5.2 for Windows. It contains commands for a unix command line "unzip -o dl_93_py.zip setup first and then... " and then: " Windows 98/ME Add the following commands to the autoexec.bat file PATH=c:\dislin\win;%PATH% SET DISLIN=c:\dislin SET PYTHONPATH=c:\dislin\python Windows NT/2000/XP/Vista The environment variables can be set or modified with the Control Panel (see -> Control Panel -> System -> Advanced -> Environment Variables)." *** I have followed all these directions but DISLIN still does not shop up as a module when making the Python calls. It keeps me entertained in spite that my productivity is cero ;-) Adolfo > > depending on your python version (2.4 or 2.5) you need the > correctdislin-distribution, becausedislinis a fortran/c library with > a layer for python access. > > and try some examples of the distribution (they are importing onlydislin > and math modules). > > hth > > Herbert -- http://mail.python.org/mailman/listinfo/python-list
DISLIN setup: can not open file map0.dat and all the others
I tried reinstalling the program and the DISLIN/PYTHON SETUP window showed up with the OK button almost covered by the cancel button. The window is too small so I extend the edges but the superimposed cancel button still on top. Using the edge of the OK button I press the arrow there and two windows are opened: * one says: can not open file map0.dat * the oher one is the Dislin setup window that shows the anme of the file ebing called, the path , and a completion type of slider. I accept the denial of fle map0.dat and one by one every other file comes with a denial. The strange thing is that the DISLIN setup windows are in Spanish. I wonder if because this machine has XP in Spanish is confusing the setup? Adolfo -- http://mail.python.org/mailman/listinfo/python-list
Python Math libraries - How to?
Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to upgrade the programs using math libraries nothing seems to work. I downloaded a 2002 tutorial from Zelle "An Introduction to Computer Science" where he uses a "import math" statement to calculate a square root. I tried the "pi" library function but it didn´t work. I tried using def Pi() it did not work either. I am yet to find a tutorial that explains how to declare (or initialize) and pass numbers to the functions such as "cos(x)" and the pi which does not have a variable in it. Is just a constant. Here is the arithmetic program I made that it worked before I added the "import math" line. I erased the constant p = 3.1416 and added the "i" for the library function "pi" in the algorithms. But I get an error message not recognizing "pi" #volumen.py # A program to compute the volume and surface area of a sphere import math def main(): print "This program calculates the volume and surface area of a sphere" print r = input("Please enter the radious: ") print r3 = r*r*r volume = 4/3*pi*r3 r2 = r*r surface = 4*pi*r2 print "The Volume is", volume, " Cubic centimeters" print print "The Surface area is", surface, " square centimeters" main() *** Error message * Traceback (most recent call last): File "C:/Python25/z - MIS PROGRAMAS/volumen-b.py", line 20, in main() File "C:/Python25/z - MIS PROGRAMAS/volumen-b.py", line 13, in main volume = 4/3*pi*r3 NameError: global name 'pi' is not defined -- http://mail.python.org/mailman/listinfo/python-list
Python Math libraries - How to?
Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to upgrade the programs using math libraries nothing seems to work. I downloaded a 2002 tutorial from Zelle "An Introduction to Computer Science" where he uses a "import math" statement to calculate a square root. I tried the "pi" library function but it didn´t work. I tried using def Pi() it did not work either. I am yet to find a tutorial that explains how to declare (or initialize) and pass numbers to the functions such as "cos(x)" and the pi which does not have a variable in it. Is just a constant. Here is the arithmetic program I made that it worked before I added the "import math" line. I erased the constant p = 3.1416 and added the "i" for the library function "pi" in the algorithms. But I get an error message not recognizing "pi" #volumen.py # A program to compute the volume and surface area of a sphere import math def main(): print "This program calculates the volume and surface area of a sphere" print r = input("Please enter the radious: ") print r3 = r*r*r volume = 4/3*pi*r3 r2 = r*r surface = 4*pi*r2 print "The Volume is", volume, " Cubic centimeters" print print "The Surface area is", surface, " square centimeters" main() *** Error message * Traceback (most recent call last): File "C:/Python25/z - MIS PROGRAMAS/volumen-b.py", line 20, in main() File "C:/Python25/z - MIS PROGRAMAS/volumen-b.py", line 13, in main volume = 4/3*pi*r3 NameError: global name 'pi' is not defined -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Math libraries - How to?
Hi, thak you. I get the following: > > > *** Error message * > > > Traceback (most recent call last): > > File "C:/Python25/z - MIS PROGRAMAS/volumen-b.py", line 20, > > in > > > > main() > > File "C:/Python25/z - MIS PROGRAMAS/volumen-b.py", line 13, > > in main > > volume = 4/3*pi*r3 > > NameError: global name 'pi' is not defined -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Math libraries - How to?
> > Thank you. I´ll try all methods to figure out the convenience of each Adolfo > > -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Math libraries - How to?
Thank you :-), I´ll do Adolfo > > pi is not a global name. When you do "import math",you aren't adding > everything to the name space, you are just telling python that you are > going to be using that file. You then refer to it as math.*, such as > "math.pi", or "math.pow(r,3)". To use it the way you want to, you > would have to do "from math import pi" instead of "import math" -- http://mail.python.org/mailman/listinfo/python-list