Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread Steve Holden
kanchy kang wrote: > many people write test cases with python scripts. > in these test scripts, there are many validation statements, > for example, in unittest, failUnless(a == b),(a/b may be stringType or > intType...) > > during running test scripts, if there is one exception raised from > fa

RE: [Numpy-discussion] algorithm, optimization, or other problem?

2006-02-21 Thread Nadav Horesh
You may get a significant boost by replacing the line: w=w+ eta * (y*x - y**2*w) with w *= 1.0 - eta*y*y w += eta*y*x I ran a test on a similar expression and got 5 fold speed increase. The dot() function runs faster if you compile with dotblas. Nadav. -Original Message- From:

Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread kanchy kang
Thank you for your suggestions! From: Steve Holden <[EMAIL PROTECTED]> To: kanchy kang <[EMAIL PROTECTED]> CC: python-list@python.org Subject: Re: May i customize basic operator (such as 1==3)? Date: Wed, 22 Feb 2006 01:44:26 -0500 kanchy kang wrote: many people write test cases with python s

Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread kanchy kang
__eq__ method can resolve this problem only for class object. what can i do in the following case? a = somefuction(...) #a is stringType a == "1234"? my simple requirement is: in some validation statments, such as, failUnless(a == "1234") if the result is true, it's OK. otherwise, it prints a au

Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread Robert Kern
kanchy kang wrote: > many people write test cases with python scripts. > in these test scripts, there are many validation statements, > for example, in unittest, failUnless(a == b),(a/b may be stringType or > intType...) > > during running test scripts, if there is one exception raised from > fail

Re: Pyserial never read

2006-02-21 Thread Nick Craig-Wood
Peter Hansen <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > luca72 <[EMAIL PROTECTED]> wrote: > > > >> Thanks for your help, but it don't solve the problem. > >> I receive only the echo and full stop. > > > > Try swapping pins 2 and 3 in the lead. > > Anything's possible, but given th

Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread kanchy kang
many people write test cases with python scripts. in these test scripts, there are many validation statements, for example, in unittest, failUnless(a == b),(a/b may be stringType or intType...) during running test scripts, if there is one exception raised from failUnless, i still do not know a

Re: a little more help with python server-side scripting

2006-02-21 Thread Steve Holden
John Salerno wrote: > Steve Holden wrote: > > >>If the script ran, you will now know waht version of Apaceh you're >>running with! > > > Well, the script did seem to run, but I'm still not sure if this is what > I'm ultimately after. This allows me to run Python script files, which > is good

Re: a little more help with python server-side scripting

2006-02-21 Thread John Salerno
Steve Holden wrote: > If the script ran, you will now know waht version of Apaceh you're > running with! Well, the script did seem to run, but I'm still not sure if this is what I'm ultimately after. This allows me to run Python script files, which is good, but what I really want to do is writ

Re: a little more help with python server-side scripting

2006-02-21 Thread John Salerno
Steve Holden wrote: >> Where does this line go? Just at the top as well? > > Nope. I presume you can log in to your web server using ssh or telnet or > similar. In which case you do so. Then use the commands > > cd {wherever}/cgi-bin > chmod +x test.py > > to make the script executable, and th

Re: a little more help with python server-side scripting

2006-02-21 Thread Steve Holden
John Salerno wrote: > Steve Holden wrote: > > >>Fortunately they've given you the information you need to run CGI >>scripts. Try installing this script in your cgi-bin directory as test.py >>(you may have to set it executable): > > > Thank you! I desperately needed to test it, and that seemed

Re: What are COM-enabled applications?

2006-02-21 Thread Ravi Teja
COM is Windows only. (Actually there is DCOM for Linux, but that's another story). Read about it here. http://en.wikipedia.org/wiki/Component_object_model -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic coin flipper program - logical error help

2006-02-21 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > John Zenger wrote: > > Also, with the functional programming tools of map, filter, and lambda, > > this code can be reduced to just six lines: > > > > import random > > > > flips = map(lambda x: random.randrange(2), xrange(100)) > > he

Re: Basic coin flipper program - logical error help

2006-02-21 Thread bonono
John Zenger wrote: > Also, with the functional programming tools of map, filter, and lambda, > this code can be reduced to just six lines: > > import random > > flips = map(lambda x: random.randrange(2), xrange(100)) > heads = len(filter(lambda x: x is 0, flips)) > tails = len(filter(lambda x: x i

Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread Steve Holden
kanchy kang wrote: > Hi,all > as we know, we can override the operator of one object(for example __eq__). > my question is, how to override the basic operator? > for example, > > for any object comparison operator(including litterals), > for example, > a = "123" > b = "321" > > the boolean equati

Re: a little more help with python server-side scripting

2006-02-21 Thread Steve Holden
John Salerno wrote: > Ben Cartwright wrote: > > >>>The script can be given a executable mode, or permission, using the >>>chmod command: >>> >>> $ chmod +x myscript.py >> >>And this answers your second. Your host needs to know the path to your >>script so they can use chmod to make it executabl

Re: a little more help with python server-side scripting

2006-02-21 Thread John Salerno
Steve Holden wrote: > Fortunately they've given you the information you need to run CGI > scripts. Try installing this script in your cgi-bin directory as test.py > (you may have to set it executable): Thank you! I desperately needed to test it, and that seemed to work. I didn't have to make it

Re: a little more help with python server-side scripting

2006-02-21 Thread John Salerno
Ben Cartwright wrote: >> The script can be given a executable mode, or permission, using the >> chmod command: >> >> $ chmod +x myscript.py > > And this answers your second. Your host needs to know the path to your > script so they can use chmod to make it executable. Where does this line go?

Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread Robert Kern
Casey Hawthorne wrote: > I believe you are asking for a side effect from the "==" operator. > > Add print statements to the __eq__ method. The things is, he wants to make those modifications to builtin types, which he can't do. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the

Re: May i customize basic operator (such as 1==3)?

2006-02-21 Thread Casey Hawthorne
I believe you are asking for a side effect from the "==" operator. Add print statements to the __eq__ method. "kanchy kang" <[EMAIL PROTECTED]> wrote: >Hi,all >as we know, we can override the operator of one object(for example __eq__). >my question is, how to override the basic operator? >for ex

Re: a little more help with python server-side scripting

2006-02-21 Thread Steve Holden
John Salerno wrote: > I contacted my domain host about how Python is implemented on their > server, and got this response: > > --- > Hello John, > > Please be informed that the implementation of python in our server is > through mod_python integration with the apache. > > These

What are COM-enabled applications?

2006-02-21 Thread Tempo
As the subject of this post suggests, I have one question; what are COM-enabled applications? I believe Microsoft Word is one of these apps, but what else? Is a web browser, Paint, Solitare, games, etc? I'm not sure if it varies from operating system to operating system, but I am talking about COM

May i customize basic operator (such as 1==3)?

2006-02-21 Thread kanchy kang
Hi,all as we know, we can override the operator of one object(for example __eq__). my question is, how to override the basic operator? for example, for any object comparison operator(including litterals), for example, a = "123" b = "321" the boolean equation a == b, i need override "==" operator

Weekly Python Patch/Bug Summary

2006-02-21 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 385 open (-14) / 3067 closed (+25) / 3452 total (+11) Bugs: 864 open (-59) / 5621 closed (+68) / 6485 total ( +9) RFE : 211 open ( +2) / 200 closed ( +2) / 411 total ( +4) New / Reopened Patches __ GNU uses

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Peter Mayne
Torsten Bronger wrote: > > My definiton would be that an interpreted language has in its > typical implementation an interpreting layer necessary for typical > hardware. Of couse, now we could discuss what is "typical", > however, in practice one would know it, I think. In case of Python: > CPyt

Re: Basic coin flipper program - logical error help

2006-02-21 Thread John Zenger
wes weston wrote: >Looping is easier with: > for x in range(100): >if random.randint(0,1) == 0: > heads += 1 >else: > tails += 1 Also, with the functional programming tools of map, filter, and lambda, this code can be reduced to just six lines: import random flips = map(

Re: a little more help with python server-side scripting

2006-02-21 Thread Ben Cartwright
John Salerno wrote: > I contacted my domain host about how Python is implemented on their > server, and got this response: > > --- > Hello John, > > Please be informed that the implementation of python in our server is > through mod_python integration with the apache. > > These are

Re: odt -> pdf

2006-02-21 Thread Colin J. Williams
Katja Suess wrote: > Hi > Cause Google didn't find the Info I was trying to find her my post. > Is PyUNO still _the_ Tool to create PDFs out of OpenOffice docs (odt, > not swx) ? > Do other tools exist? > Do you prefer generatingp PDFs using the XML-Strukture of odt files? > Regards, > Katja > Op

Re: number ranges

2006-02-21 Thread Colin J. Williams
Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >... > >>>Reread the part I quoted above: at least some of the proponents of this >>>syntax appear to be totally ignorant of 30 years of literature and >>>practice of programming, "it will be tough to convince" them that closed

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Carl Friedrich Bolz
Chris Mellon wrote: [snip] > I don't think it does, though. Firstly, as a definition it relies on > the environment the application will be running under and therefore > can't be considered to describe just a language. Secondly, by that > definition Java is an interpreted language which is at odds

Re: Basic coin flipper program - logical error help

2006-02-21 Thread DannyB
Thanks everyone for your insight. I'm coming from C++ - I'm used to formatting code with {} instead of whitespaces. @Larry - this isn't my homework :P I'm actually taking a VB.NET class in school. I was teaching myself C++ but decided to scale back to Python. I've heard it was a bit easier to

ANN: Extended Python debugger 0.12

2006-02-21 Thread R. Bernstein
This third release of an improved debugger also probably about as great as the last release. Download from http://sourceforge.net/project/showfiles.php?group_id=61395&package_id=175827 On-line documentation is at http://bashdb.sourceforge.net/pydb/pydb/lib/index.html Along with this release is a

Re: deriving from float or int

2006-02-21 Thread Robert Kern
gene tani wrote: > Russ wrote: > >>Does it ever make sense to derive a class from a basic type such as >>float or int? Suppose, for example, that I want to create a class for >>physical scalars with units. I thought about deriving from float, then >>adding the units. I played around with it a bit,

a little more help with python server-side scripting

2006-02-21 Thread John Salerno
I contacted my domain host about how Python is implemented on their server, and got this response: --- Hello John, Please be informed that the implementation of python in our server is through mod_python integration with the apache. These are the steps needed for you to be able

Re: Basic coin flipper program - logical error help

2006-02-21 Thread Martin P. Hellwig
DannyB wrote: > I'm just learning Python. So am I :-) > I've created a simple coin flipper program - > here is the code: > > [source] > #Coin flipper > import random > > heads = 0 > tails = 0 > counter = 0 > > coin = random.randrange(2) > > while (counter < 100): > if (coin ==

Re: Basic coin flipper program - logical error help

2006-02-21 Thread wes weston
DannyB wrote: > I'm just learning Python. I've created a simple coin flipper program - > here is the code: > > [source] > #Coin flipper > import random > > heads = 0 > tails = 0 > counter = 0 > > coin = random.randrange(2) > > while (counter < 100): > if (coin == 0): > heads += 1 >

Re: Basic coin flipper program - logical error help

2006-02-21 Thread Larry Bates
DannyB wrote: > I'm just learning Python. I've created a simple coin flipper program - > here is the code: > > [source] > #Coin flipper > import random > > heads = 0 > tails = 0 > counter = 0 > > coin = random.randrange(2) > > while (counter < 100): > if (coin == 0): > heads += 1 >

Re: Basic coin flipper program - logical error help

2006-02-21 Thread Claudio Grondi
DannyB wrote: > I'm just learning Python. I've created a simple coin flipper program - > here is the code: > > [source] > #Coin flipper > import random > > heads = 0 > tails = 0 > counter = 0 > > while (counter < 100): coin = random.randrange(2) Claudio > if (coin == 0): >

Re: deriving from float or int

2006-02-21 Thread gene tani
Russ wrote: > Does it ever make sense to derive a class from a basic type such as > float or int? Suppose, for example, that I want to create a class for > physical scalars with units. I thought about deriving from float, then > adding the units. I played around with it a bit, but it doesn't seem

Re: Basic coin flipper program - logical error help

2006-02-21 Thread John McMonagle
On Tue, 2006-02-21 at 16:14 -0800, DannyB wrote: > I'm just learning Python. I've created a simple coin flipper program - > here is the code: > > [source] > #Coin flipper > import random > > heads = 0 > tails = 0 > counter = 0 > > coin = random.randrange(2) > > while (counter < 100): > if

Re: Video.

2006-02-21 Thread Dr. Pastor
Many thanks to you All. -- http://mail.python.org/mailman/listinfo/python-list

Re: deriving from float or int

2006-02-21 Thread Terry Hancock
On Tue, 21 Feb 2006 15:01:22 -0600 Robert Kern <[EMAIL PROTECTED]> wrote: > http://www.python.org/2.2.3/descrintro.html#__new__ Curiously, __new__ does not appear in the index of the Python 2.3 language reference! It is fixed in Python 2.4, though -- I just checked. -- Terry Hancock ([EMAIL PRO

Basic coin flipper program - logical error help

2006-02-21 Thread DannyB
I'm just learning Python. I've created a simple coin flipper program - here is the code: [source] #Coin flipper import random heads = 0 tails = 0 counter = 0 coin = random.randrange(2) while (counter < 100): if (coin == 0): heads += 1 counter += 1 else: tails +=

Re: interpreting the fractional portion of time.clock() vs time.time() measurements

2006-02-21 Thread Peter Hansen
john peter wrote: > > let's say i'm taking timing measurements in Windows XP > > t1 = time.clock() > ... > t2 = time.clock() > > t3 = t2 - t1 = say, 0.018 > what is the unit of measurement for t3? is it correct to say that t3 = > 18 milliseconds? microseconds? > > what if the timing functi

Re: Video.

2006-02-21 Thread Peter Hansen
Sybren Stuvel wrote: > Dr. Pastor enlightened us with: > >>What environment,library,product should I import or study to >>manipulate cameras, video, fire-wire, avi files? > > > That depends on what you want with it. Without more information I'd > say "transcode" Presumably this, found easily by

redirecting to a content page

2006-02-21 Thread Shreyas
I am a new user writing some scripts to store data entered via a browser into a database. I have several content pages, and one "processing" page. A content page often has a form like this: ... And the processing page goes like this: form = cgi.FieldStorage() ## do some work, put data into t

With pyMinGW

2006-02-21 Thread bearophileHUGS
To use Pyrex, SWIG and the like on a Win2K I have followed this way: http://jove.prohosting.com/iwave/ipython/pyMinGW.html I already had MinGW 3.4.2, so I have decompressed the Python 2.4.2 sources, I have merged in the pyMinGW patch, and I have run the global compilation with: make -f python24.

Re: Module question

2006-02-21 Thread Gary Herron
Tuvas wrote: >Could I just do this then? > >from foo import x? > > Yes, you can do it that way. (f you have your modules importing each other in a circular fashion, then this can cause trouble as x may not be defined yet, so best to avoid that case.) >One more question now that I've tried th

Re: Video.

2006-02-21 Thread SPE - Stani's Python Editor
- pymedia: http://www.pymedia.org/ - pyvideo: http://www.geocities.com/rtrocca/python/ (use avisynth) - videocapture: http://videocapture.sourceforge.net/ If you are on Mac, you probably have access to everything by pyobjc. Good luck, Stani -- http://pythonide.stani.be -- http://mail.python.org

interpreting the fractional portion of time.clock() vs time.time() measurements

2006-02-21 Thread john peter
  let's say i'm taking timing measurements in Windows XP   t1 = time.clock() ... t2 = time.clock()   t3 = t2 - t1 = say, 0.018what is the unit of measurement for t3? is it correct to say that t3 = 18 milliseconds? microseconds?  what if the ti

Re: Tkinter Event Binding Double-click

2006-02-21 Thread James Stroud
Tuvas wrote: > I am trying to execute a function with a tkinter event binding double > click. With 2 mouse clicks done quickly, the function should happen, > otherwise, it should not. However, I am noticing that the time that the > event binding of a double-click is quite long, on the order of a se

RE: Python vs. Lisp -- please explain

2006-02-21 Thread Delaney, Timothy (Tim)
Terry Reedy wrote: >>> The the compiler is built into the VM as opposed to a separate tool >>> (like Java) is just an implementation issue. That was me, not Paul - careful with the attributions. Otherwise Paul might think you were trying to ascribe some awful, inaccurate statement to him ;) > Th

Re: Module question

2006-02-21 Thread Tuvas
Most of these are indeed independed of Tkinter, except for a status report message that is often sent in response. I' have a few small files already that do this, however, I would ike to be able to put several that do in fact need to post status messages as well. There are about 2400 lines of code

Re: Exiting os.spawnv's subroutine

2006-02-21 Thread IamIan
My code is below. As a single script there is no pause at the end of the processing as there is with using os.spawnv... I am using the P_WAIT value, and wonder if it is responsible for the extra time at the end of each iteration. Could it take longer for the processing to be "successful" when run u

Re: Video.

2006-02-21 Thread Dr. Pastor
Thank you Sybren. Where is it? Regards. -- http://mail.python.org/mailman/listinfo/python-list

Re: deriving from float or int

2006-02-21 Thread Sybren Stuvel
Russ enlightened us with: > The problem is that when I derive a new class from float, the darn > thing won't let me create a constructor that accepts more than one > argument. Use __new__, not __init__. It's the function that's called when a new immutable object is created. Sybren -- The problem

Re: Video.

2006-02-21 Thread Sybren Stuvel
Dr. Pastor enlightened us with: > What environment,library,product should I import or study to > manipulate cameras, video, fire-wire, avi files? That depends on what you want with it. Without more information I'd say "transcode" Sybren -- The problem with the world is stupidity. Not saying ther

Re: Module question

2006-02-21 Thread Kent Johnson
Tuvas wrote: > I know this is probably a very simple question, but I am building a > program that is now at about 2400 lines of code in the main module. I > need to break it up, however, there are certain variables that I would > like to use among all of them, namely the TKinter background. It's >

Re: Jython Pythonpath question

2006-02-21 Thread Kent Johnson
Mark Fink wrote: > Hi there, > > I have a source file FailFixture.py in the folder > D:\AUT_TEST\workspace\JyFIT\testutil. Now I want to import the file > with "import testutil.FailFixture". Unfortunately I could not figure > out how to set this up. I am convinced that > "D:\AUT_TEST\workspace\JyF

Re: Module question

2006-02-21 Thread Tuvas
Could I just do this then? from foo import x? One more question now that I've tried this. In my main function, I have alot of init code. I don't want this code to be re-ran when the second module imports the first. Is there any way around this? Thanks! -- http://mail.python.org/mailman/listinfo

Video.

2006-02-21 Thread Dr. Pastor
Dear All: (I am a 100% beginner in Python.) What environment,library,product should I import or study to manipulate cameras, video, fire-wire, avi files? Thanks you for any guidance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Module question

2006-02-21 Thread Mikalai
Tuvas wrote: > I know this is probably a very simple question, but I am building a > program that is now at about 2400 lines of code in the main module. I > need to break it up, however, there are certain variables that I would > like to use among all of them, namely the TKinter background. It's >

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Steven D'Aprano
On Tue, 21 Feb 2006 09:46:27 -0800, Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > ... >> Hey Donn, here is a compiled program for the PowerPC, >> or an ARM processor, or one of IBM's Big Iron >> mainframes. Or even a Commodore 64. What do you

Module question

2006-02-21 Thread Tuvas
I know this is probably a very simple question, but I am building a program that is now at about 2400 lines of code in the main module. I need to break it up, however, there are certain variables that I would like to use among all of them, namely the TKinter background. It's build using tkinter, so

Re: number ranges

2006-02-21 Thread Tim Hochberg
[Lots of proposals snipped] 90% of my gripes with range disappeared with the addition of enumerate. However, if there's going to be another round of range literal proposals I might as well throw out what seems (to me anyway) like the only halfway obvious choice in the context of Python. 1. a:

Re: jython socket sendall

2006-02-21 Thread Mark Fink
I used send instead. This should work. -Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Pietro Campesato
> As they say, case is the difference between "I helped my > Uncle Jack off a horse" and "I helped my uncle jack off a horse." Hahaha!... never heard of that though -- http://mail.python.org/mailman/listinfo/python-list

Re: why does close() fail miserably on popen with exit code -1 ?!

2006-02-21 Thread Atanas Banov
Jeffrey Schwab wrote: > _PyPclose returns the exit status of the popened process (the popenee?), > or -1 on error. Of course, if the status is supposed to be -1, there's > some confusion. yes, that's what i thought the root of the problem is. > In the snippet of code below (from Modules/posixmod

Jython Pythonpath question

2006-02-21 Thread Mark Fink
Hi there, I have a source file FailFixture.py in the folder D:\AUT_TEST\workspace\JyFIT\testutil. Now I want to import the file with "import testutil.FailFixture". Unfortunately I could not figure out how to set this up. I am convinced that "D:\AUT_TEST\workspace\JyFIT" should be included in the p

Re: Zope/Plone - Is it the right solution?

2006-02-21 Thread Bruno Desthuilliers
kbperry a écrit : > Well, > I guess our main goal in this class is to improve usability and user > experiences at the site. > > While we want to improve our site visually and make it more usable to > the prospective students, the site needs to be easily updated. I don't > think that I am looking

Re: number ranges

2006-02-21 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > > for i in (1 to 10 by 3): > > print i > > > > should print 1 4 7. > > But that would be an "attractive nuisance" to many other native speakers > like you, who would instinctively think of a closed interval. Maybe > 'upto' rather than 'to', as som

Re: deriving from float or int

2006-02-21 Thread Robert Kern
Russ wrote: > The problem is that when I derive a new class from float, the darn > thing won't let me create a constructor that accepts more than one > argument. I need two arguments: one for the numerical value and one for > the units. But when I try to give the constructor two arguments, I get >

Re: deriving from float or int

2006-02-21 Thread Russ
The problem is that when I derive a new class from float, the darn thing won't let me create a constructor that accepts more than one argument. I need two arguments: one for the numerical value and one for the units. But when I try to give the constructor two arguments, I get this when I call the c

Tkinter Event Binding Double-click

2006-02-21 Thread Tuvas
I am trying to execute a function with a tkinter event binding double click. With 2 mouse clicks done quickly, the function should happen, otherwise, it should not. However, I am noticing that the time that the event binding of a double-click is quite long, on the order of a second or so. I am doub

Re: In need of a virtual filesystem / archive

2006-02-21 Thread Enigma Curry
Thanks for all the suggestions! I realized a few minutes after I posted that a database would work.. I just wasn't in that "mode" of thinking when I posted. PyTables also looks very interesting, especially because apparently I can read a file in the archive like a normal python file, ie one line

Re: That's really high-level: bits of beautiful python

2006-02-21 Thread Rocco Moretti
Max wrote: > But today we were discussing the problem of running externally-provided > code (e.g. add-on modules). Neither of us knew how to do it in C, though > I suggested using DLLs. However, I quickly installed python on his > laptop and coded this: > > exec "import %s as ext_mod" % raw_in

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Steve Holden
Chris Mellon wrote: [...] > Torstens definition isn't useful for quantifying a difference between > interpeted and compiled - it's a rough sort of feel-test. It's like > how much of a naked body you can expose before before it changes from > art to pornography - it's not something that is easily qu

Re: Mutable numbers

2006-02-21 Thread Magnus Lycka
Suresh Jeevanandam wrote: > # I am new to python. [...] > In any application most of the operation is numerical. So, i think, we > should get a good speed advantage with the availability of mutable > numbers. What do you think ? If you are new to Python, I think you should try to learn how to us

Re: No

2006-02-21 Thread Gaz
Aye, but the file is in MY drive, not the server. Perhaps thats the issue? I bet it's so... how should i deal with it? Perhaps should be a script that uploads the files to the server and then emails it... i believed this was handled using the root in my PC, but now i see this is not correct. Now

Re: Zope/Plone - Is it the right solution?

2006-02-21 Thread kbperry
Rene and Tim, Thanks for the help! I am glad that I didn't rule out Plone yet because I was able to download and install quickly. My "site" was up and running very quickly. For this class we are more focused on the HCI/usability stuff than we are the coding. I have plenty of other classes that

Re: No

2006-02-21 Thread Steve Holden
Fredrik Lundh wrote: > "Gaz" wrote: > > >>OSError: [Errno 2] No such file or directory: 'c:/' >> args = (2, 'No such file or directory') >> errno = 2 >> filename = 'c:/' >> strerror = 'No such file or directory' >> >>Crazy... and if i use c:\, i get a 500 error. > > > that's

Re: editor for Python on Linux

2006-02-21 Thread Szabolcs Nagy
pida is a great ide as well: http://pida.vm.bytemark.co.uk/projects/pida -- http://mail.python.org/mailman/listinfo/python-list

Re: message

2006-02-21 Thread Steve Holden
Nina Almaguer wrote: > Hi, > We are a web integration firm in Reston, VA and would like to post the > following developer position (I have already joined the group). > > > > When you begin your career at Siteworx, you’ll be part of a rapidly > growing software and services company. In fact,

Re: RSA in python

2006-02-21 Thread Heikki Toivonen
Abhisek Datta wrote: > -BEGIN RSA PUBLIC KEY- > MIGJAoGBALxi3tGXlSwRgn7/Km6mTSge+5ijQgIn3GvnZOeYyOo1DkubVtTaFj26 > GWtJo43MEe1a5UlWKJEOpbKVCr4AASfFj8YmmRewH4SXdZ+w1Bad8amyzL2h8F7J > wJojOnocSs6xDE7o86CpZRUlojBefanMdCpu074QFktE63OD1zBBAgMBAAE= > -END RSA PUBLIC KEY- > > Traceback (m

Re: warning for google api users

2006-02-21 Thread Doug Bromley
Producing a SERPS scraper for Google would be very easy and possible in about 10-15 lines of code.  However, its against the Google terms of service and if they decide to bite you for breaching them then you'll be in trouble.  Its also a reason you'll not likely find one that trumpets its existence

Re: Zope 3?? How do you start it on Windows?

2006-02-21 Thread kbperry
Many good points! Thx Matt. -- http://mail.python.org/mailman/listinfo/python-list

Re: algorithm, optimization, or other problem?

2006-02-21 Thread Jesus Rivero (Neurogeek)
Hello, If the parameters that are received by functions in order to calculate weights, th's and dot's products , are equal to each other in different cycles (and i bet more than often they will) i suggest you replace those functions with memoizable functions. That also would ease work inside the l

Re: Augmented assignment

2006-02-21 Thread gene tani
Terry Hancock wrote: > On Tue, 21 Feb 2006 10:55:42 +0530 > Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: > Seriously, > I think they are usually equivalent internally, > at least for immutable objects. > yah, but when you do augmented assigns on lists, or mix immutable an dmutable: http://zeph

warning for google api users

2006-02-21 Thread Gabriel B.
the google webservices (aka google API) is not even close for any kind of real use yet if you search for the same term 10 times, you get 3 mixed totals. 2 mixed result order. and one or two "502 bad gateway" i did an extensive match agains the API and the regular search service. the most average

That's really high-level: bits of beautiful python

2006-02-21 Thread Max
I have a friend who has been programming in C for many years, and he is a great fan of the language. However, he (and I) are about to start a python course, and he has been asking me a lot of questions. He often responds to my answers with "Urgh! Object-orientation!" and suchlike. But today we

Re: Zope 3?? How do you start it on Windows?

2006-02-21 Thread Magnus Lycka
kbperry wrote: > Cool thx Matt. I did finally figure it out, but barely. Why would you > want to download and install Zope without creating an instance? It > seems kind of dumb to me. This is a quite normal separation. I think you will find the same thing among both database systems and various

Re: Little tool - but very big size... :-(

2006-02-21 Thread Peter Hansen
Larry Bates wrote: > Since the target is Windows only, consider using win32gui > (part of Mark Hammonds win32 extensions) calls to use > native Windows controls. That way you can eliminate > wxWindows altogether. If all you need is a file dialog, > it isn't very difficult. A good point, and one

Re: Writing my own typing monitor program for RSI sufferers...

2006-02-21 Thread samslists
Well, this is the one part that I have no idea how to doas far as I can tell the information simply is not in /proc. I need a different method to discover when someone is typing. That's what I came to the list for, to get a clue as to how to do that. Certainly someone has an idea how to dete

Re: Augmented assignment

2006-02-21 Thread Terry Hancock
On Tue, 21 Feb 2006 10:55:42 +0530 Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: > Is there any gain in performance because of > augmented assignments. > > x += 1 vs x = x+1 Yep. I perform better when I only type names once. Especially if they are long: length_of_object_I_must

Re: Is there a way to build python without 'posixmodule' ?

2006-02-21 Thread Ross Ridge
mrstephengross wrote: > I'm working on building python 2.4.2 with the mingw compiler (on > cygwin). Try following the instructions on the pyMinGW site: http://jove.prohosting.com/iwave/ipython/pyMinGW.html Ross Ridge -- http://mail.python.org/m

Re: Multiple assignment and the expression on the right side

2006-02-21 Thread Terry Hancock
On Tue, 21 Feb 2006 10:53:21 +0530 Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: > I read in "Python in a Nutshell" that when we have > multiple assignments > made on a single line, it is equivalent to have those many > simple assignments and that the right side is evaluated > once fo

Re: Little tool - but very big size... :-(

2006-02-21 Thread BJ in Texas
[EMAIL PROTECTED] wrote: || 11MB is seldom a concern for today's machine. || A good windows/microsoft attitude.. :-) -- "Last week, I stated this woman was the ugliest woman I had ever seen. I have since been visited by her sister, and now wish to withdraw that statement." -- Mark Twain -- h

Re: Zope/Plone - Is it the right solution?

2006-02-21 Thread Tim Williams (gmail)
On 21 Feb 2006 08:00:03 -0800, Michele Simionato <[EMAIL PROTECTED]> wrote: For easy of use nothing beats CherryPy, but I am not sure how stable itis. If CherryPy is of interest then don't discount Karrigell,  it has a smaller learning curve and appears stable.   Overall I found it quicker to becom

Re: html parser , unexpected '<' char in declaration

2006-02-21 Thread Jesus Rivero (Neurogeek)
Oopss! You are totally right guys, i did miss the closing '>' thinking about maybe errors in the use of ' or ". Jesus Tim Roberts wrote: >"Jesus Rivero - (Neurogeek)" <[EMAIL PROTECTED]> wrote: > > >>hmmm, that's kind of different issue then. >> >>I can guess, from the error you pasted earlie

Re: Zope/Plone - Is it the right solution?

2006-02-21 Thread Tim Parkin
Fredrik Lundh wrote: > "kbperry" wrote: >>I am currently a student, and for our HCI class project we are >>redeveloping our CS website. I attend a very large university (around >>30,000 students), and the CS site will need to be updated by many >>people that don't have technical skills (like cleri

  1   2   3   >