From python at lee-morgan.net Thu Oct 11 11:14:33 2001 From: python at lee-morgan.net (python at lee-morgan.net) Date: 12 Oct 2001 01:14:33 +1000 Subject: [SciPy-dev] scipy plt can only plot once? Message-ID: After investigation its due to a division error... Is it possible to have more than one live plot? *** c:/WINDOWS/TEMP/plot_objects.py Fri Oct 12 01:09:56 2001 --- c:/WINDOWS/TEMP/ediff-36954966S Fri Oct 12 01:09:56 2001 *************** *** 459,469 **** raise ValueError,'rotate must be 0 or 90. It is %d' % self.rotate # translate to screen units for the ticks. ! try: ! scale = length / float(self.ticks[-1] - self.ticks[0]) ! except ZeroDivisionError: ! scale = 1 #length / float(self.ticks[-1] - self.ticks[0]) ! tick_locations = floor((self.ticks - self.ticks[0]) * scale) # make array of points with tick screen units as x value, 0 for y value --- 459,465 ---- raise ValueError,'rotate must be 0 or 90. It is %d' % self.rotate # translate to screen units for the ticks. ! scale = length / float(self.ticks[-1] - self.ticks[0]) tick_locations = floor((self.ticks - self.ticks[0]) * scale) # make array of points with tick screen units as x value, 0 for y value -- Python From travis at scipy.org Thu Oct 11 11:22:01 2001 From: travis at scipy.org (Travis N. Vaught) Date: Thu, 11 Oct 2001 10:22:01 -0500 Subject: [SciPy-dev] scipy plt can only plot once? In-Reply-To: Message-ID: plt.figure() should create another wxFrame instance, allowing more than one plot. You can see this in the screenshot image: http://www.scipy.org/site_content/screen_shots TV > -----Original Message----- > From: scipy-dev-admin at scipy.org [mailto:scipy-dev-admin at scipy.org]On > Behalf Of python at lee-morgan.net > Sent: Thursday, October 11, 2001 10:15 AM > To: scipy-dev at scipy.net > Subject: [SciPy-dev] scipy plt can only plot once? > > > > After investigation its due to a division error... > > Is it possible to have more than one live plot? > > *** c:/WINDOWS/TEMP/plot_objects.py Fri Oct 12 01:09:56 2001 > --- c:/WINDOWS/TEMP/ediff-36954966S Fri Oct 12 01:09:56 2001 > *************** > *** 459,469 **** > raise ValueError,'rotate must be 0 or 90. It is %d' > % self.rotate > > # translate to screen units for the ticks. > ! try: > ! scale = length / float(self.ticks[-1] - self.ticks[0]) > ! except ZeroDivisionError: > ! scale = 1 #length / float(self.ticks[-1] - self.ticks[0]) > ! > tick_locations = floor((self.ticks - self.ticks[0]) * scale) > > # make array of points with tick screen units as x > value, 0 for y value > --- 459,465 ---- > raise ValueError,'rotate must be 0 or 90. It is %d' > % self.rotate > > # translate to screen units for the ticks. > ! scale = length / float(self.ticks[-1] - self.ticks[0]) > tick_locations = floor((self.ticks - self.ticks[0]) * scale) > > # make array of points with tick screen units as x > value, 0 for y value > > > -- > Python > > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev From altis at semi-retired.com Thu Oct 11 13:29:01 2001 From: altis at semi-retired.com (Kevin Altis) Date: Thu, 11 Oct 2001 10:29:01 -0700 Subject: [SciPy-dev] scipy plt can only plot once? In-Reply-To: Message-ID: I'm new to scipy, but I'm trying out the tutorials with PythonCard (which uses wxPython 2.3.x) and PyCrust 0.6 as the shell. I get the following error when I try the example as shown on the screenshots page. >>> from scipy import plt >>> from scipy import * >>> from RandomArray import normal >>> img = plt.lena() >>> plt.image(img) >>> Traceback (most recent call last): File "", line 1, in ? File "C:\Python21\scipy\plt\interface.py", line 427, in image axis('equal') File "C:\Python21\scipy\plt\interface.py", line 174, in axis x_ticks = _active.x_axis.ticks AttributeError: axis_window instance has no attribute 'ticks' In addition, the image isn't scaled correctly, probably because of the exception. If I run the tutorial commands first: # create some data to plot >>> x = arange(0,5,.5) >>> y = special.j1(x) >>> plt.plot(x,y) [ a graphics window should appear ] # now add some titles >>> plt.title('First Order Bessel Function') >>> plt.xtitle('x axis') >>> plt.ytitle('y axis') # and x-axis bounds equal to that of the data >>> plt.xaxis('fit') Then I don't get an error and the image is scaled correctly. ka > -----Original Message----- > From: scipy-dev-admin at scipy.org [mailto:scipy-dev-admin at scipy.org]On > Behalf Of Travis N. Vaught > Sent: Thursday, October 11, 2001 8:22 AM > To: scipy-dev at scipy.org > Subject: RE: [SciPy-dev] scipy plt can only plot once? > > > plt.figure() should create another wxFrame instance, allowing > more than one > plot. You can see this in the screenshot image: > > http://www.scipy.org/site_content/screen_shots > > TV > > > -----Original Message----- > > From: scipy-dev-admin at scipy.org [mailto:scipy-dev-admin at scipy.org]On > > Behalf Of python at lee-morgan.net > > Sent: Thursday, October 11, 2001 10:15 AM > > To: scipy-dev at scipy.net > > Subject: [SciPy-dev] scipy plt can only plot once? > > > > > > > > After investigation its due to a division error... > > > > Is it possible to have more than one live plot? > > > > *** c:/WINDOWS/TEMP/plot_objects.py Fri Oct 12 01:09:56 2001 > > --- c:/WINDOWS/TEMP/ediff-36954966S Fri Oct 12 01:09:56 2001 > > *************** > > *** 459,469 **** > > raise ValueError,'rotate must be 0 or 90. It is %d' > > % self.rotate > > > > # translate to screen units for the ticks. > > ! try: > > ! scale = length / float(self.ticks[-1] - self.ticks[0]) > > ! except ZeroDivisionError: > > ! scale = 1 #length / float(self.ticks[-1] - self.ticks[0]) > > ! > > tick_locations = floor((self.ticks - self.ticks[0]) * scale) > > > > # make array of points with tick screen units as x > > value, 0 for y value > > --- 459,465 ---- > > raise ValueError,'rotate must be 0 or 90. It is %d' > > % self.rotate > > > > # translate to screen units for the ticks. > > ! scale = length / float(self.ticks[-1] - self.ticks[0]) > > tick_locations = floor((self.ticks - self.ticks[0]) * scale) > > > > # make array of points with tick screen units as x > > value, 0 for y value > > > > > > -- > > Python > > > > _______________________________________________ > > Scipy-dev mailing list > > Scipy-dev at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-dev > > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev > From python at lee-morgan.net Fri Oct 12 02:13:54 2001 From: python at lee-morgan.net (python at lee-morgan.net) Date: 12 Oct 2001 16:13:54 +1000 Subject: [SciPy-dev] scipy plt can only plot once? Message-ID: > >Travis N. Vaught > >plt.figure() should create another wxFrame instance, allowing more than one >plot. You can see this in the screenshot image: http://www.scipy.org/site_content/screen_shots TV > -----Original Message----- > Ahaa, very nice, cheers! -- Python From ej at ee.duke.edu Fri Oct 12 14:09:46 2001 From: ej at ee.duke.edu (eric jones) Date: Fri, 12 Oct 2001 14:09:46 -0400 Subject: [SciPy-dev] scipy plt can only plot once? References: Message-ID: <01eb01c15349$14069be0$c100a8c0@ericlaptop> ----- Original Message ----- From: "Kevin Altis" To: Sent: Thursday, October 11, 2001 1:29 PM Subject: RE: [SciPy-dev] scipy plt can only plot once? > I'm new to scipy, but I'm trying out the tutorials with PythonCard (which > uses wxPython 2.3.x) and PyCrust 0.6 as the shell. I get the following error > when I try the example as shown on the screenshots page. > > >>> from scipy import plt > >>> from scipy import * > >>> from RandomArray import normal > >>> img = plt.lena() > >>> plt.image(img) > > >>> Traceback (most recent call last): > File "", line 1, in ? > File "C:\Python21\scipy\plt\interface.py", line 427, in image > axis('equal') > File "C:\Python21\scipy\plt\interface.py", line 174, in axis > x_ticks = _active.x_axis.ticks > AttributeError: axis_window instance has no attribute 'ticks' Hmm. I get this also. If you simply type plt.image(img) again, it will show up scaled correctly. I'll look into this. eric From altis at semi-retired.com Mon Oct 15 13:39:46 2001 From: altis at semi-retired.com (Kevin Altis) Date: Mon, 15 Oct 2001 10:39:46 -0700 Subject: [SciPy-dev] SciPy versus Matlab, Excel, and other tools Message-ID: I asked a number of friends involved in science on a daily basis what tools they use day to day and for publication. The top answer for doing analysis and graphs seems to be Excel and presentations are done in PowerPoint which are then projected rather than printed and then publications are done in PDF format. One person was using Calcusyn for statistical analysis. Matlab seemed to be the most popular tool after Excel. Excel can be manipulated via COM (and possibly AppleEvents) so it can be scripted from Python, but then that would be a Windows and Mac solution. Is the big issue here something that will run under Unix? I'm assuming that the costs of Excel and Matlab are prohibitive for some people. Matlab in particular looks pretty expensive for an individual. Can Matlab be scripted from Python? Of course, Excel doesn't have most of the libraries that SciPy has, so my investigations may have been too focused on the visualization aspect. Again, I'm not a scientific computing user, so I'm just trying to better understand the SciPy goals, so I can understand how SciPy relates to PythonCard. Thanks, ka --- Kevin Altis altis at semi-retired.com From jochen at unc.edu Fri Oct 19 13:55:50 2001 From: jochen at unc.edu (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 19 Oct 2001 13:55:50 -0400 Subject: [SciPy-dev] cvs problems? Message-ID: <86r8rzcy55.fsf@bock.chem.unc.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What's going on with the repository? I am unable to check out stuff, e.g. ,---- | cvs server: failed to create lock directory in repository `/home/cvsroot/world/scipy/gui_thread/tests': Permission denied | cvs server: failed to obtain dir lock in repository `/home/cvsroot/world/scipy/gui_thread/tests' | cvs [server aborted]: read lock failed - giving up `---- Greetings, Jochen - -- University of North Carolina phone: +1-919-962-4403 Department of Chemistry phone: +1-919-962-1579 Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6-cygwin-fcn-1 (Cygwin) Comment: Processed by Mailcrypt and GnuPG iD8DBQE70GkmiJ/aUUS8zY4RAlCMAJsH4pN3CIaLiG/LmJXef3Cq7KV9qgCcDbuO S6RYodIz1fn2xR5el0xDiUY= =wEcD -----END PGP SIGNATURE----- From jochen at jochen-kuepper.de Sun Oct 21 01:24:00 2001 From: jochen at jochen-kuepper.de (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 21 Oct 2001 01:24:00 -0400 Subject: [SciPy-dev] plt Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is there a good reason not to check whether plt is available? That is, what's about the following? Index: __init__.py =================================================================== RCS file: /home/cvsroot/world/scipy/__init__.py,v retrieving revision 1.47 diff -u -r1.47 __init__.py - --- __init__.py 2001/10/16 00:42:55 1.47 +++ __init__.py 2001/10/21 05:23:49 @@ -94,6 +94,13 @@ # Level 2 _plot = [] try: + import plt + __all__.append('plt') + _plot.append('plt') +except ImportError: + pass + +try: import xplt __all__.append('xplt') _plot.append('xplt') Greetings, Jochen - -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Processed by Mailcrypt and GnuPG iD8DBQE70lvwiJ/aUUS8zY4RAgO9AJ4qiawL2eCfRSvX8TuH2Pi8k4lg4ACgkzoU rizePRr+Fex7ltHHkWEKt+4= =Wx/j -----END PGP SIGNATURE----- From a.backer at bristol.ac.uk Sun Oct 21 16:49:42 2001 From: a.backer at bristol.ac.uk (Arnd Baecker) Date: Sun, 21 Oct 2001 16:49:42 -0400 (EDT) Subject: [SciPy-dev] Link problem with scipy on SUN ? Message-ID: Hi, when trying to install scipy I ran into the following link problem under SUN (uname -a: SunOS wega 5.8 Generic_108528-07 sun4u sparc - I can provide further details if necessary) [...] cluster/src/vq_wrap.cpp: In function `int char_to_numtype(char)': cluster/src/vq_wrap.cpp:590: warning: control reaches end of non-void function `char_to_numtype(char)' cluster/src/vq_wrap.cpp: At top level: cluster/src/vq_wrap.cpp:516: warning: `struct PyObject * l_output_helper(struct PyObject *, struct PyObject *)' defined but not used gcc -shared build/temp.solaris-2.8-sun4u-2.1/vq_wrap.o -L(null) -LSun/lib -L(null) -LSun/lib -Lbuild/temp.solaris-2.8-sun4u-2.1 -Lbuild/temp.solaris-2.8-sun4u-2.1 -R(null) -RSun/lib -lamos -ltoms -lfitpack -lminpack -lquadpack -lodepack -llinpack_lite -lmach -lf90 -lF77 -lM77 -lsunmath -lm -lgist -lc_misc -lcephes -o build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so -mimpure-text ld: fatal: library -lf90: not found ld: fatal: library -lF77: not found ld: fatal: library -lM77: not found ld: fatal: library -lsunmath: not found ld: fatal: File processing errors. No output written to build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 If I replace the above line by gcc -shared build/temp.solaris-2.8-sun4u-2.1/vq_wrap.o -L(null) -LSun/lib -L(null) -LSun/lib -Lbuild/temp.solaris-2.8-sun4u-2.1 -Lbuild/temp.solaris-2.8-sun4u-2.1 -R(null) -RSun/lib -lamos -ltoms -lfitpack -lminpack -lquadpack -lodepack -llinpack_lite -lmach -L -lf90 -L -lF77 -L -lM77 -L -lsunmath -lm -lgist -lc_misc -lcephes -o build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so -mimpure-text then there is no problem anymore. (i.e. adding -L in front of the above libraries does the job ...) What do I have to change to get rid of this problem ? (All the above four libraries seem to be defined in the variable self.libraries in build_flib.py. but I don't understand enough python yet ... ;-) Best, Arnd From ejones17 at austin.rr.com Tue Oct 23 11:29:38 2001 From: ejones17 at austin.rr.com (ERIC JONES) Date: Tue, 23 Oct 2001 11:29:38 -0400 Subject: [SciPy-dev] cvs problems? References: <86r8rzcy55.fsf@bock.chem.unc.edu> Message-ID: <033501c15bd7$87062e30$777ba8c0@ericlaptop> Sorry bout that. Some files were added and group permissions were not setup correctly. I think I've fixed it and also prevented it from happening again. Please try again and let me know how it goes. thanks, eric ----- Original Message ----- From: "Jochen K?pper" To: "scipy-dev" Sent: Friday, October 19, 2001 1:55 PM Subject: [SciPy-dev] cvs problems? > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > What's going on with the repository? I am unable to check out stuff, > e.g. > ,---- > | cvs server: failed to create lock directory in repository `/home/cvsroot/world/scipy/gui_thread/tests': Permission denied > | cvs server: failed to obtain dir lock in repository `/home/cvsroot/world/scipy/gui_thread/tests' > | cvs [server aborted]: read lock failed - giving up > `---- > > > Greetings, > Jochen > - -- > University of North Carolina phone: +1-919-962-4403 > Department of Chemistry phone: +1-919-962-1579 > Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 > Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6-cygwin-fcn-1 (Cygwin) > Comment: Processed by Mailcrypt and GnuPG > > iD8DBQE70GkmiJ/aUUS8zY4RAlCMAJsH4pN3CIaLiG/LmJXef3Cq7KV9qgCcDbuO > S6RYodIz1fn2xR5el0xDiUY= > =wEcD > -----END PGP SIGNATURE----- > > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev > From ejones17 at austin.rr.com Tue Oct 23 11:29:26 2001 From: ejones17 at austin.rr.com (ERIC JONES) Date: Tue, 23 Oct 2001 11:29:26 -0400 Subject: [SciPy-dev] plt References: Message-ID: <033101c15bd7$82d0e8f0$777ba8c0@ericlaptop> Hey Jochen, > Is there a good reason not to check whether plt is available? Unfortunately, yes. There are actually two reasons. Of course, the behavior you suggest is most desirable, so if anyone knows a way around either of these issue, please share! 1. Unless your running from pyCrust or some other wxPython based shell, gui_thread has to be imported *and* finish loading wxPython in the background thread before any other module based on wxPython is loaded. There is an issue with Python's import locking mechanism that makes it impossible to have gui_thread wait for the 2nd thread to get initialized before it returns. Thus, import gui_thread import plt does not guarantee that gui_thread will finish initializing wxPython before plt gets to. If plt gets to it first, bad things happen. That's why you have to import gui_thread at the beginning of a python session (or in you startup.py) before anything else. I do have a patch to Python for this laying around, but it was for 1.5. I haven't tried it on 2.1, and it hasn't seen extensive testing. Perhaps, I'll submit it again and hope it makes into 2.3 or so. Some more notes on this are at: http://www.scipy.org/site_content/tutorials/gui_thread and http://www.scipy.org/site_content/tutorials/import_thread_lock_discussion 2. plt is based on wxPython which is usually based on wxGTK (in Unix), which is based on (surprise) GTK. If a X display is not available when GTK is started up, it immediately terminates the process. Thus, if you attempt to import plt from a telnet session that doesn't have a display, the Python session exits. Not good. As far as I know, this behavior is deep in the bowels of either GTK or wxGTK, and it is not currently possible to catch this behavior as an exception instead of have it exit. I guess we could learn this info some other way though. Anyway to check if an X terminal is available prior to trying to load plt? Is checking whether a DISPLAY environment variable exists sufficient? see ya, eric From ejones17 at austin.rr.com Tue Oct 23 11:59:34 2001 From: ejones17 at austin.rr.com (ERIC JONES) Date: Tue, 23 Oct 2001 11:59:34 -0400 Subject: [SciPy-dev] Link problem with scipy on SUN ? References: Message-ID: <033e01c15bdb$b5c38660$777ba8c0@ericlaptop> Hey Arnd, Short answer: Sun has only been tested on a single machine, and I hardcoded the libraries for it to work. Can you run the following commands on your machine and send me the output? [1]$ f77 -dryrun dummy.f ... [2]$ f90 -fdryrun dummy.f90 This will help me make a more generic solution. Longer Answer: SciPy tries to inspect your machine,learn what Fortran compiler you are using, and provide the correct libraries and library paths to get everything to link correctly. A little background: The -L directives specify the library directories where the linker (gcc) should look for needed libraries. The -l directories specify the libraries themselves. -lF77 will look for a file called libF77.a or libF77.so in the directories you specified with the -L directives, and also a few other standard locations. It is a little worrisome that you have -L(null) in some places on the command line. I don't think this should happen and it is likely a bug in build_flib.py. I'll look into this. 2nd, its strange that the directories following your -L directives are not full paths. This can't be right. The trick you played just kept the linker from looking for the Fortran libraries (although I'm not quite sure how...), and since vw_wrap doesn't need them, it will link fine. However, many of the other modules will need them, so this is just a temporary fix. see ya, eric ----- Original Message ----- From: "Arnd Baecker" To: Sent: Sunday, October 21, 2001 4:49 PM Subject: [SciPy-dev] Link problem with scipy on SUN ? > Hi, > > when trying to install scipy I ran into the following > link problem under SUN > (uname -a: SunOS wega 5.8 Generic_108528-07 sun4u sparc > - I can provide further details if necessary) > > > [...] > cluster/src/vq_wrap.cpp: In function `int char_to_numtype(char)': > cluster/src/vq_wrap.cpp:590: warning: control reaches end of non-void > function `char_to_numtype(char)' > cluster/src/vq_wrap.cpp: At top level: > cluster/src/vq_wrap.cpp:516: warning: `struct PyObject * > l_output_helper(struct PyObject *, struct PyObject *)' defined but not > used > gcc -shared build/temp.solaris-2.8-sun4u-2.1/vq_wrap.o -L(null) -LSun/lib > -L(null) -LSun/lib -Lbuild/temp.solaris-2.8-sun4u-2.1 > -Lbuild/temp.solaris-2.8-sun4u-2.1 -R(null) -RSun/lib -lamos -ltoms > -lfitpack -lminpack -lquadpack -lodepack -llinpack_lite -lmach -lf90 -lF77 > -lM77 -lsunmath -lm -lgist -lc_misc -lcephes -o > build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so -mimpure-text > ld: fatal: library -lf90: not found > ld: fatal: library -lF77: not found > ld: fatal: library -lM77: not found > ld: fatal: library -lsunmath: not found > ld: fatal: File processing errors. No output written to > build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so > collect2: ld returned 1 exit status > error: command 'gcc' failed with exit status 1 > > > If I replace the above line by > > gcc -shared build/temp.solaris-2.8-sun4u-2.1/vq_wrap.o -L(null) -LSun/lib > -L(null) -LSun/lib -Lbuild/temp.solaris-2.8-sun4u-2.1 > -Lbuild/temp.solaris-2.8-sun4u-2.1 -R(null) -RSun/lib -lamos -ltoms > -lfitpack -lminpack -lquadpack -lodepack -llinpack_lite -lmach -L -lf90 -L > -lF77 -L -lM77 -L -lsunmath -lm -lgist -lc_misc -lcephes -o > build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so -mimpure-text > > then there is no problem anymore. > (i.e. adding -L in front of the above libraries does the job ...) > > What do I have to change to get rid of this problem ? > (All the above four libraries seem to be defined in > the variable self.libraries in build_flib.py. > but I don't understand enough python yet ... ;-) > > Best, > > Arnd > > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev > From ejones17 at austin.rr.com Tue Oct 23 13:39:15 2001 From: ejones17 at austin.rr.com (ERIC JONES) Date: Tue, 23 Oct 2001 13:39:15 -0400 Subject: Fw: [SciPy-dev] Link problem with scipy on SUN ? References: Message-ID: <03a801c15be9$a77e3ba0$777ba8c0@ericlaptop> Hey, Sorry that was a typo. I meant f90 -dryrun dummy.f90 eric ----- Original Message ----- From: "Arnd Baecker" To: "eric jones" Sent: Tuesday, October 23, 2001 6:49 PM Subject: Re: Fw: [SciPy-dev] Link problem with scipy on SUN ? > Hi Eric, > > thank you very much for your response! > > Looking at the output of [1] and [2] this might explain > (at least ;-) where the (null) comes from. > So there it is: (sorry, the lines wrap around in my mailer, > I could send you the output as attachment if you want) > > > wega$ f77 -dryrun dummy.f > ### command line files and options (expanded): > ### -dryrun dummy.f > ### f77: Note: LM_LICENSE_FILE = (null) > ### f77: Note: NLSPATH = > /soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/../lib/lo > cale/%L/LC_MESSAGES/%N.cat:/soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/../ ../l > ib/locale/%L/LC_MESSAGES/%N.cat > /soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/f77pass1 -y-o -ydummy.o > -y-fbe -y/ > soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/fbe -y-xarch=generic -y-s > -ptk "/so > ft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/f77 -dryrun " -xcache=generic > -I/soft > /local/lpp/opt/SUNWspro/WS6U2/include/f77 -xhasc=yes dummy.f > /tmp/f77pass1.10091 > .s.0.s dummy.o /tmp/f77pass1.10091.d.1.s > rm /tmp/f77pass1.10091.s.0.s > rm /tmp/f77pass1.10091.d.1.s > ### f77: Note: LD_LIBRARY_PATH = > /soft/local/lpp/nagftn/flsol19da/:/soft/local/l > pp/nagc/clsol06da: > ### f77: Note: LD_RUN_PATH = (null) > ### f77: Note: LD_OPTIONS = (null) > /usr/ccs/bin/ld -t -R/soft/local/lpp/opt/SUNWspro/lib:/opt/SUNWspro/lib -o > a.out > /soft/local/lpp/opt/SUNWspro/WS6U2/lib/crti.o > /soft/local/lpp/opt/SUNWspro/WS6U > 2/lib/crt1.o /soft/local/lpp/opt/SUNWspro/WS6U2/lib/values-xi.o -Y > P,/soft/local > /lpp/opt/SUNWspro/lib:/soft/local/lpp/opt/SUNWspro/WS6U2/lib:/usr/ccs/lib:/u sr/l > ib dummy.o -lF77 -lM77 -lsunmath -lm -lcx -lc > /soft/local/lpp/opt/SUNWspro/WS6U2 > /lib/crtn.o > rm dummy.o > > > The second one gives: > > wega$ f90 -fdryrun dummy.f90 > f90: Warning: Option -fdryrun passed to ld, if ld is invoked, ignored > otherwise > ERROR: Cannot open source file "dummy.f90". > > Presumably not quite what you wanted ... > > Creating some dummy Fortran File then gives > wega$ f90 -dryrun tst.f > ### command line files and options (expanded): > ### -dryrun tst.f > ### f90: Note: LM_LICENSE_FILE = (null) > ### f90: Note: NLSPATH = > /soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/../lib/locale/%L/LC_MESSAGES/% N.cat:/soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/../../lib/locale/%L/LC_M ESSAGES/%N.cat > /soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/f90comp -y-o -ytst.o -ev > -y-ftrap=common -m3 -dq -y-fbe > -y/soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/fbe -y-xarch=generic -y-s > -H "/soft/local/lpp/opt/SUNWspro/bin/../WS6U2/bin/f90 -dryrun " > -y-xcache=generic -xcache=generic > -I/soft/local/lpp/opt/SUNWspro/WS6U2/include/f90/v8 > -p/soft/local/lpp/opt/SUNWspro/WS6U2/lib -xall tst.f > ### f90: Note: LD_LIBRARY_PATH = > /soft/local/lpp/nagftn/flsol19da/:/soft/local/lpp/nagc/clsol06da: > ### f90: Note: LD_RUN_PATH = (null) > ### f90: Note: LD_OPTIONS = (null) > /usr/ccs/bin/ld -t -R/soft/local/lpp/opt/SUNWspro/lib:/opt/SUNWspro/lib -o > a.out /soft/local/lpp/opt/SUNWspro/WS6U2/lib/crti.o > /soft/local/lpp/opt/SUNWspro/WS6U2/lib/crt1.o > /soft/local/lpp/opt/SUNWspro/WS6U2/lib/values-xi.o -Y > P,/soft/local/lpp/opt/SUNWspro/lib:/soft/local/lpp/opt/SUNWspro/WS6U2/lib:/u sr/ccs/lib:/usr/lib > tst.o -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai > -lfmaxvai -lfsu -lsunmath -lm -lc > /soft/local/lpp/opt/SUNWspro/WS6U2/lib/crtn.o > rm tst.o > > > Hope this helps ... > > Best wishes, > > Arnd > > > > > > > > > > On Tue, 23 Oct 2001, eric jones wrote: > > > Hey Arnd, > > > > Forgot to but you in the response list for this email. > > > > eric > > > > ----- Original Message ----- > > From: "ERIC JONES" > > To: > > Sent: Tuesday, October 23, 2001 11:59 AM > > Subject: Re: [SciPy-dev] Link problem with scipy on SUN ? > > > > > > > Hey Arnd, > > > > > > Short answer: > > > > > > Sun has only been tested on a single machine, and I hardcoded the > > libraries > > > for it to work. Can you run the following commands on your machine and > > send > > > me the output? > > > > > > [1]$ f77 -dryrun dummy.f > > > ... > > > [2]$ f90 -fdryrun dummy.f90 > > > > > > This will help me make a more generic solution. > > > > > > Longer Answer: > > > > > > SciPy tries to inspect your machine,learn what Fortran compiler you are > > > using, and provide the correct libraries and library paths to get > > everything > > > to link correctly. > > > > > > A little background: > > > > > > The -L directives specify the library directories where the linker (gcc) > > > should look for needed libraries. The -l directories specify the > > libraries > > > themselves. -lF77 will look for a file called libF77.a or libF77.so in > > the > > > directories you specified with the -L directives, and also a few other > > > standard locations. > > > > > > It is a little worrisome that you have -L(null) in some places on the > > > command line. I don't think this should happen and it is likely a bug in > > > build_flib.py. I'll look into this. 2nd, its strange that the > > directories > > > following your -L directives are not full paths. This can't be right. > > > > > > The trick you played just kept the linker from looking for the Fortran > > > libraries (although I'm not quite sure how...), and since vw_wrap doesn't > > > need them, it will link fine. However, many of the other modules will > > need > > > them, so this is just a temporary fix. > > > > > > see ya, > > > eric > > > > > > > > > ----- Original Message ----- > > > From: "Arnd Baecker" > > > To: > > > Sent: Sunday, October 21, 2001 4:49 PM > > > Subject: [SciPy-dev] Link problem with scipy on SUN ? > > > > > > > > > > Hi, > > > > > > > > when trying to install scipy I ran into the following > > > > link problem under SUN > > > > (uname -a: SunOS wega 5.8 Generic_108528-07 sun4u sparc > > > > - I can provide further details if necessary) > > > > > > > > > > > > [...] > > > > cluster/src/vq_wrap.cpp: In function `int char_to_numtype(char)': > > > > cluster/src/vq_wrap.cpp:590: warning: control reaches end of non-void > > > > function `char_to_numtype(char)' > > > > cluster/src/vq_wrap.cpp: At top level: > > > > cluster/src/vq_wrap.cpp:516: warning: `struct PyObject * > > > > l_output_helper(struct PyObject *, struct PyObject *)' defined but not > > > > used > > > > gcc -shared > > build/temp.solaris-2.8-sun4u-2.1/vq_wrap.o -L(null) -LSun/lib > > > > -L(null) -LSun/lib -Lbuild/temp.solaris-2.8-sun4u-2.1 > > > > -Lbuild/temp.solaris-2.8-sun4u-2.1 -R(null) -RSun/lib -lamos -ltoms > > > > > > -lfitpack -lminpack -lquadpack -lodepack -llinpack_lite -lmach -lf90 -lF77 > > > > -lM77 -lsunmath -lm -lgist -lc_misc -lcephes -o > > > > build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so -mimpure-text > > > > ld: fatal: library -lf90: not found > > > > ld: fatal: library -lF77: not found > > > > ld: fatal: library -lM77: not found > > > > ld: fatal: library -lsunmath: not found > > > > ld: fatal: File processing errors. No output written to > > > > build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so > > > > collect2: ld returned 1 exit status > > > > error: command 'gcc' failed with exit status 1 > > > > > > > > > > > > If I replace the above line by > > > > > > > > gcc -shared > > build/temp.solaris-2.8-sun4u-2.1/vq_wrap.o -L(null) -LSun/lib > > > > -L(null) -LSun/lib -Lbuild/temp.solaris-2.8-sun4u-2.1 > > > > -Lbuild/temp.solaris-2.8-sun4u-2.1 -R(null) -RSun/lib -lamos -ltoms > > > > > > -lfitpack -lminpack -lquadpack -lodepack -llinpack_lite -lmach -L -lf90 -L > > > > -lF77 -L -lM77 -L -lsunmath -lm -lgist -lc_misc -lcephes -o > > > > build/lib.solaris-2.8-sun4u-2.1/scipy/cluster/_vq.so -mimpure-text > > > > > > > > then there is no problem anymore. > > > > (i.e. adding -L in front of the above libraries does the job ...) > > > > > > > > What do I have to change to get rid of this problem ? > > > > (All the above four libraries seem to be defined in > > > > the variable self.libraries in build_flib.py. > > > > but I don't understand enough python yet ... ;-) > > > > > > > > Best, > > > > > > > > Arnd > > > > > > > > _______________________________________________ > > > > Scipy-dev mailing list > > > > Scipy-dev at scipy.net > > > > http://www.scipy.net/mailman/listinfo/scipy-dev > > > > > > > > > > > > > _______________________________________________ > > > Scipy-dev mailing list > > > Scipy-dev at scipy.net > > > http://www.scipy.net/mailman/listinfo/scipy-dev > > > > > > > > > From jochen at jochen-kuepper.de Tue Oct 23 21:17:57 2001 From: jochen at jochen-kuepper.de (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 23 Oct 2001 21:17:57 -0400 Subject: [SciPy-dev] cvs problems? In-Reply-To: <033501c15bd7$87062e30$777ba8c0@ericlaptop> References: <86r8rzcy55.fsf@bock.chem.unc.edu> <033501c15bd7$87062e30$777ba8c0@ericlaptop> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 23 Oct 2001 11:29:38 -0400 ERIC JONES wrote: [cvs fixed] Seems to work:) On Tue, 23 Oct 2001 11:29:26 -0400 ERIC JONES wrote: >> Is there a good reason not to check whether plt is available? ERIC> Unfortunately, yes. There are actually two reasons. Thanks for the explanation. Well, I guess I can live with it as long as it works:)) Greetings, Jochen - -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Processed by Mailcrypt and GnuPG iD8DBQE71hbFiJ/aUUS8zY4RAoVQAJ9lNzCLhT+ltD9xV4tzda9m9JRstQCgnxx5 CY3+ywiBQ1BrlT42sM5p9FI= =Ozz9 -----END PGP SIGNATURE----- From jochen at jochen-kuepper.de Wed Oct 24 01:26:15 2001 From: jochen at jochen-kuepper.de (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 24 Oct 2001 01:26:15 -0400 Subject: [SciPy-dev] wxplt Message-ID: Patch against current cvs, cleaning up wildcard handling a bit and fixing a typo. Index: plt/wxplt.py =================================================================== RCS file: /home/cvsroot/world/scipy/plt/wxplt.py,v retrieving revision 1.7 diff -u -r1.7 wxplt.py --- plt/wxplt.py 2001/08/09 20:46:07 1.7 +++ plt/wxplt.py 2001/10/24 05:25:03 @@ -564,14 +564,13 @@ def OnFileSaveAs(self, event): import os - dlg = wx.wxFileDialog(self, "Save As", ".", "", "*.*", wx.wxSAVE) wildcard = "PNG files (*.png)|*.png|" \ "BMP files (*.bmp)|*.bmp|" \ "JPEG files (*.jpg)|*.jpg|" \ "PCX files (*.pcx)|*.pcx|" \ - "TIFF files (*.tif)|*.tif" - dlg.SetWildcard(wildcard) - dlg.SetWildcard(wildcard) + "TIFF files (*.tif)|*.tif|" \ + "All Files |*|" + dlg = wx.wxFileDialog(self, "Save As", ".", "", wildcard, wx.wxSAVE) if dlg.ShowModal() == wx.wxID_OK: f = dlg.GetPath() dummy, ftype = os.path.splitext(f) @@ -581,13 +580,14 @@ self.client.save(dlg.GetPath(),ftype) else: msg = "Extension is currently used to determine file type." \ - "'%s' is not a vaild extension." \ + "'%s' is not a valid extension." \ "You may use one of the following extensions. %s" \ % (ftype,image_type_map.keys()) d = wx.wxMessageDialog(self,msg,style=wx.wxOK) d.ShowModal() d.Destroy() - dlg.Destroy() + dlg.Destroy() + def OnFileExit(self, event): self.Close() Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll From jochen at unc.edu Wed Oct 24 11:13:50 2001 From: jochen at unc.edu (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 24 Oct 2001 11:13:50 -0400 Subject: [SciPy-dev] PlotCanvas Message-ID: <86zo6h2ilo.fsf@bock.chem.unc.edu> All, I have created a very q+d-hacked PlotCanvas based on scipy.plt. In case anybody is interested, the bare class file is attached. Feel free to add this to scipy.plt if you see it fit. It requires one patch to scipy.plt itself to access _active from the outside (q+d, as I said!): Index: plt/interface.py =================================================================== RCS file: /home/cvsroot/world/scipy/plt/interface.py,v retrieving revision 1.10 diff -u -r1.10 interface.py --- plt/interface.py 2001/10/12 20:07:08 1.10 +++ plt/interface.py 2001/10/24 15:05:19 @@ -498,3 +498,7 @@ else: p.SetSize(s1) + +def setActive(active): + global _active + _active = active You can also download the code including a small application from my homepage -> homemade software page; it's part of jkext. See files gui/plot.py, gui/kplot.py and scripts/plot. I am planning to add some more functionality and then release this as a small sample app. Greetings, Jochen -- University of North Carolina phone: +1-919-962-4403 Department of Chemistry phone: +1-919-962-1579 Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E -------------- next part -------------- A non-text attachment was scrubbed... Name: plot.py Type: text/python Size: 4269 bytes Desc: PlotCancas class URL: From ejones17 at austin.rr.com Wed Oct 24 17:19:03 2001 From: ejones17 at austin.rr.com (eric jones) Date: Wed, 24 Oct 2001 17:19:03 -0400 Subject: [SciPy-dev] PlotCanvas References: <86zo6h2ilo.fsf@bock.chem.unc.edu> Message-ID: <000b01c15cd1$8755c530$6600a8c0@ericlaptop> Hey Jochen, The figure() method is actually meant for doing this -- although I looked at it and noticed the code was disabled. I've enabled it and rewritten a little in the current CVS. figure() works very much like Matlab's figure. figure() without arguments generates a new figure. If a numerical index is supplied, figure grabs the plot with that index (first plot created has index 0). If an actual plot frame is supplied, that plot is made the active figure. So >>> a = plt.plot((1,2,3)) # generate a figure >>> figure() #generate new figure >>> figure(a) # activate first figure Here figure(a) is equivalent to your setActive(a). One more comment. Please name functions and classes intended for scipy with all lower-case/underscore convention (setActive() --> set_active(). This has been used as uniformly as possible across the entire package (although some things are still getting fixed). thanks, eric More examples: >>> import gui_thread >>> >>> from scipy import plt >>> q=plt.plot((1,2,3)) >>> q.Raise() >>> q >>> plt.figure() >>> plt.plot((1,2,3)) >>> plt.figure(0) >>> plt.figure(1) >>> plt.figure(q) ----- Original Message ----- From: "Jochen K?pper" To: "scipy-dev" Sent: Wednesday, October 24, 2001 11:13 AM Subject: [SciPy-dev] PlotCanvas > All, > > I have created a very q+d-hacked PlotCanvas based on scipy.plt. In > case anybody is interested, the bare class file is attached. Feel free > to add this to scipy.plt if you see it fit. It requires one patch to > scipy.plt itself to access _active from the outside (q+d, as I said!): > > Index: plt/interface.py > =================================================================== > RCS file: /home/cvsroot/world/scipy/plt/interface.py,v > retrieving revision 1.10 > diff -u -r1.10 interface.py > --- plt/interface.py 2001/10/12 20:07:08 1.10 > +++ plt/interface.py 2001/10/24 15:05:19 > @@ -498,3 +498,7 @@ > else: > p.SetSize(s1) > > + > +def setActive(active): > + global _active > + _active = active > > > You can also download the code including a small application from my > homepage -> homemade software page; it's part of jkext. See files > gui/plot.py, gui/kplot.py and scripts/plot. I am planning to add some > more functionality and then release this as a small sample app. > > Greetings, > Jochen > -- > University of North Carolina phone: +1-919-962-4403 > Department of Chemistry phone: +1-919-962-1579 > Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 > Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E > From jochen at jochen-kuepper.de Wed Oct 24 23:08:15 2001 From: jochen at jochen-kuepper.de (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 24 Oct 2001 23:08:15 -0400 Subject: [SciPy-dev] SciPy versus Matlab, Excel, and other tools In-Reply-To: References: Message-ID: Kevin, All, just stumbled over this. Maybe it still helps. (Not speaking for "scipy.org" by any means.) Kevin> I asked a number of friends involved in science on a daily Kevin> basis what tools they use day to day and for publication. The Kevin> top answer for doing analysis and graphs seems to be Excel and Kevin> presentations are done in PowerPoint which are then projected Kevin> rather than printed and then publications are done in PDF Kevin> format. Excel? What kind of "scientist" did you ask? I don't know any serious scientist who uses Excel for more than calculating a mean or getting a histogram. (Btw, these people also publish standard deviations for 2-value means... Well, it's not wrong, I guess) Try plotting a dataset (simple x,y will do) with >1e6 points in Excel. Last time I tried (ok, years ago) the limit was 2**14:( I know the limit is bigger nowadays, but generated data sets are so as well:O Not considering that Excel calculates "wrong" (by design(?))! There are papers in the scientific literature that test Excel's "numeric-engine"; Microsoft doesn't consider it worthwhile fixing "bugs" (that is, wrong numerical calculation results) that were pointed out half a decade (or more) ago. (Yes, I have read some of these papers. Sorry, I don't keep references of that stuff, but searching any reasonable literature database should provide you with the papers I am talking about. I do know a former colleague who has hardcopies of some of these papers, so I could contact him to get references if really needed.) Origin, SigmaPlot, and such are used by many to plot (mostly 2d) data and do some analysis (low-scale usually, although these programs promise to do a lot for you nowadays). I actually use Origin myself all the time to prepare presentation graphics. If you have repeating tasks it may still be faster to write a specific solution yourself, though. Kevin> Again, I'm not a scientific computing user, so I'm just trying Kevin> to better understand the SciPy goals I don't know what the goals of Eric, Travis, and Co. were when they started scipy. I think it is a really useful programming library for me. I use stuff like LAPACK or FFTW all the time writing data analysis software. Now I get that stuff within one package for my little python scripts, which do most of my day2day job (well, I haven't gotten them to *produce* the data I actually need, yet). And I can tell you it is faster to write a small python script to do some analysis instead of loading 50 files into any of these ready-made programs, clicking through the menus for minutes, rearranging intermediate results from one function to another, ... Yes, scripting of these apps should be a solution here. I never figured that out because it changes with every version, so I start back from scratch again.... Never had the passion to get that working. python worked right from the first line... Ok, knowing C/C++, Fortran, Pascal, Lisp, HTML, LaTeX, bash, whatever... You know what? These "languages" are actually designed to be useful, not put around a program designed to be colorful and menu-driven as its main goals. I hope nobody (besides maybe Excel designers) feels offended, that is not my intention at all. If you are happy with Excel, good for you! If you are *sure* you don't have problems with precision, stick with it. Nothing is easier and faster than what you know. (Unless you know something better:) Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll From jochen at jochen-kuepper.de Thu Oct 25 00:27:11 2001 From: jochen at jochen-kuepper.de (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 25 Oct 2001 00:27:11 -0400 Subject: [SciPy-dev] Re: PlotCanvas In-Reply-To: <000b01c15cd1$8755c530$6600a8c0@ericlaptop> References: <86zo6h2ilo.fsf@bock.chem.unc.edu> <000b01c15cd1$8755c530$6600a8c0@ericlaptop> Message-ID: On Wed, 24 Oct 2001 17:19:03 -0400 eric jones wrote: Eric> The figure() method is actually meant for doing this -- although Eric> I looked at it and noticed the code was disabled. Yeah, I messed with that last night as well. Apparently I was a little sleepy already:( Eric> I've enabled it and rewritten a little in the current CVS. Seen that... Eric> figure() works very much like Matlab's figure. Well, sorry. I think I spent at most 2 hours with matlab, and that is definitely more than 5 years ago:( Eric> [...] Eric> Here figure(a) is equivalent to your setActive(a). Not exactly. What I really need is to tell plt about a new plot_canvas it did't create by itself! Well, you could say I have to smuggle it in:) The way to do that is to extend the "case" in figure() so when which_object is not numeric and not in _figure to check whether type(which_object) == type() If I understand that correctly something like that is definitely not possible in python < 2.2 (and I am not sure it is possible in 2.2). Well, the attached patch has an even worse hack than all the stuff before, but it does work along the python lines of cooperation:)) Eric> Please name functions and classes intended for scipy with all Eric> lower-case/underscore convention (setActive() --> set_active(). Eric> This has been used as uniformly as possible across the entire Eric> package (although some things are still getting fixed). Fine. Yes I think consistency is most important here -- it's a huge package. One comment from my side: How do you distinguish between classes/types and functions then? (I don't see real evidence for a verb vs. noun scheme either...:). Anyway, there should be something like /doc/ProgrammingGuidelines, I would suggest to start with the second attached file and put all "enforced" rules in there. Doesn't have to be very formal (yet), just put in the rules, if they are not clear that *will* be discussed on the list at some point, you can be sure:( Greetings, Jochen PS to Eric: Regarding patching: I think if you are on Windows you should save the patch as DOS-text, not Unix-text? Sorry, I do all this stuff within Cygwin, I really don't get any work like that done in Windoze. -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: text/diff Size: 2727 bytes Desc: SciPy patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ProgrammingGuidelines URL: From rossini at blindglobe.net Thu Oct 25 09:06:43 2001 From: rossini at blindglobe.net (A.J. Rossini) Date: 25 Oct 2001 06:06:43 -0700 Subject: [SciPy-dev] SciPy versus Matlab, Excel, and other tools In-Reply-To: References: Message-ID: <87vgh3lvh8.fsf@jeeves.blindglobe.net> >>>>> "Jochen" == Jochen K?pper writes: Jochen> Excel? What kind of "scientist" did you ask? I don't know Jochen> any serious scientist who uses Excel for more than Jochen> calculating a mean or getting a histogram. (Btw, these Jochen> people also publish standard deviations for 2-value Jochen> means... Well, it's not wrong, I guess) I sadly know many excellent scientists who primarily do analyses in excel. They do take a bit of time to get the analyses out, and the analyses tend to be correct, if simplistic (many corrected t-tests rather than a reasonably single linear (regression/anova) model). Don't judge the tool-user by the tools, however, the mark of a good one is the ability to convert when presented with evidence :-). best, -tony -- A.J. Rossini Rsrch. Asst. Prof. of Biostatistics U. of Washington Biostatistics rossini at u.washington.edu FHCRC/SCHARP/HIV Vaccine Trials Net rossini at scharp.org -------- (fridays are probably at Rosen) -------- FHCRC: M-W: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use Email UW: T-Th: 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX Rosen: (Mullins' Lab) Fridays, and I'm unreachable except by email. From ejones17 at austin.rr.com Thu Oct 25 09:06:22 2001 From: ejones17 at austin.rr.com (eric jones) Date: Thu, 25 Oct 2001 09:06:22 -0400 Subject: [SciPy-dev] reading ascii files into arrays References: <18646.1003998017@www7.gmx.net> Message-ID: <004701c15d55$d889d700$c400a8c0@ericlaptop> > Hi Eric ! > > I have decided to use python & scipy for data evaluation/presentation for > the future. Excellent. Glad to hear it. > One thing that I did not find in scipy (maybe I did not look > carefully enough) are commands for simple reading-in of ascii data from data files > with simple contents like: > > 1 2 > 2 4 > 3 9 > 4 7 > 5 9 > 6 1 > > Nothing more than 2 simple blank-seperated vectors in two columns. I have > tried it in pure python with the readline command an splitting the lines into > the blank-sepatated elements, but I think it is not very elegant since it > takes too many commands to do so. > Reading in of data from an external file is such a very fundamental think in > science that there should be a simple solution (imagine handling big data > sets). > > Do you see a possibility to make it easier ? I agree this is important. Travis Oliphant's scipy.io package has a module called array_import that I think will do what you want. It was adapted from some of Konrad Hinsen's work. file: test.dat 1 2 2 4 >>> from scipy import * >>> import scipy.io.array_import >>> help(scipy.io.array_import.read_array) read_array(fileobject, separator=None, columns=None, comment='#', lines=None, atype='d', linesep='\n', rowsize=10000, missing=0) Return an array containing the data from file |fileobject|. >>> q = scipy.io.array_import.read_array('c:\\test.dat') >>> q array([[ 1., 2.], [ 2., 4.]]) While this is available, I think it is buried way to deep in scipy. We need to pull the functionality up a level or two. As you say, this is a very common need and it should be made easily accessible. I also think it should be augmented to read from a string instead of just from a file -- although I guess this would need another name. The code for read_array is at the bottom of this file: http://scipy.net/cgi-bin/viewcvs.cgi/scipy/io/array_import.py?rev=1.5&conten t-type=text/vnd.viewcvs-markup Also: There has been a short discussion about the merits of MS Excel (which counts me as a user) on the scipy-dev list, and this is one of the things it does extremely well. It has an import capability that lets you split data in a fixed format or character delimited way. Whenever I need a quick and dirty plot of data in a file, I always reach for Excel to do this. It'd be nice to have something similar to Excel's import wizard available to those who like that sort of thing. For now, read_array will work quite nicely. see ya, eric From ejones17 at austin.rr.com Thu Oct 25 09:27:37 2001 From: ejones17 at austin.rr.com (eric jones) Date: Thu, 25 Oct 2001 09:27:37 -0400 Subject: [SciPy-dev] Re: PlotCanvas References: <86zo6h2ilo.fsf@bock.chem.unc.edu><000b01c15cd1$8755c530$6600a8c0@ericlaptop> Message-ID: <005e01c15d58$d09845b0$c400a8c0@ericlaptop> > Not exactly. What I really need is to tell plt about a new plot_canvas > it did't create by itself! Well, you could say I have to smuggle it in:) Ahh, ok. > The way to do that is to extend the "case" in figure() so when > which_object is not numeric and not in _figure to check whether > type(which_object) == type() > If I understand that correctly something like that is definitely not > possible in python < 2.2 (and I am not sure it is possible in 2.2). Your hack is fine for now I think. I'll apply the patches. > One comment from my side: How do you distinguish between classes/types > and functions then? (I don't see real evidence for a verb vs. noun > scheme either...:). > > Anyway, there should be something like /doc/ProgrammingGuidelines, > I would suggest to start with the second attached file and put all > "enforced" rules in there. Doesn't have to be very formal (yet), just > put in the rules, if they are not clear that *will* be discussed on > the list at some point, you can be sure:( I added your comment to the following page: http://www.scipy.org/site_content/tutorials/formatting_guidelines > PS to Eric: Regarding patching: I think if you are on Windows you > should save the patch as DOS-text, not Unix-text? Sorry, I do all this > stuff within Cygwin, I really don't get any work like that done in > Windoze. The Mingw32 tool set does suprisingly well at bridging the gap. Sophisticated make files don't work, but much of the other stuff does -- most of the familiar Unix commands are available. I use cygwin some also though, and Unix quite a lot. see ya, eric From ejones17 at austin.rr.com Thu Oct 25 09:46:08 2001 From: ejones17 at austin.rr.com (eric jones) Date: Thu, 25 Oct 2001 09:46:08 -0400 Subject: [SciPy-dev] SciPy versus Matlab, Excel, and other tools References: <87vgh3lvh8.fsf@jeeves.blindglobe.net> Message-ID: <007501c15d5b$66ae9890$c400a8c0@ericlaptop> I'm not from the camp of "Excel bad, Command line good" or visa-versa. They both have very nice qualities for different problems. Many many people use Excel because non-programmer can do quite sophistaticated analysis using it. The grid/cell function approach is very powerful. Heck, you can even do set up a 2D heat diffusion problem (finite-difference) in the cells very quickly and watch the solution converge to equilibrium. Programming/Scripting is also available for more sophisticated stuff via VB, COM, etc. It is a programming model that has an easy interface and yet can scale to more sophisticated needs. I don't like VB much, but the general model is good -- and something we can learn from. Graphs that you can manipulate from both the command line and by clicking on the graph is very desirable. Of course other tools like Origin, Matlab, IDL, Maple, SciGraphica, etc. all have things we can learn from to. I'm especially interested in borrowing ideas from SciGraphica as our plotting moves forward. We could just start using SciGraphica in SciPy, but it relies on GTK which is a show-stopper on windows (I know it is ported, but it ain't supported or stable, and it doesn't have a native look). We can also borrow some ideas from Sping, etc. There is much work to do improving SciPy's graphics. Besides solidifying the majority of SciPy's interface, I'd say this was 2nd in line as most important next task -- well documentation and unit tests rank way up there also... see ya, eric ----- Original Message ----- From: "A.J. Rossini" To: Sent: Thursday, October 25, 2001 9:06 AM Subject: Re: [SciPy-dev] SciPy versus Matlab, Excel, and other tools > >>>>> "Jochen" == Jochen K?pper writes: > > Jochen> Excel? What kind of "scientist" did you ask? I don't know > Jochen> any serious scientist who uses Excel for more than > Jochen> calculating a mean or getting a histogram. (Btw, these > Jochen> people also publish standard deviations for 2-value > Jochen> means... Well, it's not wrong, I guess) > > > I sadly know many excellent scientists who primarily do analyses in > excel. They do take a bit of time to get the analyses out, and the > analyses tend to be correct, if simplistic (many corrected t-tests > rather than a reasonably single linear (regression/anova) model). > > Don't judge the tool-user by the tools, however, the mark of a good > one is the ability to convert when presented with evidence :-). > > best, > -tony > > > -- > A.J. Rossini Rsrch. Asst. Prof. of Biostatistics > U. of Washington Biostatistics rossini at u.washington.edu > FHCRC/SCHARP/HIV Vaccine Trials Net rossini at scharp.org > -------- (fridays are probably at Rosen) -------- > FHCRC: M-W: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use Email > UW: T-Th: 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX > Rosen: (Mullins' Lab) Fridays, and I'm unreachable except by email. > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev > From altis at semi-retired.com Thu Oct 25 12:08:00 2001 From: altis at semi-retired.com (Kevin Altis) Date: Thu, 25 Oct 2001 09:08:00 -0700 Subject: [SciPy-dev] SciPy versus Matlab, Excel, and other tools In-Reply-To: <87vgh3lvh8.fsf@jeeves.blindglobe.net> Message-ID: Don't shoot the messenger. :) My purpose in bringing up Excel was more about the possibilities of using the graphing facilities via COM, which is a Windows-only solution so it is a non-starter based on Eric's messages. I'm not really a SciPy user, I was trying to better understand what facilities SciPy needed that would benefit from collaboration with PythonCard, other graphing tools or application frameworks. I'm actually starting work on a more general framework than PythonCard, which will be specifically for wxPython. The topic was brought up yesterday on the wxPython-users mailing list. http://aspn.activestate.com/ASPN/Mail/Message/wxPython-users/812294 Anyway, the win32com tools have an example of driving Excel with Python and COM which I've included in part below. In the ActivePython distribution (default install location), the files are: c:\python21\win32com\tests\testMSOffice.py c:\python21\win32com\tests\testMSOfficeEvents.py You can also handle events. When I did some Python COM work earlier this year I found the simplest solution was to use VB for the initial tests and to browse the COM object properties and methods and then modify the syntax as necessary for Python and then work in Python once the initial tests were done. Just something to keep in mind. The Excel COM model is documented on MSDN. Here's the Excel 2000 model http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/htm l/deovrMicrosoftExcel2000.asp ka --- def TextExcel(xl): xl.Visible = 0 if xl.Visible: raise error, "Visible property is true." xl.Visible = 1 if not xl.Visible: raise error, "Visible property not true." if int(xl.Version[0])>=8: xl.Workbooks.Add() else: xl.Workbooks().Add() xl.Range("A1:C1").Value = (1,2,3) xl.Range("A2:C2").Value = ('x','y','z') xl.Range("A3:C3").Value = ('3','2','1') for i in xrange(20): xl.Cells(i+1,i+1).Value = "Hi %d" % i if xl.Range("A1").Value <> "Hi 0": raise error, "Single cell range failed" if xl.Range("A1:B1").Value <> ((Unicode("Hi 0"),2),): raise error, "flat-horizontal cell range failed" if xl.Range("A1:A2").Value <> ((Unicode("Hi 0"),),(Unicode("x"),)): raise error, "flat-vertical cell range failed" if xl.Range("A1:C3").Value <> ((Unicode("Hi 0"),2,3),(Unicode("x"),Unicode("Hi 1"),Unicode("z")),(3,2,Unicode("Hi 2"))): raise error, "square cell range failed" xl.Range("A1:C3").Value =((3,2,1),("x","y","z"),(1,2,3)) if xl.Range("A1:C3").Value <> ((3,2,1),(Unicode("x"),Unicode("y"),Unicode("z")),(1,2,3)): raise error, "Range was not what I set it to!" # test dates out with Excel xl.Cells(5,1).Value = "Excel time" xl.Cells(5,2).Formula = "=Now()" import time xl.Cells(6,1).Value = "Python time" xl.Cells(6,2).Value = pythoncom.MakeTime(time.time()) xl.Cells(6,2).NumberFormat = "d/mm/yy h:mm" xl.Columns("A:B").EntireColumn.AutoFit() xl.Workbooks(1).Close(0) xl.Quit() def TestAll(): try: TestWord() print "Starting Excel for Dynamic test..." xl = win32com.client.dynamic.Dispatch("Excel.Application") TextExcel(xl) try: print "Starting Excel 8 for generated excel8.py test..." mod = gencache.EnsureModule("{00020813-0000-0000-C000-000000000046}", 0, 1, 2, bForDemand=1) xl = win32com.client.Dispatch("Excel.Application") TextExcel(xl) except ImportError: print "Could not import the generated Excel 97 wrapper" try: import xl5en32 mod = gencache.EnsureModule("{00020813-0000-0000-C000-000000000046}", 9, 1, 0) xl = win32com.client.Dispatch("Excel.Application.5") print "Starting Excel 95 for makepy test..." TextExcel(xl) except ImportError: print "Could not import the generated Excel 95 wrapper" except KeyboardInterrupt: print "*** Interrupted MSOffice test ***" except: traceback.print_exc() if __name__=='__main__': TestAll() CheckClean() pythoncom.CoUninitialize() From oliphant at ee.byu.edu Thu Oct 25 12:03:25 2001 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Thu, 25 Oct 2001 12:03:25 -0400 (EDT) Subject: [SciPy-dev] Reading in arrays. In-Reply-To: <200110251607.f9PG7E526198@scipy.org> Message-ID: As eric pointed out reading arrays of ASCII data is actually quite easy (and fairly sophisticated). It is available thanks to the support of Agilent who has given some money for the development of SciPy. Reading ascii data can be as simple as a = io.read_array('test.dat') # you can pass a string object already. to read in space-separated data as an array of doubles. Eric, Why on earth would you reach for Excel now that you have it this easy? (Except for maybe getting better graphics on windows --- if you have an X-server you can already do quite a bit). I'm not sure I agree with Eric that this is "buried" way to deep. io.read_array does not seem very deep to me. There are many options which can make the reading in easier. >>> help(io.read_array) read_array(fileobject, separator=None, columns=None, comment='#', lines=None, atype='d', linesep='\n', rowsize=10000, missing=0) Return an array represented ascii_formatted data in |fileobject|. Inputs: fileobject -- An open file object or a string for a valid filename. separator -- a string or a tuple of strings to indicate the column separators. If the length of the string tuple is less than the total number of columns, then the last separator is assumed to be the separator for the rest of the columns. columns -- a tuple of integers and range-tuples which describe the columns to read from the file. A negative entry in the last column specifies the negative skip value to the end. Example: columns=(1, 4, (5, 9), (11, 15, 3), 17, -2) will read [1,4,5,6,7,8,11,14,17,18,20,22,...] lines -- a tuple with the same structure as columns which indicates the lines to read. comment -- the comment character (line will be ignored even if it is specified by the lines tuple) linesep -- separator between rows. missing -- value to insert in array when conversion to number fails. atype -- the typecode of the output array. rowsize -- the allocation row size (array grows by this amount as data is read in). Adding wizards to make this more "interactive" may be useful especially for beginners. But, the functionality is there. -Travis From oliphant at ee.byu.edu Thu Oct 25 12:03:25 2001 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Thu, 25 Oct 2001 12:03:25 -0400 (EDT) Subject: [SciPy-dev] Reading in arrays. In-Reply-To: <200110251607.f9PG7E526198@scipy.org> Message-ID: As eric pointed out reading arrays of ASCII data is actually quite easy (and fairly sophisticated). It is available thanks to the support of Agilent who has given some money for the development of SciPy. Reading ascii data can be as simple as a = io.read_array('test.dat') # you can pass a string object already. to read in space-separated data as an array of doubles. Eric, Why on earth would you reach for Excel now that you have it this easy? (Except for maybe getting better graphics on windows --- if you have an X-server you can already do quite a bit). I'm not sure I agree with Eric that this is "buried" way to deep. io.read_array does not seem very deep to me. There are many options which can make the reading in easier. >>> help(io.read_array) read_array(fileobject, separator=None, columns=None, comment='#', lines=None, atype='d', linesep='\n', rowsize=10000, missing=0) Return an array represented ascii_formatted data in |fileobject|. Inputs: fileobject -- An open file object or a string for a valid filename. separator -- a string or a tuple of strings to indicate the column separators. If the length of the string tuple is less than the total number of columns, then the last separator is assumed to be the separator for the rest of the columns. columns -- a tuple of integers and range-tuples which describe the columns to read from the file. A negative entry in the last column specifies the negative skip value to the end. Example: columns=(1, 4, (5, 9), (11, 15, 3), 17, -2) will read [1,4,5,6,7,8,11,14,17,18,20,22,...] lines -- a tuple with the same structure as columns which indicates the lines to read. comment -- the comment character (line will be ignored even if it is specified by the lines tuple) linesep -- separator between rows. missing -- value to insert in array when conversion to number fails. atype -- the typecode of the output array. rowsize -- the allocation row size (array grows by this amount as data is read in). Adding wizards to make this more "interactive" may be useful especially for beginners. But, the functionality is there. -Travis From eric at scipy.org Thu Oct 25 14:22:57 2001 From: eric at scipy.org (eric jones) Date: Thu, 25 Oct 2001 14:22:57 -0400 Subject: [SciPy-dev] Reading in arrays. References: Message-ID: <00f501c15d82$124380f0$c400a8c0@ericlaptop> > As eric pointed out reading arrays of ASCII data is actually quite easy > (and fairly sophisticated). It is available thanks to the support of > Agilent who has given some money for the development of SciPy. Yes, and we still need to acknowledge their support on the site. : | It will happen, I've only recently paid SciPy serious attention again. > > Reading ascii data can be as simple as > > a = io.read_array('test.dat') # you can pass a string object already. > > to read in space-separated data as an array of doubles. > > Eric, Why on earth would you reach for Excel now that you have it this > easy? (Except for maybe getting better graphics on windows --- if you > have an X-server you can already do quite a bit). I'm hoping we'll get to the point where I won't, but it takes takes maybe 4 button clicks and 10 seconds to do it. I think you can make the argument that they are about equivalent effort now for some things. Its just whatever your used to... On the other hand the Excel import tool does things visually so you can see how your settings are affecting the division of data. Also, it handles files of mixed text/numbers just fine. For instance, I take Python profiling outputs and put them in Excel (actually cut/paste, but the interface is the same). It is trivial then to use Excel's nice sorting features to sort on the different columns. You can do this directly in Python also, it just isn't as quick for me. I'm sure others have equivalently nice ways of doing things, this is just my approach and it is very much facilitated by Excel's grid layout and import tools. Use the easiest tool for the tasks... and easiest is sometimes training dependent. Again, I'm not of the either/or opinion. I want both. I can forsee have a more flexible visual (GUI) import tool that was Excel like in functionality. This way we have the best of both worlds -- the feedback/flexibility afforded by a GUI along with the current command line/scripting interface. > I'm not sure I agree with Eric that this is "buried" way to deep. > > io.read_array does not seem very deep to me. Ahhh. I was looking at 0.1, not the CVS which doesn't automatically import array_import. The CVS version does have it promoted one level to living in io. I like that fine. see ya, eric > > > There are many options which can make the reading in easier. > > >>> help(io.read_array) > read_array(fileobject, separator=None, columns=None, comment='#', lines=None, > atype='d', linesep='\n', rowsize=10000, missing=0) > > Return an array represented ascii_formatted data in |fileobject|. > > Inputs: > > fileobject -- An open file object or a string for a valid filename. > separator -- a string or a tuple of strings to indicate the column > separators. If the length of the string tuple is less > than the total number of columns, then the last separator > is assumed to be the separator for the rest of the columns. > columns -- a tuple of integers and range-tuples which describe the > columns to read from the file. A negative entry in the > last column specifies the negative skip value to the end. > Example: columns=(1, 4, (5, 9), (11, 15, 3), 17, -2) > will read [1,4,5,6,7,8,11,14,17,18,20,22,...] > lines -- a tuple with the same structure as columns which indicates > the lines to read. > comment -- the comment character (line will be ignored even if it is > specified by the lines tuple) > linesep -- separator between rows. > missing -- value to insert in array when conversion to number fails. > atype -- the typecode of the output array. > rowsize -- the allocation row size (array grows by this amount as > data is read in). > > > Adding wizards to make this more "interactive" may be useful especially > for beginners. > > But, the functionality is there. > > -Travis > > > > > > > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev > From jochen at jochen-kuepper.de Thu Oct 25 23:26:14 2001 From: jochen at jochen-kuepper.de (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 25 Oct 2001 23:26:14 -0400 Subject: [SciPy-dev] Re: PlotCanvas In-Reply-To: <005e01c15d58$d09845b0$c400a8c0@ericlaptop> References: <86zo6h2ilo.fsf@bock.chem.unc.edu> <000b01c15cd1$8755c530$6600a8c0@ericlaptop> <005e01c15d58$d09845b0$c400a8c0@ericlaptop> Message-ID: On Thu, 25 Oct 2001 09:27:37 -0400 eric jones wrote: >> Anyway, there should be something like /doc/ProgrammingGuidelines, >> I would suggest to start with the second attached file and put all >> "enforced" rules in there. Doesn't have to be very formal (yet), just >> put in the rules, if they are not clear that *will* be discussed on >> the list at some point, you can be sure:( Eric> I added your comment to the following page: Eric> http://www.scipy.org/site_content/tutorials/formatting_guidelines Yeah, nice wording. But something like that, aimed at the scipy developer, should really be in cvs -- as plain text. Working on the source I won't go on the web to check that stuff out. I'll use the editor I am working in already and load the file one dir up (or so). (No, I am not even willing to start w3.) And there are more lazy people like me around:( If you wanna avoid line wraps on 80-char terminals you have to break at col 79, because some editors (*that is* Emacs) wrap lines with exactly 80 text-chars on such displays. Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll From eric at scipy.org Fri Oct 26 11:27:20 2001 From: eric at scipy.org (eric jones) Date: Fri, 26 Oct 2001 11:27:20 -0400 Subject: [SciPy-dev] Re: PlotCanvas References: <86zo6h2ilo.fsf@bock.chem.unc.edu><000b01c15cd1$8755c530$6600a8c0@ericlaptop><005e01c15d58$d09845b0$c400a8c0@ericlaptop> Message-ID: <028501c15e32$b479c720$c400a8c0@ericlaptop> Good idea. I added a file called FORMAT_GUIDELINES.txt to the CVS. As far as 79 vs. 80 characters, bummer. I didn't know that about emacs. Everything is (supposed to be) in 80 char format now. I guess we could fix this, but it ain't high on my list. eric ----- Original Message ----- From: "Jochen K?pper" To: Sent: Thursday, October 25, 2001 11:26 PM Subject: Re: [SciPy-dev] Re: PlotCanvas > On Thu, 25 Oct 2001 09:27:37 -0400 eric jones wrote: > > >> Anyway, there should be something like /doc/ProgrammingGuidelines, > >> I would suggest to start with the second attached file and put all > >> "enforced" rules in there. Doesn't have to be very formal (yet), just > >> put in the rules, if they are not clear that *will* be discussed on > >> the list at some point, you can be sure:( > > Eric> I added your comment to the following page: > > Eric> http://www.scipy.org/site_content/tutorials/formatting_guidelines > > Yeah, nice wording. > > But something like that, aimed at the scipy developer, should really > be in cvs -- as plain text. Working on the source I won't go on the > web to check that stuff out. I'll use the editor I am working in > already and load the file one dir up (or so). (No, I am not even > willing to start w3.) And there are more lazy people like me around:( > > If you wanna avoid line wraps on 80-char terminals you have to break > at col 79, because some editors (*that is* Emacs) wrap lines with > exactly 80 text-chars on such displays. > > Greetings, > Jochen > -- > Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de > Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E > Sex, drugs and rock-n-roll > > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev > From jochen at unc.edu Fri Oct 26 15:32:53 2001 From: jochen at unc.edu (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 26 Oct 2001 15:32:53 -0400 Subject: [SciPy-dev] Re: PlotCanvas In-Reply-To: <028501c15e32$b479c720$c400a8c0@ericlaptop> References: <86zo6h2ilo.fsf@bock.chem.unc.edu> <000b01c15cd1$8755c530$6600a8c0@ericlaptop> <005e01c15d58$d09845b0$c400a8c0@ericlaptop> <028501c15e32$b479c720$c400a8c0@ericlaptop> Message-ID: <86elnqp57e.fsf@bock.chem.unc.edu> On Fri, 26 Oct 2001 11:27:20 -0400 eric jones wrote: eric> Good idea. I added a file called FORMAT_GUIDELINES.txt to the eric> CVS. ok. But why is it all uppercase and with that ugly ".txt" extension? What in the world is wrong with "Format_Guidelines" (or "format_guidelines":)) ??? Not that it really matters:) eric> As far as 79 vs. 80 characters, bummer. PEP 8 eric> I didn't know that about emacs. Well, my emacsens usually have 120--150 chars per line anyway... eric> Everything is (supposed to be) in 80 char format now. I guess we eric> could fix this, but it ain't high on my list. I think there is no urgent need to change existing code, but new one should definitely stick to 79. (Or open it up to 132 (or so) and assuming nobody is using ttys anymore, I think that is not feasible yet:() Greetings, Jochen -- University of North Carolina phone: +1-919-962-4403 Department of Chemistry phone: +1-919-962-1579 Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E From eric at scipy.org Fri Oct 26 16:07:22 2001 From: eric at scipy.org (eric jones) Date: Fri, 26 Oct 2001 16:07:22 -0400 Subject: [SciPy-dev] Re: PlotCanvas References: <86zo6h2ilo.fsf@bock.chem.unc.edu><000b01c15cd1$8755c530$6600a8c0@ericlaptop><005e01c15d58$d09845b0$c400a8c0@ericlaptop><028501c15e32$b479c720$c400a8c0@ericlaptop> <86elnqp57e.fsf@bock.chem.unc.edu> Message-ID: <035b01c15e59$d348abe0$c400a8c0@ericlaptop> ----- Original Message ----- From: "Jochen K?pper" To: Sent: Friday, October 26, 2001 3:32 PM Subject: Re: [SciPy-dev] Re: PlotCanvas > On Fri, 26 Oct 2001 11:27:20 -0400 eric jones wrote: > > eric> Good idea. I added a file called FORMAT_GUIDELINES.txt to the > eric> CVS. > > ok. > > But why is it all uppercase and with that ugly ".txt" extension? What > in the world is wrong with "Format_Guidelines" > (or "format_guidelines":)) ??? > > Not that it really matters:) > picky, picky. The uppercase is somewhat of a standard for non-code stuff. Travis O. used it for LICENSE, etc. LAPACK and ATLAS both uses it for README, INSTALL, etc. The txt on the end is to be nice to windows users. The OS automatically recognizes that extension and uses the appropriate app to open the file. eric From jochen at jochen-kuepper.de Sun Oct 28 00:25:58 2001 From: jochen at jochen-kuepper.de (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 28 Oct 2001 00:25:58 -0400 Subject: [SciPy-dev] plot_window, zooming, and such Message-ID: Eric, here comes the next... zooming is there I put a class plot_window in plt/wxplt.py that corresponds to the PlotCanvas I send to the list before. Moreover I added zooming to the plot_canvas class. Seems to work, but I haven't tested it too much in interactive mode. Besides that I added the __type_hack__ stuff to figure() and cleaned up wxplt.py a bit, esp. changed method names according to the guidelines. One problem I run into (worked around here) is the interrelation between interface and wxplt: I cannot call autoscale() from plot_canvas methods, as validate_active seems to lead to a race condition in that case:( A demo application using plot_window can be found in jkext (on my homepage). Once that is a little further down the stream I'll make a standalone distro, but for testing that should be good enough. Almost all functionality is in scipy anyway. Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll -------------- next part -------------- A non-text attachment was scrubbed... Name: plt.patch Type: text/x-patch Size: 32994 bytes Desc: not available URL: From roybryant at SEVENtwentyfour.com Mon Oct 29 07:18:14 2001 From: roybryant at SEVENtwentyfour.com (Roy Bryant) Date: Mon, 29 Oct 2001 07:18:14 -0500 Subject: [SciPy-dev] Broken link in www.scipy.org Message-ID: There appears to be a problem on this page of your site. On page http://www.scipy.org/site_content/tutorials/build_instructions when you click on "the fftw home", the link to http://www.scipy.org/site_content/tutorials/www.fftw.org gives the error: Not found. Suggestion: You may have forgotten the "http:" As recommended by the Robot Guidelines, this email is to explain our robot's activities and to let you know about one of the broken links we encountered. LinkWalker does not store or publish the content of your pages, but rather uses the link information to update our map of the World Wide Web. Are these reports helpful? I'd love some feedback. If you prefer not to receive these occasional error notices please let me know. Roy Bryant ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Roy Bryant, roybryant at seventwentyfour.com President SEVENtwentyfour Inc. ("Always watching the Web") http://www.seventwentyfour.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From jochen at unc.edu Mon Oct 29 15:36:02 2001 From: jochen at unc.edu (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 29 Oct 2001 15:36:02 -0500 Subject: [SciPy-dev] ml archives Message-ID: <868zdu4219.fsf@bock.chem.unc.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Eric, Travis, is it possible to obtain the articles in the ml archive in raw text? Or, how is one supposed to get a patch out of the archives into a raw text file? Am I overseeing something? (I tried copy/pasting from the web-page and the source, but this always includes the html encodings of special chars.) Greetings, Jochen - -- University of North Carolina phone: +1-919-962-4403 Department of Chemistry phone: +1-919-962-1579 Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6-cygwin-fcn-1 (Cygwin) Comment: Processed by Mailcrypt and GnuPG iD8DBQE73b2yiJ/aUUS8zY4RApbzAJ4oJUuYbJyGHEWK+wa8aH3xNfbERACgsAVq APmSY9qqW5xPVLVJdd56px0= =bWRg -----END PGP SIGNATURE----- From travis at scipy.org Mon Oct 29 16:00:09 2001 From: travis at scipy.org (Travis N. Vaught) Date: Mon, 29 Oct 2001 15:00:09 -0600 Subject: [SciPy-dev] ml archives In-Reply-To: <868zdu4219.fsf@bock.chem.unc.edu> Message-ID: Doesn't this page give you a link to the raw text: http://www.scipy.net/pipermail/scipy-dev/ Let me know... TV > -----Original Message----- > From: scipy-dev-admin at scipy.org [mailto:scipy-dev-admin at scipy.org]On > Behalf Of Jochen Kupper > Sent: Monday, October 29, 2001 2:36 PM > To: travis at scipy.org; eric at scipy.org > Cc: scipy-dev > Subject: [SciPy-dev] ml archives > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Eric, Travis, > > is it possible to obtain the articles in the ml archive in raw text? > Or, how is one supposed to get a patch out of the archives into a raw > text file? Am I overseeing something? (I tried copy/pasting from the > web-page and the source, but this always includes the html encodings > of special chars.) > > Greetings, > Jochen > - -- > University of North Carolina phone: +1-919-962-4403 > Department of Chemistry phone: +1-919-962-1579 > Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 > Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6-cygwin-fcn-1 (Cygwin) > Comment: Processed by Mailcrypt and GnuPG > > iD8DBQE73b2yiJ/aUUS8zY4RApbzAJ4oJUuYbJyGHEWK+wa8aH3xNfbERACgsAVq > APmSY9qqW5xPVLVJdd56px0= > =bWRg > -----END PGP SIGNATURE----- > > _______________________________________________ > Scipy-dev mailing list > Scipy-dev at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-dev From jochen at unc.edu Mon Oct 29 17:59:38 2001 From: jochen at unc.edu (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 29 Oct 2001 17:59:38 -0500 Subject: [SciPy-dev] ml archives In-Reply-To: References: Message-ID: <86snc22gth.fsf@bock.chem.unc.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 29 Oct 2001 15:00:09 -0600 Travis N Vaught wrote: Travis> Doesn't this page give you a link to the raw text: Travis> http://www.scipy.net/pipermail/scipy-dev/ Ah, yes, that's something I overlooked; kinda works:) I was looking for something like a button on the article-html-page that gives me the raw text of the individual article I am looking at. So I could quickly copy/paste that into a file/text editor. Well, I'd say it would be great, but nothing high priority since the raw-text archive is a workaround Thanks for your help, Jochen - -- University of North Carolina phone: +1-919-962-4403 Department of Chemistry phone: +1-919-962-1579 Venable Hall CB#3290 (Kenan C148) fax: +1-919-843-6041 Chapel Hill, NC 27599, USA GnuPG key: 44BCCD8E -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6-cygwin-fcn-1 (Cygwin) Comment: Processed by Mailcrypt and GnuPG iD8DBQE73d9aiJ/aUUS8zY4RAhXpAKCrFk7f8kNNtNk3zliqLetd8R7CPwCfSzU1 9kSLs5Emu1lpk8PV80Vy6J8= =6Uu7 -----END PGP SIGNATURE----- From jochen at unc.edu Wed Oct 31 16:57:20 2001 From: jochen at unc.edu (Jochen =?iso-8859-1?q?K=FCpper?=) Date: 31 Oct 2001 16:57:20 -0500 Subject: [SciPy-dev] plotting enhancements and copyright In-Reply-To: <008401c16236$b66f7b80$c700a8c0@ericlaptop> References: <86hesgzmdm.fsf@bock.chem.unc.edu> <001201c161c7$cd474230$777ba8c0@ericlaptop> <867ktbk71g.fsf@bock.chem.unc.edu> <008401c16236$b66f7b80$c700a8c0@ericlaptop> Message-ID: <86u1wfiibj.fsf_-_@bock.chem.unc.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cc'ed to the scipy lists. Should also make it into the archive. This message is to inform the users and developers od SciPy what's going on in politics. The plot_window class (an earlier version of which I send to this lists) or respective changes to plot_canvas and some further changes to scipy.plt won't get included in scipy 'cause of politcal issues. This is sad as it provided a first implementation of zooming and an *useful* interface to use scipy.plt as wxWindow in other applications. See below for more. Because this is new for most people I cite a little more. Eric, eric> 4) Do you feel strongly about the inclusion of the copyright? For clarification: This is refering to a line at the top of the respective source file: "#Copyright (C) 2001 Jochen K?pper" >> Yes. The code is copyrighted by me anyway, so why not tell everybody? eric> Ok. Unfortunately, I am not interested in encumbering the eric> existing code with another copyright for a single or even eric> multiple additional features. This sort of thing is almost eric> never done because it can lead to major hassles in the future eric> trying to work with the 20 people who have added feature patches eric> and bug fixes to a file over its lifetime. What problems are you thinking of here? Changing the license? What else? eric> So I guess the best thing to do then if for you to derive a new eric> plot_canvas class and add/override the methods you need to and eric> place it in a new module. That's what I did to begin with. eric> You can then copyright this module. Yeah. I guess I just put it into jkext, so I can everything the way I like it, not restricted by scipy rules. (I do not want to argue about these rules. I think there have to be rules and the ones that are there are appropriate for the project from my point of view.) The module is GPL'ed. eric> I guess you need to include the Enthought/BSD copyright also if eric> any or my original code is in the modules and you plan on eric> distributing it separately. Yes. eric> As for how it is handled in SciPy, I'm not sure. We can include eric> your module, but the zoom capability is also likely to be folded eric> back into the original class once someone has the time to sit eric> down and work on the graphics code (with someone having to redo eric> your work). It isn't hard, as I showed. I actually spent more time to fit it into scipy than writing the stuff in the first place:( And this while I was learning wxPython. eric> I guess we'll need to add a policy that copyrights for patches eric> and bug fixes will need to be assigned to the original code eric> author or copyright holder. Contributors will be acknowledged in eric> the THANKS file. This is the standard practice in OS projects eric> so I didn't feel the need to make it explicit, but I will now to eric> prevent future confusion on the issue. New modules can retain eric> the authors copyright, as long as it is BSD compliant (or eric> whatever we eventually end up with). I think you are confusing things here. "Copyright" and "license" are two distinct features. Any code I write I do have a copyright on, no matter what the license is. I can give up my copyright i.e. by transfering it to someone else, but unless I explicitely do that I'll own the copyright. The license is whole different story. (I am ok with the BSD style licens, esp. since I see that there is (good) reasoning behind it.) Many people never write the FSF-papers. So far I am one of them. (Not that they would seriously need mine.) For now I am not going to transfer my copyright on BSD licensed code to a company, sorry. I wish SciPy good luck! Bye, Jochen - -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert?, ?galit?, Fraternit? GnuPG key: 44BCCD8E Sex, drugs and rock-n-roll -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6-cygwin-fcn-1 (Cygwin) Comment: Processed by Mailcrypt and GnuPG iD8DBQE74HPBiJ/aUUS8zY4RAkg8AJ9/samJAatCoGs8HtHZiyFYGa2LQQCfT0OY aFLQzbp5IzVZZKaUGovzZFA= =4r2z -----END PGP SIGNATURE-----