Re: What's so funny? WAS Re: rotor replacement

2005-01-25 Thread Robert Kern
Python source probably get it from their Linux/FreeBSD/other distribution where such dependencies are also taken care of for them. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http:/

Re: LinearAlgebra incredibly slow for eigenvalue problems

2005-01-28 Thread Robert Kern
work just fine as static libraries. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble installing numeric

2005-01-29 Thread Robert Kern
;Src', 'dlapack_lite.c') ] ] I tried uncommenting the lines, but no dice. Also modify the library_dirs_list and libraries_list variables, but keep these *_lite.c files commented out. library_dirs_list = [] libraries_list = [] That way, Numeric will just p

Re: python and gpl

2005-01-30 Thread Robert Kern
or requiring you to follow the GPL terms or pay for a license. Otherwise, they're probably SOL. If you're distributing PyQT binaries along with your package, then you should probably follow the GPL's terms. IANAL. TINLA. -- Robert Kern [EMAIL PROTECTED] "In the fields

Re: PyGame not working(?)

2005-01-30 Thread Robert Kern
n you need to run your scripts with pythonw, which will run the framework's interpreter in such a way that it can communicate with the native window server. This shouldn't give you the error above, though. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grow

Re: Image stats - going from Matlab to Python

2005-01-30 Thread Robert Kern
at makes these kinds of operations simpler. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Atlas and NumPy Problems

2005-02-01 Thread Robert Kern
for days, and I'm out of ideas. I am running OS X v10.3, gcc v3.3, Python v2.3, ScientificPython v2.4.3, and am attempting to install NumPy 23.7 Did you try to follow my advice from the other thread? What does your setup.py look like? -- Robert Kern [EMAIL PROTECTED] "In the fields of

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-02 Thread Robert Kern
ched. They also have compiled stuff that does not exist in the standard Python distribution. Back up your data and reinstall the OS. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- ht

Re: Atlas and NumPy Problems

2005-02-02 Thread Robert Kern
Robert Kern wrote: Justin Lemkul wrote: Hello all, I am hoping someone out there will be able to help me. I am trying to install a program that utilizes NumPy. In installing NumPy, I realized that I was lacking Atlas. I ran into the following problems installing Atlas and NumPy, as I

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-02 Thread Robert Kern
makes you a Python installation under /sw. But that doesn't solve his problem, which is to restore the Apple-supplied Python that he deleted. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Robert Kern
ting the Python that they provide. Future releases of Python should be easier to install *alongside* Apple's Python. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: SciPy gui_thread Problem

2005-06-18 Thread Robert Kern
: _ZNK6wxExpr3NthEi Something has been compiled incorrectly or shared libraries are missing. In any case, gui_thread probably won't work with wxPython 2.5. Development on gui_thread has stopped in favor of ipython's threading support. http://ipython.scipy.org http://ipython.scip

Re: Extensions on Linux: import without underscore?

2005-06-18 Thread Robert Kern
on extensions. If you must use Scons, read http://www.scons.org/cgi-bin/wiki/PythonExtensions and use SharedLibrary(... SHLIBPREFIX="", ...) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves o

Re: Extensions on Linux: import without underscore?

2005-06-18 Thread Robert Kern
'wx-config --cppflags --libs') Technique... I'll > have to ponder using one or the other or both. Hmm If you're extending wxPython, cannibalize wxPython's build procedure. Any other way, there madness lies. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: functions with unlimeted variable arguments...

2005-06-19 Thread Robert Kern
? Oddly enough, http://docs.python.org/ref/function.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: A tool for Python - request for some advice

2005-06-21 Thread Robert Kern
make step 3 easier in the, hopefully near, future: http://peak.telecommunity.com/DevCenter/EasyInstall -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: getting an object name

2005-06-21 Thread Robert Kern
r object can have any number of names in various scopes or have no name at all. In particular, in your code, the same list object has 2 names in 2 scopes, "alist" in the global scope and "list" in afunction's local scope. alist = range(10) blist = alist clist = [alist]

Re: pickle broken: can't handle NaN or Infinity under win32

2005-06-23 Thread Robert Kern
he cut itself, the value, practically, depends on which end of the branch you're deciding to approach the point from. It's arbitrary; there's no correct answer; but signed zeros give a way to express some of the desired, useful but wrong answers. And floating point is about nothi

Re: A tool for Python - request for some advice

2005-06-24 Thread Robert Kern
TPJ wrote: > I've heard about this "EasyInstall" and I like this idea. > > If EI becomes a part of Python's standard library, my script will use > it. Why wait? Just make it the second thing that the script installs after Python itself. -- Robert Kern [EMAIL PR

Re: Favorite non-python language trick?

2005-06-25 Thread Robert Kern
le for when this change will take place. map, filter, and reduce are safe for quite some time. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-25 Thread Robert Kern
world, nothing stops anyone from using their own extension module implementing map, filter, and reduce if they really want to. TSBOOOWTDI in the language/stdlib, but it shouldn't stop anyone from using other ways to do it that aren't in the stdlib if the tradeoffs are right for them. -- Ro

Re: A strange and annoying restriction, possibly a bug. A glance by a more experienced would be nice.

2005-06-25 Thread Robert Kern
n over non-sequence n is a sequence. *n correctly expands. The error is that 100 is not a sequence; tuple() requires a sequence or an iterator. tuple(*n) is equivalent to tuple(100). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the g

Re: Favorite non-python language trick?

2005-06-26 Thread Robert Kern
ng. You need to differentiate a = b = 1 from a = b == 1 -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-26 Thread Robert Kern
Terry Hancock wrote: > On Sunday 26 June 2005 06:11 am, Robert Kern wrote: > >>Terry Hancock wrote: >> >>>On Sunday 26 June 2005 05:39 am, Torsten Bronger wrote: >>> >>>>However, then you must forbid a=b=1 for assigning to two variables >>>

Re: A Module on Time & Date

2005-06-26 Thread Robert Kern
u can see in the datetime documentation, the module was introduced in Python 2.3. I recommend updating your Python installation. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-27 Thread Robert Kern
a.append(1) > py> b > [] > py> a = b = [] > py> a.append(1) > py> b > [1] What you wrote isn't, but what Terry wrote is. In [1]: a, b = ([],)*2 In [2]: a.append(1) In [3]: b Out[3]: [1] In [4]: a is b Out[4]: True -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-27 Thread Robert Kern
long release distance) and useful enough to > be granted a place in the stdlib? I would like to see the setuptools/PythonEggs/EasyInstall trifecta get more attention and eyeballs. Once it is mature, I think that it will obviate the desire for stdlibification of most of the packages being req

Re: rsync protocol in python

2005-06-27 Thread Robert Kern
David Bear wrote: > I was wondering if anyone has implemented the rsync protocol in python. GIYF. http://directory.fsf.org/pysync.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Har

Re: CAB files manipulation API (again).

2005-06-28 Thread Robert Kern
r friend. http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/e9a2237d820a4964 -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary to tuple

2005-06-28 Thread Robert Kern
The useless code referred to was the list comprehension. >>> t = tuple([(k,v) for k,v in d.iteritems()]) versus >>> t = tuple(d.items()) or even >>> t = tuple(d.iteritems()) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Robert Kern
; >>> v = 'mystring' > >>> o.e = v > setting e to mystring > >>> o.e > 'mystring' > >>> I think he means something like this: e = 'i_am_an_attribute' o.(e) = 10 o.i_am_an_attribute == 10 -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Robert Kern
muldoon wrote: >Now, what forum would you recommend? Any help would be appreciated. Not here. Beyond that, you're on your own. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richar

Re: Modules for inclusion in standard library?

2005-06-28 Thread Robert Kern
quires you to control the imports. It's a moot point anyways. The current ipython codebase isn't in any shape to go into the stdlib, and the rewrite hasn't quite begun, yet. Ask again in a year or two. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass gr

Re: Newbie: Explain My Problem

2005-06-29 Thread Robert Kern
ipcord after the > counter became zero. 3. Sign up for the Python-tutor list. (Okay, that's not quite "helping yourself," but it's still good advice, I think). http://mail.python.org/mailman/listinfo/tutor -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
uch of it the > "Python way", I suspect. So, I'm wondering if someone would like to show > me some of the tricks I should have used. Trick #1: import matplotlib ;-) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves

Re: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
Jan Danielsson wrote: > Robert Kern wrote: >>Trick #1: >> >>import matplotlib > > Oh. :-) > > That's a pretty neat trick -- now can you make my embarrassment go away? > >I did do a quick search to see if anyone had done anything similar; >

Re: Inheriting from object

2005-06-29 Thread Robert Kern
u (or someone else) may decide later to subclass it and want to use those features. It's a good habit to get into even if you don't initially plan on using those features. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams

Re: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
Jan Danielsson wrote: > Robert Kern wrote: > [---] > >>It's okay. Just about every Pythonista in the sciences has, at one time >>or another, started a plotting library. It's a rite of passage. Welcome >>to the club. :-) > >Question: I need to in

Re: Graphs/statistics using wxPython

2005-06-29 Thread Robert Kern
between micro-releases (i.e. different z). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie backreference question

2005-06-30 Thread Robert Kern
paulm wrote: > Hi, > In perl I can do something like: > > $a = 'test string'; > $a =~ /test (\w+)/; > $b = $1; > print $b . "\n"; > > and my output would be "string". > > How might this snippet be written in python? ht

Re: Modules for inclusion in standard library?

2005-06-30 Thread Robert Kern
style builds. > > How about integrating distutils and PyPI, so that distutils can > automatically download and install packages that are required by the > package it's currently installing? In other words, C-Python-AN. http://peak.telecommunity.com/DevCenter/EasyInstall -- Robert

Re: Using Numeric 24.0b2 with Scientific.IO.NetCDF

2005-06-30 Thread Robert Kern
ly simplifies certain types of code although the change does have its transition costs for some specific pieces of older code like yours. BTW, you don't want to use the builtin min(). That iterates over the array as if it were a Python list. Use minimum.reduce(). -- Robert Kern [EMAIL PR

Re: map vs. list-comprehension

2005-06-30 Thread Robert Kern
Roy Smith wrote: > Terry Hancock <[EMAIL PROTECTED]> wrote: > >>One of the strengths of Python has been that the language itself is >>small (which it shares with C and (if I understand correctly, not being >>a lisp programmer?) Lisp), but with all the syntax enhancements going >>on, Python is g

Re: shelve in a ZipFile?

2005-06-30 Thread Robert Kern
is in Python) modified to use arbitrary file-like storage. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run commands in command line from a script

2005-06-30 Thread Robert Kern
m('./some --command') More robust: Use the subprocess module. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run commands in command line from a script

2005-06-30 Thread Robert Kern
./some --command')' Read the documentation. os.system() opens up a new shell process. The command to change directories happens in that shell process, not python's process. Try another command. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wh

Re: Splitting string into dictionary

2005-06-30 Thread Robert Kern
27;fr':'la vache brun'} > > The language code is always 2 lower case letters. > > Many thanks. translations = [x.strip(" '") for x in line.split('|')] d = {} for i in range(0, 2*len(translations), 2): d[translations[i]] = translations[i+1] --

Re: Splitting string into dictionary

2005-06-30 Thread Robert Kern
27;fr':'la vache brun'} > > The language code is always 2 lower case letters. > > Many thanks. Ignore the last message. translations = [x.strip(" '") for x in line.split('|')] d = dict(zip(translations[::2], translations[1::2])) -- Robert K

Re: missing cephes module

2005-07-01 Thread Robert Kern
ut some help, py2exe's dependency inference won't pick up scipy's subpackages. Please consult py2exe's documentation on how to force it to include all of scipy and not rely on the default inference. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass g

Re: Programmers Contest: Fit pictures on a page

2005-07-01 Thread Robert Kern
Brian van den Broek wrote: > Well, I found it ironic, but only when you add that the genetic > algorithm approach came up in the context of a "best fit" problem. > Survival of the fittest indeed :-) Optimization codes don't always succeed. What's the irony? --

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Robert Kern
one of the first 3rd party modules to come out for Python 3000 will be such a library. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Robert Kern
ty clear that python is leaving > its multiparadigmatic origins behind. "do it our way," the pundits are > effectively saying, "or get out". for my part, i'm getting out. If that's what you want to do, no one is going to stop you. But please do it quietly. -- Rober

Re: Bad Math

2005-07-01 Thread Robert Kern
s fishy here... whats up? > > --python 2.4.1 http://docs.python.org/tut/node16.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-02 Thread Robert Kern
John Roth wrote: > "Robert Kern" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>map and filter are being removed *because of* list comprehensions. Did you >>even read Guido's articles about this issue? Your understanding of why

Re: What's wrong with this code?

2005-07-02 Thread Robert Kern
Nathan Pinno wrote: > Hi all, > > What's wrong with the following code? It says there is name error, that > random is not defined. How do I fix it? You need to import random. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Ar

Re: A brief question.

2005-07-02 Thread Robert Kern
Nathan Pinno wrote: > > Hi all, > > Brief question for anyone who knows the answer, because I don't. Is > there anyway to make Python calculate square roots? http://docs.python.org/ There is a search facility. -- Robert Kern [EMAIL PROTECTED] "In

Re: Will Guido's "Python Regrets" ever get implemented/fixed?

2005-07-02 Thread Robert Kern
27;println' version IIRC. > >He also had a ton of stuff he'd rather see become iterators. As currently being (re)discussed at tedious length in recent threads here, changes would will only be realized in Python 3.0 (aka Python 3000 in facetious reference to when we can e

Re: Accepted Summer of Code proposals

2005-07-03 Thread Robert Kern
the author had too little experience, or any number of other things. (Disclosure: I am now a co-mentor on an unrelated SoC project, but I wasn't part of the group rating and selecting proposals.) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Robert Kern
ks, *then* is the time to be having these discussions. Right now, all we're doing is making each other bitter and angry for no good reason. [1] Okay, there was that guy who predicted that list comprehensions and first-class functions were the next to go. That was new. But als

Re: missing cephes module

2005-07-04 Thread Robert Kern
he last time you posted this question here? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils is able to handle...

2005-07-05 Thread Robert Kern
27;t think distutils can handle all these, especially the last one, > so I doubt it's the right tool in your case. I would suggest SCons > (http://www.scons.org/), a modern make/automake/autoconf replacement > that uses python for its configuration files instead of yet another > cryptic hal

Re: Using Numeric 24.0b2 with Scientific.IO.NetCDF

2005-07-05 Thread Robert Kern
n2:'int'> > > Even something like: > >>>>import Numeric >>>>a = Numeric.array([1.,2.]) >>>>print type(a),type(min(a)) > > > > does not produce an array. Hmm, odd. Anyways, follow my advice: use minimum.reduce() a

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-05 Thread Robert Kern
Dan Bishop wrote: > There's also the issue of having to rewrite old code. It's Python 3000. You will have to rewrite old code regardless if reduce stays. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dre

Re: Scipy - Latex Annotations in plots

2005-07-06 Thread Robert Kern
ave this functionality in recent releases. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Scipy - Latex Annotations in plots

2005-07-06 Thread Robert Kern
Matthias R. wrote: > Unfortunately matplotlib is only a 2D-plotting library. > > Do you know another one with 3D-capabilities as well? There's PyX. > That would be very nice, Yes, yes it would. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the gras

Re: Compatibility of recent GCC/Python versions

2005-07-06 Thread Robert Kern
nt for these new reports. Any relevant > information would be appreciated. I've had intermittent problems on OS X and gcc-4.0 with, well, everything, Python-related or otherwise. So I ignore it and use gcc-3.3 and g77-3.4 and live happily ever after. -- Robert Kern [EMAIL PROTECTED]

Re: HELP!

2005-07-07 Thread Robert Kern
Ert Ert wrote: > Please help me i down loaded python nd itplays on MS-DOS mode and not on > normal please help So what's your problem? Please read http://www.catb.org/~esr/faqs/smart-questions.html Then reformulate your question so that we can answer it. -- Robert Kern [EMAI

Re: Favorite non-python language trick?

2005-07-07 Thread Robert Kern
or > "convenient!" are already implemented by some Pythonista(s). Spoils all the > fun for reinventing the wheel, doesn't it. :) Doesn't seem to stop most Pythonistas from trying, though. :-) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows h

Re: Python Module Exposure

2005-07-07 Thread Robert Kern
uss your module. Formal announcements once you, e.g. put it on SF should go to c.l.py.announce . -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp development with macros faster than Python development?..

2005-07-07 Thread Robert Kern
of > said the same thing about *their* language a couple of years ago. I wish > web pages, like newgroup posts, were dated so one could better trace the > history of such usages. Trawling through http://web.archive.org might help. -- Robert Kern [EMAIL PROTECTED] "In

Re: Is there an easy way to get at the value of DBL_MAX from Python?

2005-07-07 Thread Robert Kern
e Numeric distribution and no one has made a real release since. However, it is still available in CVS. http://cvs.sourceforge.net/viewcvs.py/numpy/kinds/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: No module named numarray

2005-07-09 Thread Robert Kern
level- > from nltk.probability import ConditionalFreqDist > File "C:\Python24\Lib\site-packages\nltk\probability.py", line 56, in > -toplevel- > import types, math, numarray > ImportError: No module named numarray Install numarray. http://www.stsci.edu/resources/s

Re: computer algebra packages

2005-07-10 Thread Robert Kern
h based on PyGTK, the other based on wxPython. > > I was not successful googling for this one. Would you have an URL handy? Note the deliberate spelling, and cut-and-paste. http://home.arcor.de/mulk/projects/mascyma/index.xhtml.de -- Robert Kern [EMAIL PROTECTED] "In the fields of hel

Re: ZipFile and file rigths

2005-07-10 Thread Robert Kern
(ie : stuffit ): >-rwxr-xr-x foo.exe > ZipInfo objects doesn't store informations about rights ? > (http://www.python.org/doc/current/lib/zipinfo-objects.html#zipinfo-objects) > > How can i fix this ? This is possibly related, I'm not sure: http://article.

Re: ZipFile and file rigths

2005-07-10 Thread Robert Kern
his has any relevance to the problem that you are seeing. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: computer algebra packages

2005-07-10 Thread Robert Kern
Bengt Richter wrote: > Then googling for mascsyma [sic ;-)] got I doubt it. ;-) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: No module named numarray

2005-07-11 Thread Robert Kern
umarray > > can you please tell me the cause I already did. You need to install numarray. http://www.stsci.edu/resources/software_hardware/numarray -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: How does this code works:

2005-07-11 Thread Robert Kern
> the LGB rule. I thought that s is not accessible from bar, but it is, > apparently. Why? Python now has nested scopes. http://www.python.org/peps/pep-0227.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die

Re: tuple.index(item)

2005-07-11 Thread Robert Kern
(Debian 1:3.3.6-6)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> > >>> t = ('a', 'b', 'c') > >>> t[1] > 'b' > >>>

Re: Puzzled

2005-07-11 Thread Robert Kern
7;or'] str.capitalize() changes the first character to be uppercase and all later characters to be lower case. It does not leave the later characters alone. In [1]: str.capitalize? Type: method_descriptor Base Class: String Form: Namespace: Python builtin Docstring:

Re: Managment of Python Libraries

2005-07-12 Thread Robert Kern
t; As I embark on the wonderful language of Python, or there any object > organizational tools that may help me to keep order? There's Bicycle Repair Man: http://bicyclerepair.sourceforge.net/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are t

Re: Trying to come to grips with static methods

2005-07-12 Thread Robert Kern
nstance which isn't actually needed. It could also be a classmethod, but since it doesn't actually need any information from the class to do its work, I find that the extra reminder of staticmethod helps my brain understand what it's doing. All told, I'd probably vote -0.5 on a

Re: Trying to come to grips with static methods

2005-07-12 Thread Robert Kern
n [3]: class NewPoint(Point): ...: pass ...: In [4]: def parseXML(xmlText): ...: return 1, 4 ...: In [5]: p = NewPoint.fromXML('') In [6]: isinstance(p, NewPoint) Out[6]: True -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows h

Re: Web App like Google

2005-07-12 Thread Robert Kern
approach. For example: http://www.jfsowa.com/clce/specs.htm http://www.ics.mq.edu.au/~rolfs/controlled-natural-languages/ http://www.ifi.unizh.ch/attempto/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating anonymous functions using eval

2005-07-12 Thread Robert Kern
threaded form, so you need to provide some context for them to be able to follow along. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: python parser

2005-07-12 Thread Robert Kern
lt to do so again. Of course, if you just need *a* Verilog parser, not necessarily one written by you, you could just email the guy who wrote it and ask him for a copy. Grep http://pyparsing.sourceforge.net/ for "Verilog". -- Robert Kern [EMAIL PROTECTED] "In the fields

Re: Creating anonymous functions using eval

2005-07-12 Thread Robert Kern
Joseph Garvin wrote: > Robert Kern wrote: > >>Not everyone is reading this list in a conveniently threaded >>form > > Why not? Just about every modern newsgroup reader and e-mail app has a > threaded view option. Good point. Allow me to modify my statement: not

Re: plot module

2005-07-12 Thread Robert Kern
hem may even be called "plot". Which one are you talking about? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Building a function call?

2005-07-13 Thread Robert Kern
s a good place to use eval. > > aString = "dothat" > atuple = (x, y) > > If aString is the name of a function in the current module: > >globals()[aString](*aTuple) > > If aString is a function in another module: > >import otherModule >v

Re: Splitting on a word

2005-07-13 Thread Robert Kern
7;). > > I am asking if there is some alternative (more pythonic...): For *this* particular task, certainly. It begins with import BeautifulSoup The rest is left as a (brief) exercise for the reader. :-) As for the more general task of splitting strings using regular expressions, see r

Re: Documenting extension modules?

2005-07-15 Thread Robert Kern
> Also, I'd like to know if there's a typical format for the help string > (but in C), compatible with docstring's > """short desription > > long description""" char *o_count__doc__; char *o_count__doc__ = "short description\n"

Re: Question about basic use of a timer object from timeit module to execute code every so often in a class

2005-07-15 Thread Robert Kern
documentation for timeit. It doesn't do what you think it does. Look at wxTimer instead. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuples in function argument lists

2005-07-17 Thread Robert Kern
Tuple-as-arg is probably pretty safe. Tuple-as-keyword, possibly not-so-much. > Does anyone use this behaviour, and if so, under what circumstances is it > useful? import math def distance((x1,y1), (x2,y2)): return math.sqrt((x2-x1)**2 + (y2-y1)**2) distance(point1, point2) Per

Re: beginner question fibonacci

2005-07-17 Thread Robert Kern
t is created first, with the old values of a and b. Then a and b are reassigned. The value of a doesn't change until *after* a+b is calculated. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser : overwrite ?

2005-07-17 Thread Robert Kern
!cat foo.ini [section1] foodir: %(dir)s/whatever dir: foo In [2]: fn = 'foo.ini' In [3]: import ConfigParser In [4]: cfg = ConfigParser.ConfigParser() In [5]: cfg.read(fn) Out[5]: ['foo.ini'] In [6]: cfg.set('section1', 'dir', 'anotherdir') In [7]:

Re: Filtering out non-readable characters

2005-07-18 Thread Robert Kern
sary. Allowing generator expressions to forgo extra parentheses where they aren't required is something different, and in my opinion, a good thing. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: goto

2005-07-19 Thread Robert Kern
scribe it. I've settled on "Lovecraftian": reading the code, you can't help but get the impression of writhing tentacles and impossible angles. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die

Re: OO design

2005-07-19 Thread Robert Kern
o bad designs; we just fix them later. In short slogans: Just Do It. Make It Work, Then Make It Right. Refactor Mercilessly. Do the Simplest Thing That Could Possibly Work. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: What does "::" mean?

2005-07-19 Thread Robert Kern
-- > "[::-1]" can reverse a string magicly, how did it do it? The full form would be live[len(live)-1:-1:-1] much like range(len(live)-1, -1, -1). [start:stop:step] step can be negative. -- Robert Kern [EMAIL PROTECTED] "In

Re: What does "::" mean?

2005-07-20 Thread Robert Kern
form"), I have to put a char in front of > the string and...: > ('x'+live)[len(live)+1:0:-1] # --> "evil" > Is it due to the Python's version (I still have 2.3.4)? No, it's because I am stupid. There isn't a full form. live[len(live)::-1] is the clos

<    1   2   3   4   5   6   7   8   9   10   >