Re: ConfigParser: writes a list but reads a string?

2006-01-21 Thread Fuzzyman
funkyj wrote: > I'm interested in the same sort of config file issues. > > Unfortunately the restricted execution has fallen out of favor. My > preferred solution would be to have a configEval() function that is > just like the regular Python eval() but only accepts a subset of the > python langu

Re: Python shell interpreting delete key as tilde?

2006-01-21 Thread Fredrik Lundh
Leif K-Brooks wrote: > I'm running Python 2.3.5 and 2.4.1 under Debian Sarge. Instead of > deleting the character after the cursor, pressing my "delete" key in an > interactive Python window causes a system beep and inserts a tilde > character. that's probably because the delete key can be set up

Re: Redirecting standard out in a single namespace

2006-01-21 Thread Fuzzyman
Ido Yehieli wrote: > I'm sorry, but i don't see how this will solve the problem? It is > exactly the same, only now you've replaced everything in sys except > just sys.stdout? In the solution above (which I haven't had a chance to test) you're just chaning hte reference to sys to point to a diffe

Re: New Bee

2006-01-21 Thread Christoph Zwerschke
Prasanna wrote: > I am new to this group.I am willing to learn PYTHON can anyone suggest > me where to start.I have installed PYTHON 2.4 windows platform.Where > can I get books for beginners.How to go about?.It would be helpful if > anyone is will to guide me. Here is something helpful for newbie

Re: New Bee

2006-01-21 Thread Prasanna
Thanx for ur info. Prasanna -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-21 Thread Anton Vredegoor
Paul Rubin wrote: > The first few pages are a review of probability theory but I think > they assume you've seen it before. The book's subject matter is more > mathematical by nature than what most programmers deal with from day > to day, and as such, the book is not for everyone. And so the cyc

Re: OT: excellent book on information theory

2006-01-21 Thread David H Wild
In article <[EMAIL PROTECTED]>, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > But the real question is why it is that American publishers believe > their readers are so lazy and ignorant that they require special > "translations" of British books. I don't know anyone who has said "I'm > glad that

Re: How to generate graphics dynamically on the web using Python CGI script?

2006-01-21 Thread Fuzzyman
Steve Holden wrote: > Luiz Geron wrote: > > I don't have experience on this, but I think that you can make the > > script return the image "contents" directly to the img tag, without > > passing it to a img file, so you can use something like this: > > > > > > > > wich saves some processing and I

Re: How to generate graphics dynamically on the web using Python CGI script?

2006-01-21 Thread Fuzzyman
Steve Holden wrote: > Luiz Geron wrote: > > I don't have experience on this, but I think that you can make the > > script return the image "contents" directly to the img tag, without > > passing it to a img file, so you can use something like this: > > > > > > > > wich saves some processing and I

Re: Python shell interpreting delete key as tilde?

2006-01-21 Thread Fuzzyman
Fredrik Lundh wrote: [snip..] > > this page might help: > > http://www.ibb.net/~anne/keyboard.html > > or you could switch to a less lame operating system ;-) (duck). Not like you to duck when sending flames Fredrik ;-) Fuzzy > > -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: introduction to computing clusters?

2006-01-21 Thread Paul McGuire
"Cameron Laird" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Bring back VMS. > That's creepy, I was just reminiscing about working on VAXen less than 12 hours ago! One of my favorite bits of the VAX documentation was the book "VAX/VMS Internals." Each chapter started with a rel

ValueError: need more than 3 values to unpack

2006-01-21 Thread Elezar Simeon Papo
Hello All, I have a tab separated input file (data.txt) in text format - the file looks like this SCHOOL DEPART1 DEPART2 DEPART3 Harvard Economics Mathematics Physics StanfordMathematics Physics BerkeleyPhysics U.C.L.A Biology Genetics I have to utilize Python and

Re: Redirecting standard out in a single namespace

2006-01-21 Thread Ido Yehieli
oh, ok... I guess people have to learn to use a logger instead of print in production code... -- http://mail.python.org/mailman/listinfo/python-list

Re: ValueError: need more than 3 values to unpack

2006-01-21 Thread Fuzzyman
Elezar Simeon Papo wrote: > Hello All, > > I have a tab separated input file (data.txt) in text format - the file > looks like this > > SCHOOLDEPART1 DEPART2 DEPART3 > Harvard Economics Mathematics Physics > Stanford Mathematics Physics > Berkeley Physics > U.

Re: python & camera

2006-01-21 Thread Diez B. Roggisch
Alex Gittens schrieb: > I'm working on a final project for my EE degree that requires the use > of digital camera with high resolution. I'd like to do the image > capture with Python, preferably in a cross-platform manner, but if > necessary, we can limit ourselves to Windows. Any ideas on > module

Re: Read from Serial Port

2006-01-21 Thread Diez B. Roggisch
> appropriate platform-specific code. I'll be happy to answer > questions about the Posix parts of it, but I had the portion of > my brain containing Win32 knowledge cauterized. I'm working on that. Last time I checked there was even some AMIGA pre-AGA-stuff in there. Which I actually think is c

Re: PyXML: SAX vs. DOM

2006-01-21 Thread Ivan Herman
Original Message From: Matthias Kaeppler <[EMAIL PROTECTED]> To: Subject: Re:PyXML: SAX vs. DOM Date: 20/1/2006 21:26 > Oh and: > Where can I find an API reference for PyXML? Am I supposed to /guess/ > which methods and attributes e.g. Sax2 supplies? :D > > Thanks again, > Matth

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-21 Thread skip
ncf> This section is the cause of the problem: ncf> for browser in ("mozilla-firefox", "mozilla-firebird", ncf> "mozilla", "netscape"): ncf> if _iscommand(browser): ncf> register(browser, None, Netscape(browser)) In S

Re: [ANNOUNCE] MyHDL 0.5 released

2006-01-21 Thread Michael
Jan Decaluwe wrote: > Michael wrote: ... >>* http://article.gmane.org/gmane.comp.python.myhdl/19/match=mu0 >> >> One question I've got, mainly because it strikes me as very intriguing is >> do you know if the MU0 processor as described is synthesisable or have a >> feeling as to how much work

Re: Read from Serial Port

2006-01-21 Thread Peter Hansen
Grant Edwards wrote: > On 2006-01-21, Casey Bralla <[EMAIL PROTECTED]> wrote: >>I'd like to use only standard "built-in" modules if possible. > > Then there aren't going to be any "basic level docs" because > it's just not an easy thing to do. You pretty much have to do > exactly what you would d

Re: Read from Serial Port

2006-01-21 Thread Runsun Pan
How about reading from the USB ports ?-- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~Runsun Pan, PhD[EMAIL PROTECTED]Nat'l Center for Macromolecular Imaging http://ncmi.bcm.tmc.edu/ncmi/~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning a tuple-struct

2006-01-21 Thread Tom Anderson
On Thu, 18 Jan 2006 [EMAIL PROTECTED] wrote: > Is there a better way? Thoughts? I was thinking along these lines: class NamedTuple(tuple): def __init__(self, indices, values): "indices should be a map from name to index" tuple.__init__(self, values)

Re: ValueError: need more than 3 values to unpack

2006-01-21 Thread Roy Smith
"Elezar Simeon Papo" <[EMAIL PROTECTED]> wrote: > SCHOOL, DEPART1, DEPART2, DEPART3 = line.split('\t') > ValueError: need more than 3 values to unpack > > How do I solve this problem and change the program so it does not stop > if a data record has less than three DEPART values. The problem i

Re: Arithmetic sequences in Python

2006-01-21 Thread Tom Anderson
On Fri, 20 Jan 2006, it was written: > [EMAIL PROTECTED] (Alex Martelli) writes: > >>> How would you make a one-element list, which we'd currently write as >>> [3]? Would you have to say list((3,))? >> >> Yep. I don't particularly like the "mandatory trailing comma" in the >> tuple's display fo

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Colin J. Williams
J wrote: > Hi > > I hope the title of this message indicates my question. I am looking > for basic > array functionality in Python and it turns out that there are all these > packages which > are somehow related. Some are allegedly discontinued but still seem to > get updated. Could we start a dis

Re: PyXML: SAX vs. DOM

2006-01-21 Thread Matthias Kaeppler
Ivan Herman wrote: > I know this is not the ideal answer, but maybe it helps... It does, thanks Ivan. Regards, Matthias -- http://mail.python.org/mailman/listinfo/python-list

[Python for .NET] Any plans for supporting CLR2.0?

2006-01-21 Thread F. GEIGER
I'm on .NET/CLR2.0 and would like to use some stuff from w/i Python. The "Python for .NET" file name suggests that CLR1.1 is needed. Is that right? Any known plans to change this? Kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimal vs float

2006-01-21 Thread Tim Peters
[Kay Schluehr] > I concur and I wonder why CAS like e.g. Maple that represent floating > point numbers using two integers [1] are neither awkward to use nor > inefficient. My guess is that it's because you never timed the difference in Maple -- or, perhaps, that you did, but misinterpreted the res

Re: Simultaneous connections

2006-01-21 Thread Diez B. Roggisch
datbenik schrieb: > How can i write a program that supports simultaneous multipart > download. So i want to open multiple connections to download one file. > Is this possible. If so, how? In case of HTTP, the needed header is "Range". So I guess its all a matter of making n connections, and speci

"Dynamic" website content

2006-01-21 Thread sophie_newbie
Basically I have written a cgi script to automatically download TIFF images of patents from the US patent office. What I want is that the user can see what is happening when the images are being downloaded, because it takes a while to download them and there can be anything up to 30 individual fil

Re: "Dynamic" website content

2006-01-21 Thread Diez B. Roggisch
sophie_newbie schrieb: > Basically I have written a cgi script to automatically download TIFF > images of patents from the US patent office. > > What I want is that the user can see what is happening when the images > are being downloaded, because it takes a while to download them and > there can

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread J
Ok, I will look at NumPy ... I have another question about performance. Are the array operations such as matrix multiplication implemented in python or in C ? I was under the impression that the function calls in numarray are only wrappers to C code, but now I suspect that matrix multiplicaiton is

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
J wrote: > Ok, I will look at NumPy ... > > I have another question about performance. Are the array operations > such as matrix multiplication implemented in > python or in C ? I was under the impression that the function calls in > numarray are only wrappers to C code, but now I suspect that mat

Error in Python documentation

2006-01-21 Thread Peter
I found a minor error in the Python documentation for 2.4 which I thought I would report. But after a while I gave up. I wonder if this sort of reporting which is less than a bug could be made easier? The error was that the index entry to 'print statement' sent me to http://www.python.org/doc/2.4.2

Re: Error in Python documentation

2006-01-21 Thread skip
peter> I found a minor error in the Python documentation for 2.4 which I peter> thought I would report. But after a while I gave up. I wonder if peter> this sort of reporting which is less than a bug could be made peter> easier? The error was that the index entry to 'print statemen

Re: "Dynamic" website content

2006-01-21 Thread sophie_newbie
To give you a better explaination of what I want, you could visit www.pat2pdf.org. Type in 123456 as the patent number, you see what it does? It tells the user that it is requesting the various TIFF images and then displays the link to the PDF file that it has created. This is exactly what I want

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread J
I will just jump in an use NumPy. I hope this one will stick and evolve into the mother of array packages. How stable is it ? For now I really just need basic linear algebra. i.e. matrix multiplication, dot, cross etc Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in Python documentation

2006-01-21 Thread Peter
>From http://www.python.org/doc/2.4.2/ go to the Library reference http://www.python.org/doc/2.4.2/lib/lib.html from there to the index (i) at http://www.python.org/doc/2.4.2/lib/genindex.html. In the index select 'p' and click to reach http://www.python.org/doc/2.4.2/lib/types.html#l2h-90 . At th

Re: OT: excellent book on information theory

2006-01-21 Thread Paul Rubin
"Anton Vredegoor" <[EMAIL PROTECTED]> writes: > And so the cycle repeats itself. We teach our students the world is all > about money, and sure enough, the world is all about money. If we would > continue to keep the interesting things away from most of the people, > by hiding it behind mathematica

Re: Arithmetic sequences in Python

2006-01-21 Thread Paul Rubin
Tom Anderson <[EMAIL PROTECTED]> writes: > > listx/dictx/setx would be the display forms as well as the constructor > > forms. > > Could these even replace the current forms? If you want the equivalent > of list(sometuple), write list(*sometuple). The current list function is supposed to be som

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
J wrote: > I will just jump in an use NumPy. I hope this one will stick and evolve > into the mother of array packages. > How stable is it ? For now I really just need basic linear algebra. > i.e. matrix multiplication, dot, cross etc That stuff isn't going to change on you. -- Robert Kern [EMAI

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Travis E. Oliphant
J wrote: > I will just jump in an use NumPy. I hope this one will stick and evolve > into the mother of array packages. > How stable is it ? For now I really just need basic linear algebra. > i.e. matrix multiplication, dot, cross etc > There is a new release coming out this weekend. It's close

Re: Arithmetic sequences in Python

2006-01-21 Thread Tom Anderson
On Sat, 21 Jan 2006, it was written: > Tom Anderson <[EMAIL PROTECTED]> writes: > >>> listx/dictx/setx would be the display forms as well as the constructor >>> forms. >> >> Could these even replace the current forms? If you want the equivalent >> of list(sometuple), write list(*sometuple). > >

Re: "Dynamic" website content

2006-01-21 Thread Diez B. Roggisch
sophie_newbie schrieb: > To give you a better explaination of what I want, you could visit > www.pat2pdf.org. > > Type in 123456 as the patent number, you see what it does? It tells the > user that it is requesting the various TIFF images and then displays > the link to the PDF file that it has cr

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Tom Anderson
On Sat, 21 Jan 2006, Travis E. Oliphant wrote: > J wrote: > >> I will just jump in an use NumPy. I hope this one will stick and evolve >> into the mother of array packages. How stable is it ? For now I really >> just need basic linear algebra. i.e. matrix multiplication, dot, cross >> etc > > T

Re: "Dynamic" website content

2006-01-21 Thread Christoph Haas
On Saturday 21 January 2006 20:42, sophie_newbie wrote: > To give you a better explaination of what I want, you could visit > www.pat2pdf.org. > > Type in 123456 as the patent number, you see what it does? It tells the > user that it is requesting the various TIFF images and then displays > the lin

The "real" name

2006-01-21 Thread engsolnorm
I'm playing with a sudoku GUI...just to learn more about python. I've made 81 'cells'...actually small canvases Part of my scheme to write the cells (all 81 of them in the gui) to a file (using the the SAVE callback/button), then restore the gui cells from the contents of the saved file, which d

Regular expressions: recursive patterns and callouts

2006-01-21 Thread Carlos
Hi! I think two extensions to re could be really powerful in aiding to match non regular strings -for example those containing parens nested up to an arbitrary depth- but without a significative performance loss, although I'm not at all sure at this last point. One of these features is re nesting;

Re: OT: excellent book on information theory

2006-01-21 Thread Tom Anderson
Slow and to the pointless, but ... On Wed, 18 Jan 2006, Terry Hancock wrote: > On Mon, 16 Jan 2006 12:15:25 -0500 > "Tim Peters" <[EMAIL PROTECTED]> wrote: > >> More "Britishisms" are surviving in the Scholastic editions as the >> series goes on, but as the list for Half-Blood Prince shows the e

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Robert Kern
Tom Anderson wrote: > Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs? Yes. -- 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/p

Re: "Dynamic" website content

2006-01-21 Thread Alex Martelli
Christoph Haas <[EMAIL PROTECTED]> wrote: > On Saturday 21 January 2006 20:42, sophie_newbie wrote: > > To give you a better explaination of what I want, you could visit > > www.pat2pdf.org. > > > > Type in 123456 as the patent number, you see what it does? It tells the > > user that it is request

Re: The "real" name

2006-01-21 Thread Diez B. Roggisch
> Part of my scheme to write the cells (all 81 of them in the gui) to a file > (using the the SAVE callback/button), then > restore the gui cells from the contents of the saved file, which depends on > knowing the "name" of the cell with the > focus, or one (or more) which have a number. > > The

Re: Error in Python documentation

2006-01-21 Thread skip
... [much page traversal deleted] ... peter> So you need to add a bug to the Python bug tracker -- at least so peter> it seems. If you go to the top of the doc tree: http://docs.python.org/ and look in the left-hand sidebar you'll see "[EMAIL PROTECTED]" under the heading "Emai

Re: The "real" name

2006-01-21 Thread André
[EMAIL PROTECTED] wrote: > I'm playing with a sudoku GUI...just to learn more about python. > > I've made 81 'cells'...actually small canvases > > Part of my scheme to write the cells (all 81 of them in the gui) to a file > (using the the SAVE callback/button), then > restore the gui cells from th

Compiling cx_Oracle and LD_LIBRARY_PATH

2006-01-21 Thread Brian Cole
I can compile and install cx_Oracle fine by following the manta: export ORACLE_HOME=... python setup.py install export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH python >>> import cx_Oracle My issue is the LD_LIBRARY_PATH. Is there a way to compile cx_Oracle, or any Python extension for tha

Re: Compiling cx_Oracle and LD_LIBRARY_PATH

2006-01-21 Thread Gerhard Häring
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian Cole wrote: > I can compile and install cx_Oracle fine by following the manta: > export ORACLE_HOME=... > python setup.py install > export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH > python > import cx_Oracle > > > My issue is the

Re: The "real" name

2006-01-21 Thread James Stroud
[EMAIL PROTECTED] wrote: > I'm playing with a sudoku GUI...just to learn more about python. > > I've made 81 'cells'...actually small canvases > > Part of my scheme to write the cells (all 81 of them in the gui) to a file > (using the the SAVE callback/button), then > restore the gui cells from

Embedding matplotlib into page GUI builder

2006-01-21 Thread Madhusudan Singh
After a successful but problematic experience with the QT Designer + python combo, I decided that I needed something simpler (read completely in python) for my lab applications with python linux-gpib bindings. I am looking at PAGE, which while not pretty, seems simple and fast to work with. How do

Re: Read from Serial Port

2006-01-21 Thread Grant Edwards
On 2006-01-21, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> appropriate platform-specific code. I'll be happy to answer >> questions about the Posix parts of it, but I had the portion of >> my brain containing Win32 knowledge cauterized. > > I'm working on that. Last time I checked there was eve

Re: Variables and none?

2006-01-21 Thread Terry Reedy
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ivan Shevanski wrote: >> python way to detect if a variable exsists? Say I had a program that >> needed a certain variable to be set to run and the variable was not >> found when it came time to use it. . .Would I just

Re: [Python for .NET] Any plans for supporting CLR2.0?

2006-01-21 Thread Terry Reedy
"F. GEIGER" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm on .NET/CLR2.0 and would like to use some stuff from w/i Python. The > "Python for .NET" file name suggests that CLR1.1 is needed. Is that > right? Any known plans to change this? Most responders here use CPython. T

Re: OT: excellent book on information theory

2006-01-21 Thread Steven D'Aprano
On Sat, 21 Jan 2006 21:01:53 +, Tom Anderson wrote: > As Dave Hansen pointed out, "Harry smiled vaguely back", means that the > direction Harry was smiling was vaguely back - might have been a bit to > the side or something. That's an extremely artificial interpretation of the sentence, eve

Re: The "real" name

2006-01-21 Thread engsolnorm
On Sat, 21 Jan 2006 14:23:49 -0800, James Stroud <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> I'm playing with a sudoku GUI...just to learn more about python. >> >> I've made 81 'cells'...actually small canvases >> >> Part of my scheme to write the cells (all 81 of them in the gui) to

Re: New Python.org website ?

2006-01-21 Thread Gerhard Häring
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Holden wrote: > Tim Golden wrote: > >>[Steve Holden] >> >>| https://svn.python.org/www/trunk/beta.python.org >> >>| but I don't know whether anonymous access is enabled. Maybe you can >>let >> |me know ... >> >>Doesn't look like it. Asking me

Re: The "real" name

2006-01-21 Thread James Stroud
[EMAIL PROTECTED] wrote: > On Sat, 21 Jan 2006 14:23:49 -0800, James Stroud <[EMAIL PROTECTED]> wrote: > > >>[EMAIL PROTECTED] wrote: >> >>>I'm playing with a sudoku GUI...just to learn more about python. >>> >>>I've made 81 'cells'...actually small canvases >>> >>>Part of my scheme to write the

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-21 Thread SPE - Stani's Python Editor
This seems ok... >>> import webbrowser >>> webbrowser._iscommand("firefox") True >>> webbrowser.register("firefox",None,webbrowser.Netscape("firefox")) >>> webbrowser._browsers {'galeon': [None, ], 'firefox': [None, ], 'mozilla': [None, ], 'mozilla-firefox': [None, ], 'w3m': [None, ]} But it is st

how to run python scripts on a website

2006-01-21 Thread py
i have a website which runs apache on linux. it supports python (i think via cginot sure how else). anyway how can I go to a web page and run a python script or something like that? for example say i make a script which prints out all the links on another URLhow can i run that? thanks!

Re: how to run python scripts on a website

2006-01-21 Thread James Stroud
py wrote: > i have a website which runs apache on linux. it supports python (i > think via cginot sure how else). anyway how can I go to a web page > and run a python script or something like that? for example say i make > a script which prints out all the links on another URLhow can i r

Re: Regular expressions: recursive patterns and callouts

2006-01-21 Thread Paul McGuire
"Carlos" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi! > I think two extensions to re could be really powerful in aiding to > match non regular strings -for example those containing parens nested > up to an arbitrary depth- but without a significative performance loss, > althoug

new.instancemethod as a form of partial()

2006-01-21 Thread bonono
I came across this while searching for a way to DIY partial(), until it is available in 2.5 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/229472 However, when trying for the following, it doesn't work and is wondering if it is a bug or intended : >>> import operator >>> import new >>>

Re: new.instancemethod as a form of partial()

2006-01-21 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > So it seems that instancemethod() don't like "None" as the instance. "bound methods" and "unbound methods" are instance of the same type, distinguished by one thing: the im_self of an unbound method is None, the im_self of a bound method is anything else. So, w

Re: new.instancemethod as a form of partial()

2006-01-21 Thread bonono
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: >... > > So it seems that instancemethod() don't like "None" as the instance. > > "bound methods" and "unbound methods" are instance of the same type, > distinguished by one thing: the im_self of an unbound method is None, > the im_self of a bo

Some thougts on cartesian products

2006-01-21 Thread Christoph Zwerschke
In Python, it is possible to multiply a string with a number: >>> "hello"*3 'hellohellohello' However, you can't multiply a string with another string: >>> 'hello'*'world' Traceback (most recent call last): File "", line 1, in ? TypeError: can't multiply sequence by non-int Sometimes I was

Re: Returning a tuple-struct

2006-01-21 Thread Tim Roberts
[EMAIL PROTECTED] wrote: >I've noticed that there's a few functions that return what appears to >be a tuple, but that also has attributes for each item in the tuple. >For example, time.localtime() returns a time.time_struct, which looks >like a tuple but also like a struct. That is, I can do: > >

Help needed with Weave and XP and MSVC 6.0

2006-01-21 Thread zhuang
Hi, I'm having some problems getting weave to work correctly. For now, I'm just testing how to access Numeric arrays under weave. My test code is: from Numeric import * import weave a = zeros((5,5,5,5,5),typecode=Int16) a[4,3,2,2,1] = 55.0 code = """ a[0,0,3,0,0] = 3.0; printf("%d",a[4,3,2,

Re: Xah's Edu Corner: IT Industry Predicament

2006-01-21 Thread Tim Hammerquist
Ulrich Hobelmann <[EMAIL PROTECTED]> wrote: [ snip bait ] > I know, don't feed the troll. Sorry 'bout that. To quote Space Balls: "Don't be sorry, be *quiet*!" :) Cheers, Tim Hammerquist -- http://mail.python.org/mailman/listinfo/python-list

Re: How to generate graphics dynamically on the web using Python CGI script?

2006-01-21 Thread John M. Gabriele
Luiz Geron wrote: > I don't have experience on this, but I think that you can make the > script return the image "contents" directly to the img tag, without > passing it to a img file, so you can use something like this: > > > > wich saves some processing and I/O. > I like this method. You ha