Re: RegEx question

2007-10-04 Thread Robert Dailey
It should also match: @param[out] state Some description of this variable On 10/4/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > > Hi, > > The following regex (Not including the end quotes): > > "@param\[in|out\] \w+ " > > Should match any of the followi

Re: RegEx question

2007-10-04 Thread Robert Dailey
On 10/4/07, Adam Lanier <[EMAIL PROTECTED]> wrote: > > > try @param\[(in|out)\] \w+ > This didn't work either :( The tool using this regular expression (Comment Reflower for VS2005) May be broken... -- http://mail.python.org/mailman/listinfo/python-list

Re: RegEx question

2007-10-04 Thread Robert Dailey
On 10/4/07, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > > You *are* talking about python regular expressions, right? There are a > number of different dialects. Also, there could be issues with the quoting > method (are you using raw strings?) > > The more specific you can get, the more we can

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Robert Kern
e why isn't it defined as such in the > library? It's a shorthand for [None:None:-1]. I think you're misinterpreting the sentence, "If i or j are omitted or None, they become ``end'' values (which end depends on the sign of k)." The end values *aren't* 0 a

Off Topic: Gmail hates newsgroups!!!

2007-10-04 Thread Robert Dailey
I don't know how many other people subscribe to the python mailing list and use the mailing list using the web-based interface for Gmail, but I do. I use it mainly because Gmail doesn't support IMAP and I use my email from multiple locations. Gmail web based works fine except that it starts your ca

Re: RegEx question

2007-10-04 Thread Robert Dailey
I am not a regex expert, I simply assumed regex was standardized to follow specific guidelines. I also made the assumption that this was a good place to pose the question since regular expressions are a feature of Python. The question concerned regular expressions in general, not really the applica

Re: What does the syntax [::-1] really mean?

2007-10-04 Thread Robert Kern
nd j. The default values for > i and j would become (0,len(x)), flopped for k < 0. > > There may be a good (or not-so-good) reason this representation > wouldn't have worked or would have caused problems. Or maybe it is > just personal preference. It would be inconsistent f

Re: module confusion

2007-10-04 Thread Robert Kern
quot;os.path" (assuming you've imported the standard library's os module) is another module and that os itself is a module, not a package like logging is. This is somewhat odd, because most modules aren't exposed that way. They are either in their own file and accessed by i

csv module and Unicode

2007-10-05 Thread Robert Dailey
Hi, According to the Python 2.5 documentation, Unicode is not supported through the CSV module. Is there some third-party CSV module I can use that has Unicode support? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: csv module and Unicode

2007-10-08 Thread Robert Dailey
Wow; I guess this is a REAL problem! I would have thought that something as common as Unicode CSV would have been supported by SOMEONE. On 10/5/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > > Hi, > > According to the Python 2.5 documentation, Unicode is not supported > throu

for loop question

2007-10-10 Thread Robert Dailey
Hi, I'm currently writing my own CSV parser since the built in one doesn't support Unicode. I'm wondering if there's a way to iterate over the characters in a unicode string and have access to both the 'current' and the 'next' characters each iteration. For example: test = u"Hello World" for cur

Re: for loop question

2007-10-10 Thread Robert Dailey
All the ideas presented here are workable. I definitely have a lot of solutions to choose from. Thanks everyone for your help. I wasn't sure if there was some sort of language feature to naturally do this, so I had to post on the mailing list to make sure. -- http://mail.python.org/mailman/listinf

Re: for loop question

2007-10-10 Thread Robert Dailey
ng isnt' in the range of range(128) or something (Not really an expert on Unicode so I'm not sure of the meaning). I would use CSV if I could! On 10/10/07, Carsten Haese <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-10-10 at 15:27 -0500, Robert Dailey wrote: > > I'm u

Re: for loop question

2007-10-10 Thread Robert Dailey
On 10/10/07, Carsten Haese <[EMAIL PROTECTED]> wrote: > > Instead of passing the file object directly to the csv parser, pass in a > generator that reads from the file and explicitly encodes the strings > into UTF-8, along these lines: > > def encode_to_utf8(f): > for line in f: > yield

How to "dereference" an iterator?

2007-10-10 Thread Robert Dailey
Hi, Suppose I wanted to manually iterate over a container, for example: mylist = [1,2,3,4,5,6] it = iter(mylist) while True: print it it.next() In the example above, the print doesn't print the VALUE that the iterator currently represents, it prints the iterator itself. How can I get th

Problems with struct.pack()

2007-10-10 Thread Robert Dailey
Hi, I have opened a unicode file for writing: import codecs file = codecs.open( "somefile.dat", "wb", "utf-16" ) and I attempt to do this: file.write( struct.pack( "I", 5000 ) ) However, this won't work because the encoding of the string returned by "pack" isn't unicode. I'm a bit confused rig

Re: Problems with struct.pack()

2007-10-10 Thread Robert Dailey
details. On 10/10/07, Carsten Haese <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-10-10 at 19:00 -0500, Robert Dailey wrote: > > Hi, > > > > I have opened a unicode file for writing: > > > > import codecs > > file = codecs.open( "somefile.dat",

Re: How to "dereference" an iterator?

2007-10-10 Thread Robert Dailey
it to solve this problem as well. Sorry for lack of details. Thanks for everyone's help. On 10/10/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > The original post seems to have been eaten, so I'm replying via a reply. > Sorry for breaking threading. > > &g

Re: How to "dereference" an iterator?

2007-10-10 Thread Robert Dailey
Thanks! Yellow is my favorite color! On 10/10/07, Pablo Ziliani <[EMAIL PROTECTED]> wrote: > > Robert Dailey wrote: > > (...) > > What I was actually trying to accomplish was to iterate over 2 > > iterators using 1 for loop, however I found that the zip() function

Re: Problems with struct.pack()

2007-10-11 Thread Robert Dailey
On 10/11/07, Carsten Haese <[EMAIL PROTECTED]> wrote: > > This is much clearer, and it explains why you need to mix arbitrary binary > data with unicode text. Because of this mixing, as you have surmised, > you're > going to have to treat the file as a binary file in Python. In other > words, > don

Re: numpy : efficient sum computations

2007-10-16 Thread Robert Kern
cts. > > Now I want to sum up on axis 2 and 3. If I do : >> (m[:,:] * d).sum(axis=3).sum(axis=2) > it seems like I get my result. > > I'm wondering : is this syntax leading to efficient computation, or is > there something better ? That's about it. There's no

Re: numpy : efficient sum computations

2007-10-16 Thread Robert Kern
ut[17]: array([[ 0, 6], [12, 18], [24, 30]]) In [18]: d * phi[1, 2] Out[18]: array([[ 0, 6], [12, 18], [24, 30]]) In [19]: for i in range(phi.shape[0]): : for j in range(phi.shape[1]): : assert (m[i,j] == d*phi[i,j]).all() : :

Re: how to get my own namespace ?

2007-10-16 Thread Robert Kern
t dictionary in some circumstances. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: why doesn't have this list a "reply-to" ?

2007-10-16 Thread Robert Kern
s list because I like my lists to act like USENET. http://gmane.org -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: negative base raised to fractional exponent

2007-10-16 Thread Robert Kern
A couple of questions. > > 1. How do you approximate a complex number in the reals? That doesn't > make sense. > > 2. x ^ -4. = 1 / (x ^ 4.), so where do complex numbers enter > into this anyway? When *x* is negative and the exponent is fractional. -- Robert Ker

Re: why doesn't have this list a "reply-to" ?

2007-10-16 Thread Robert Kern
Grant Edwards wrote: > On 2007-10-16, Robert Kern <[EMAIL PROTECTED]> wrote: > >> It's not universal. Many people consider it harmful. Google "reply-to >> considered >> harmful" for a variety of opinions, for and against. >> >> I use GMane

Re: Appending a list's elements to another list using a list comprehension

2007-10-17 Thread Robert Kern
w I'm being a little finicky here, but how would someone know > that a+=b is not the same as a=a+b? > Any documentation or reference that mentions this? http://docs.python.org/ref/augassign.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harm

Re: why doesn't have this list a "reply-to" ?

2007-10-17 Thread Robert Kern
27;m using Thunderbird 2.0.0.0: I use the right-click menu. And click what? I have Thunderbird 2.0.0.6 on OS X and only see "Reply to Sender Only" and "Reply to All". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is ma

Re: Python script for mobile platforms -- suggested?

2007-10-19 Thread Robert Dailey
On 8/14/07, Jay Loden <[EMAIL PROTECTED]> wrote: > > XML is first and foremost a machine-parseable language, and a human-readable > one second ;) I don't think this is particularly hard to read, but then I > work with XML configuration files on a daily basis at work, so I may just be > a terribl

__main__ : What is this?

2007-10-19 Thread Robert Dailey
Hi, I've read various portions of the Python 2.5 documentation in an attempt to figure out exactly what the following condition represents: if __name__ == "__main__": main() However, I was not able to determine what it is actually checking for. Could someone point me in the way of a tutorial

C++ version of the C Python API?

2007-10-19 Thread Robert Dailey
Hi, Is there a C++ version of the C Python API packaged with python 2.5? It would be nice to have a OOP approach to embedding python in C++. It would also be a bonus if this C++ Python API cleaned up a lot of the messy code involved in embedding python. Thanks. -- http://mail.python.org/mailman/

Re: C++ version of the C Python API?

2007-10-21 Thread Robert Dailey
On 10/21/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Is there a C++ version of the C Python API packaged with python 2.5? > > Stargaming has already mentioned the fine points; the first answer is: > yes, the API packaged python 2.5 can be used with C++. It is a C++ > version of the same AP

Re: C++ version of the C Python API?

2007-10-21 Thread Robert Dailey
On 10/21/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > I think you are misinterpreting what you are seeing. The Python C API > *is* object-oriented. It has all features of object-orientation: > classes, encapsulation, polymorphism, late binding, ... > > As for "make your own": people have trie

Re: C++ version of the C Python API?

2007-10-21 Thread Robert Dailey
On 10/21/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > No, I literally meant that the Python C API is object-oriented. > You don't need an object-oriented language to write object-oriented > code. I disagree with this statement. C is not an object oriented language, and I've seen attempts to

Re: parallel NumPy: PyMPI, myMPI or something else?

2007-10-21 Thread Robert Kern
s NumPy already > optimized for a MPI environment so that for example matrix > multiplication, iterative solvers etc. are automatically distributed? No. > Or do I have to split each problem myself to make use of the > parallelism? Pretty much. -- Robert Kern "I have come to

Re: C++ version of the C Python API?

2007-10-22 Thread Robert Dailey
On 10/22/07, Nicholas Bastin <[EMAIL PROTECTED]> wrote: > > Object-oriented programming is a design choice, not a language > feature. You can write straight procedural code in C++, and you can > write object oriented code in C. Sure, C++ has some language features > which facilitate object-orient

Re: parallel NumPy: PyMPI, myMPI or something else?

2007-10-22 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Robert, > the answer could not have been shorter, but I got exactly the > information I was looking for :-) > Thank you so much! > > Just a single followup question: >>> Or do I have to split each problem myself to make use of the >>>

Re: Using arrays in Python - problems.

2007-10-23 Thread Robert Kern
e quite inefficient. How about initialising it > with a required size? > > F = numpy.array([0]*shotcount) A more idiomatic version would be this: F = numpy.empty((shotcount,), dtype=float) attackwarningred, you might want to ask your numpy questions on the numpy-discussion mailing list:

Re: Pari Python

2007-10-28 Thread Robert Kern
break other Python modules. If you can't use other Python modules with your module, what's the point of using Python at all? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Pari Python

2007-10-28 Thread Robert Kern
to achieve what you want. You just need to parse your almost-Python code yourself before executing it. That's what SAGE does. You really should take a closer look at it. It is possible to take just part of SAGE and not install the whole thing. -- Robert Kern "I have come to believe that

Re: Function to resize global numpy array interactively in ipython

2007-10-29 Thread Robert Kern
space gets updated with the values in that namespace. The global statement refers to that initial namespace, not the one of the interactive prompt. Give "%run -i resize.py" a try, though. That should execute the code in the interactive prompt's namespace. -- Robert Kern "

just a crazy question

2007-11-01 Thread Robert LaMarca
. But.. Just thought maybe someone out in Python world would have an idea? Thanks! Best Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: (MAC) CoreGraphics module???

2007-11-01 Thread Robert Kern
n.framework. The module was made by Apple, and they have not released the source code, so it cannot be made to work with the www.python.org distribution. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad a

Re: (MAC) CoreGraphics module???

2007-11-02 Thread Robert Kern
David C. Ullrich wrote: > On Thu, 01 Nov 2007 19:39:20 -0500, Robert Kern > <[EMAIL PROTECTED]> wrote: > >> David C. Ullrich wrote: >>> [why doesn't CoreGraphics work?] >> That's different than the one that is referenced. The one those articles >

Re: Read CSV file into an array

2007-01-09 Thread Robert Kern
oyekomova wrote: > I would like to know how to read a CSV file with a header ( n columns > of float data) into an array without the header row. Did you read our responses from the last time you asked this question? -- Robert Kern "I have come to believe that the whole world is a

Re: Frequency spectrum with fft of a real valued array...?

2007-01-11 Thread Robert Kern
if n is even f = [0,1,...,(n-1)/2,-(n-1)/2,...,-1]/(d*n) if n is odd -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." --

Re: Learning Python book, new edition?

2007-01-11 Thread Robert Hicks
I would get "Core Python Programming" by Wesley Chun. It covers just about everything under the sun and includes version 2.5. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: globals accros modules

2007-01-11 Thread Robert Kern
his slides from his talk at SciPy '06: http://www.third-bit.com/lectures/scipy06.pdf -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth."

Re: Rational Numbers

2007-01-11 Thread Robert Kern
Noud Aldenhoven wrote: > I'm a mathematician (in learning, with a bad feeling for English) and > don't trust irrational numbers in programming languages. You may want to look at SAGE. It provides a ton of good mathematical code. http://sage.scipy.org/sage/ -- Robert Kern

Re: Intellectual Property Talk at PyCon

2007-01-11 Thread Robert Kern
ns all around. Of course, it would be nice if what you say agrees with my opinions on the subject, but I'll let you slide if you at least say something sensible. ;-) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-11 Thread Robert Kern
id, sep=',').reshape(-1,6) > # for 6-column data. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: The curious behavior of integer objects

2007-01-15 Thread Robert Kern
not modify the object at all or change the result of instantiating foo(). You need to override __new__ to get the behavior that you want. http://www.python.org/download/releases/2.2.3/descrintro/#__new__ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

Re: why scipy cause my program slow?

2007-01-16 Thread Robert Kern
does not have builtin types for. Unfortunately, the code paths that get executed when arithmetic is performed sith such scalars are still suboptimal; I believe they are still going through the full ufunc machinery. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-01-17 Thread Robert Hicks
Please, none of the real facts points to anything else except what actually happened. Two planes hit two towers and they came down. -- http://mail.python.org/mailman/listinfo/python-list

Re: *POLL* How many sheeple believe in the 911 fairy tale and willingto accept an Orwellian doublespeak and enslavement world ?

2007-01-17 Thread Robert Hicks
> > Regards, > > Barry > [EMAIL PROTECTED] > 541-302-1107 > > We who cut mere stones must always be envisioning cathedrals. > > -Quarry worker's creed Sure, but did you actually post your phone number on USENET? Robert -- http://mail

Re: Units of measurement

2007-01-17 Thread Robert Kern
up/comp.lang.python/browse_frm/thread/8ed89844218b92c7/0f05aea353c1563d And there was another one announced here sometime in the past year or so, IIRC, but I don't recall the name of it or that of the author. :-( -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: Units of measurement

2007-01-17 Thread Robert Kern
Russ wrote: > Robert Kern wrote: >> And there was another one announced here sometime in the past year or so, >> IIRC, >> but I don't recall the name of it or that of the author. :-( > > Perhaps you are referring to the scalar class at > http://RussP

Re: Why this script can work?

2007-01-18 Thread Robert Kern
t in the same indent scope,why this can work? This else: clause goes with the try: and except: clauses, not the if: clause. It is executed if no exception was raised. http://docs.python.org/ref/try.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining when a file is an Open Office Document

2007-01-19 Thread Robert Marshall
at development versions of emacs is (were?) having with C files that started #define and were then treated as graphics files! http://thread.gmane.org/gmane.emacs.devel/64823/focus=65228 Robert -- La grenouille songe..dans son château d'eau Links and things http://rmstar.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
nswers on the scipy-user mailing list. http://www.scipy.org/Mailing_Lists > Permmin is a function that simply returns a vector array [xmin, ymin] This is your problem. The function to minimize must return a scalar, not a vector. This is not a multi-objective optimizer. -- Robert Kern &qu

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
to know what version of scipy you are using. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: scipy.optimize.lbfgsb help please!!!

2007-01-20 Thread Robert Kern
failed to initialize intent(inout) array -- expected elsize=8 > but got 4 -- input 'l' not compatible to 'd'" And also tell us your platform. I suspect this is a 64-bit problem. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigm

Re: Beginners Tutorial in PDF Format?

2007-01-21 Thread Robert Hicks
l be damaged in direct proportion > to its value. > -- > Web Page: http://docs.python.org/download.html http://www.diveintopython.org/ HTH Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading Fortran Data

2007-01-21 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I don't know if this is helpfull or not but (or for that matter > current). http://cens.ioc.ee/projects/f2py2e/ offers some suggestions > and it looks like you can use it with c code also. f2py has been folded into numpy. -- Robert Kern "I have c

Re: Reading Fortran Data

2007-01-21 Thread Robert Kern
sen has a module for reading this kind of file. http://dirac.cnrs-orleans.fr/ScientificPython/ Specifically, Scientific.IO.FortranFormat . -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpr

Re: pylab, matplotlib ... roots function question

2007-01-21 Thread Robert Kern
> In [343]: roots([1,0,0]) > Out[343]: array([], dtype=float64) > > ok, as it should be No, that's actually wrong. What version of numpy are you using? With a recent SVN checkout of numpy, I get the correct answer: In [3]: roots([1,0,0]) Out[3]: array([ 0., 0.]) -- Robert Ker

Re: SQLObject 0.8.0b2

2007-01-22 Thread Robert Hicks
Where is Oracle support? -- http://mail.python.org/mailman/listinfo/python-list

Re: Program eating memory, but only on one machine? (Solved, sort of)

2007-01-22 Thread Robert Kern
range(100) In [17]: ar2 = arange(3, 7) In [18]: import itertools In [19]: for i in itertools.count(1): :if not i % 1000: :print i :x = setmember1d(ar1, ar2) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma t

Re: arrow keys don't work

2007-01-22 Thread Robert Kern
> downgradinig to 2.4? Thanks. Your installation of 2.4 probably had the readline module installed while your installation of 2.5 doesn't. What platform are you on? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terr

Re: best package for a physical simulation?

2007-01-23 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hello everyone, > i would like to use python to perform some simulation involving collisions > of colloidal particles. > which is the best package/engine to do that in python? What kind of numerical methods does such simulation require? -- Robert Kern &qu

Re: Simple Matrix class

2007-01-23 Thread Robert Kern
tion should be no more than O(n**3). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: easy_install pylons failure - www.myghty.org unavailable

2007-01-23 Thread Robert Kern
on Distutils-SIG list will be more likely to get Phillip Eby's attention. It surprises me that setuptools didn't pick up the tarball on the CheeseShop. http://mail.python.org/mailman/listinfo/distutils-sig -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: easy_install pylons failure - www.myghty.org unavailable

2007-01-23 Thread Robert Kern
Robert Kern wrote: > [EMAIL PROTECTED] wrote: > >> Is it not able to get past this point because there is only one source for >> Myghty or does it always need to go to a package's home page? I was able to >> work around this by manually downloading the Myghty-1.1.tar

Re: Simple Matrix class

2007-01-24 Thread Robert Kern
ll as efficiency. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Matrix class

2007-01-24 Thread Robert Kern
Paul McGuire wrote: > On Jan 24, 1:47 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >> Paul McGuire wrote: >>> And the purpose/motivation for "reimplementing it better" would be >>> what, exactly? So I can charge double for it? >> So you can have a

Re: Simple Matrix class

2007-01-24 Thread Robert Kern
of ground. For any one area, though, there are usually better books. _Matrix Computations_, which I mentioned elsewhere, is difficult to beat for this area. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad att

ANN: Dejavu 1.5.0RC1

2007-01-24 Thread Robert Brewer
ttp://projects.amor.org/dejavu/wiki/UpgradeTo1.5 Documentation for 1.5: http://projects.amor.org/docs/dejavu/1.5.0RC1/ Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: My python programs need a GUI, wxPython or PyQt4?

2007-01-24 Thread Robert Kern
PyObjC. You have full access to the Cocoa framework. http://pyobjc.sourceforge.net/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth."

Re: time series data and NumPy

2007-01-26 Thread Robert Kern
uld be to convert the date-column into a timestamp, > which is a int/long, and use that. Would that help? This is frequently what I do. For dates, I like Modified Julian Day Numbers although I am sure that would horrify some people more knowledgeable than I. -- Robert Kern "I have com

Re: Unicode error handler

2007-01-26 Thread Robert Kern
1 that you would want to transliterate is not all that large. You could spend a little bit of time going through the character set and making a translation map for str.translate(). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terri

Re: distutils, sdist and tests

2007-01-27 Thread Robert Kern
t should be included in the binary distributions. > > Or am I just being to picky? Do folks normally include their tests in > the binary distributions? Some do, but only when they are packages and can thus hide.the.tests . -- Robert Kern "I have come to believe that the whole wo

Re: distutils, sdist and tests

2007-01-27 Thread Robert Kern
Steven Bethard wrote: > Robert Kern wrote: >> Steven Bethard wrote: >>> How do I get distutils to include my testing module in just the "sdist" >>> distribution? >> Use a MANIFEST. >> >> http://docs.python.org/dist/source-dist.html Als

Re: distutils, sdist and tests

2007-01-27 Thread Robert Kern
Steven Bethard wrote: > Robert Kern wrote: >> Are you sure that you don't have changes left over in your setup.py when you >> tested that? > > Yep. (Though I still cleared everything out and tried it again.) > Here's what I got using an unmodified setup.py an

Re: python 2.3 module ref

2007-01-29 Thread Robert Kern
te previous versions." http://www.python.org/doc/versions/ Click on "2.3.5" (or whichever microrelease your desire). http://www.python.org/doc/2.3.5/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible b

Re: using numpy to do linear algebra

2007-02-02 Thread Robert Kern
n-vectors, you need to transpose the matrix and multiply it on the *right* of your vectors array. dot(n_x_four, four_x_four.T) If the matrix had already been set up to right-multiply row-vectors, then you could skip the transpose. -- Robert Kern "I have come to believe that the whole wor

Re: raise or not to raise [Newbie]

2007-02-03 Thread Robert Kern
he author of that code was using exceptions to get at particular information that, at the time, was only available through a traceback. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret i

Re: Decimating Excel files

2007-02-03 Thread Robert Kern
write > files the average user can read. I've had good luck with xlrd. It does not require using COM, Excel, or even Windows! http://www.lexicon.net/sjmachin/xlrd.htm -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made te

Re: problems loading modules

2007-02-04 Thread Robert Kern
t;>> >>>> print random.randrange(10) > Traceback (most recent call last): > File "", line 1, in ? > AttributeError: 'module' object has no attribute 'randrange' > > Here it does not work. numpy has a subpackage called random. You importe

Re: Trouble fixing a broken ASCII string - "replace" mode in codec not working.

2007-02-06 Thread Robert Kern
i', 'replace'). I think you want something like this: sitetext = sitetext.decode('ascii', 'replace').encode('ascii', 'replace') -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: string.find for case insensitive search

2007-02-07 Thread Robert Kern
Don Morrison wrote: > lower() is also deprecated :) oh well The string method .lower() is not deprecated. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an un

Re: Re-installing Numeric and PIL Files

2007-02-07 Thread Robert Kern
2.4.exe The latter two are executable installers. Run them. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http:/

Re: Re-installing Numeric and PIL Files

2007-02-07 Thread Robert Kern
W. Watson wrote: > Robert Kern wrote: >> W. Watson wrote: >>> For some reason Python 2.2.4 cannot find the Numeric module. It's been >>> suggested that I should re-install the Numeric file. How do that? Also the >>> PIL. The three install files are: >&

Re: Re-installing Numeric and PIL Files

2007-02-08 Thread Robert Kern
ython.exe. I do not use a PIL or > Numeric in 2.5. I'm sorry. sys is a module. I meant for you to execute the following Python code: import sys print sys.executable -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is mad

Re: Re-installing Numeric and PIL Files

2007-02-08 Thread Robert Kern
W. Watson wrote: > Robert Kern wrote: >> W. Watson wrote: >> >>> I did a search in the python24 folder for sys.exec* (in c:\python24), but >>> came up with nothing. [nothing in a search of c:--sys.exec*] I have two >>> python folders, c:\python24 and

Re: Re-installing Numeric and PIL Files

2007-02-08 Thread Robert Kern
lines in the interactive interpreter in IDLE. Also, you may want to use the Tutor list, instead of comp.lang.python. It is more geared towards the questions you are asking. http://mail.python.org/mailman/listinfo/tutor -- Robert Kern "I have come to believe that the whole world is an en

Win98 - exceptions.IOError: (13, 'Permission denied')

2007-02-08 Thread Robert Dollinger
TION_TYPE, servicemanager.PYS_SERVICE_STOPPED, (self._svc_name_, '') ) def SvcStop(self): self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) win32event.SetEvent(self.stop_event) if __name__ == '__main__': win32serviceutil.HandleCommandLine(MyService) Thanks in advanced for your help. bye Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Wing IDE 2.1.4 Released

2007-02-09 Thread Robert Kern
org/unicode/faq/utf_bom.html#29 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Django, one more newbie question

2007-02-09 Thread Robert Kern
ndif %} > > Whole tutorial is on this page: > http://www.djangoproject.com/documentation/tutorial3/ > > endfor, endif, {{? :) It's the Django templating language: http://www.djangoproject.com/documentation/templates/ -- Robert Kern "I have come to believe that the

Re: Win98 - exceptions.IOError: (13, 'Permission denied')

2007-02-12 Thread Robert Dollinger
Ok, I have solved the problem. You have to set to something different than "Local System account" under properties of the service. bye Robert Robert Dollinger schrieb: > Hi to everyone, > > I have a Service, that runs on a WinXP machine. The service read a file > on a W

Re: try...except...finally problem in Python 2.5

2007-02-14 Thread Robert Kern
rong? I'm somewhat new to python but this makes sense to me. Move the "f = file(self.filename, 'rb')" above the try:. If opening the file happens to throw an exception, then the assignment will never happen and there will be no 'f' to close. -- Robert Kern "I ha

<    21   22   23   24   25   26   27   28   29   30   >