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

2006-02-21 Thread Tim Roberts
"Jesus Rivero - (Neurogeek)" <[EMAIL PROTECTED]> wrote: > >hmmm, that's kind of different issue then. > >I can guess, from the error you pasted earlier, that the problem shown >is due to the fact Python is interpreting a "<" as an expression and not >as a char. review your code or try to figure out

Re: how to break a for loop?

2006-02-21 Thread Steven D'Aprano
Petr Jakes wrote: > zero_list=[0,0,0,0,0,1,2,3,4] > for x in range(len(zero_list)): > if zero_list[x]!=0: break > nonzero_list=zero_list[x:] > print nonzero_list > > but some more "pythonic" solutions will be posted from other users I > guess :) That looks perfectly Pythonic to me. You kno

fast text processing

2006-02-21 Thread Alexis Gallagher
(I tried to post this yesterday but I think my ISP ate it. Apologies if this is a double-post.) Is it possible to do very fast string processing in python? My bioinformatics application needs to scan very large ASCII files (80GB+), compare adjacent lines, and conditionally do some further proce

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Paul Boddie
Delaney, Timothy (Tim) wrote: > Donn Cave wrote: > > > for very long. If you give me a Python program, you have 3 choices: > > cross your fingers and hope that I have the required Python > > interpreter version, slip in a 25Mb Python interpreter install and > > hope I won't notice, or come clean a

Re: how to break a for loop?

2006-02-21 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: >> I need to remove zeros from >> the begining of list, but I can't :-(. > > I believe the following is almost a direct translation of the above > sentence. > > import itertools as it > a=[0,0,0,1,0] > a[:]=it.dropwhile(lambda x: x is 0, a) Usa lambda x: x==0 or simply l

Re: Safe Python Execution

2006-02-21 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > > Is anyone aware of a more functional but still untrusted python? Given that you've looked into Zope 3's security/proxy mechanisms, have you also looked at mxProxy? http://www.egenix.com/files/python/mxProxy.html Paul -- http://mail.python.org/mailman/listinfo/pytho

Re: In need of a virtual filesystem / archive

2006-02-21 Thread Steven D'Aprano
Enigma Curry wrote: > I need to store a large number of files in an archive. From Python, I > need to be able to create an archive, put files into it, modify files > that are already in it, and delete files already in it. > > The easy solution would be to use a zip file or a tar file. Python has

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Steven D'Aprano
Donn Cave wrote: > Quoth Steven D'Aprano <[EMAIL PROTECTED]>: > ... > | Nobody denies that Python code running with no optimization tricks is > | (currently) slower than compiled C code. That's a matter of objective > | fact. Nobody denies that Python can be easily run in interactive mode. > | Nob

Re: how to break a for loop?

2006-02-21 Thread bonono
Giovanni Bajo wrote: > [EMAIL PROTECTED] wrote: > > >> I need to remove zeros from > >> the begining of list, but I can't :-(. > > > > I believe the following is almost a direct translation of the above > > sentence. > > > > import itertools as it > > a=[0,0,0,1,0] > > a[:]=it.dropwhile(lambda x:

Re: Mutable numbers

2006-02-21 Thread Giovanni Bajo
Suresh Jeevanandam wrote: > In python all numbers are immutable. True. > This means there is one object ( > a region in the memory ) created every time we do an numeric > operation. False. Memory regions can be pooled in a way that "allocation" is a O(1) operation. > I hope there should have b

Re: In need of a virtual filesystem / archive

2006-02-21 Thread bonono
Steven D'Aprano wrote: > I suspect you can pick any two of the following three: > > 1. single file > 2. space used for deleted files is reclaimed > 3. fast performance > > Using a proper database will give you 2 and 3, but at > the cost of a lot of overhead, and typically a > relational database i

Re: number ranges

2006-02-21 Thread Steven D'Aprano
Alex Martelli wrote: > Colin J. Williams <[EMAIL PROTECTED]> wrote: >... > I am also open to such arguments but it will be tough to convince me that "x to y" should mean something different from what it means in Pascal, BASIC, and English. >>> >... > >>1. Why not treat '2 to

DCOracle2: OCI error

2006-02-21 Thread Chris
Hello I'm using DCOracle2 with Python 2.1 and Oracle 8.1.7 on Solaris and while it's working most of the time, I have random ORA-01084 invalid argument in OCI call errors that occur on INSERT. Out of 18000 queries all using the same DB connection I have like 15 errors of this type. It's always the

Re: fast text processing

2006-02-21 Thread Steve Holden
Alexis Gallagher wrote: > (I tried to post this yesterday but I think my ISP ate it. Apologies if > this is a double-post.) > > Is it possible to do very fast string processing in python? My > bioinformatics application needs to scan very large ASCII files (80GB+), > compare adjacent lines, and

RE: Print a PDF transparently

2006-02-21 Thread Tim Golden
[Daniel Crespo] | | > Have you seen this? | > http://tgolden.sc.sabren.com/python/win32_how_do_i/print.html | > In particular, the section on using win32print directly. | | Yes, I have. The problems is that an external program is launched for | handling the file and print it. [sorry, bit lo

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

2006-02-21 Thread Durumdara
Hi ! I have a problem. I have a little tool that can get data about filesystems and wrote it in python. The main user asked me a GUI for this software. This user is needed a portable program, so I create this kind of the software with Py2Exe. But it have very big size: 11 MB... :-( The dist di

Re: In need of a virtual filesystem / archive

2006-02-21 Thread Rene Pijlman
Enigma Curry: >I need to store a large number of files in an archive. From Python, I >need to be able to create an archive, put files into it, modify files >that are already in it, and delete files already in it. Use the file system. That's what it's for. -- René Pijlman -- http://mail.python.o

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Ben Sizer
Steven D'Aprano wrote: > The "Python is both interpreted and compiled" camp, who > believe that both steps are equally important, and to > raise one over the other in importance is misleading. > That's why Sun doesn't describe Java as interpreted, > but as byte-code compiled. They did that before t

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

2006-02-21 Thread Max M
kbperry wrote: > Call me crazy and stupid, but how do you start zope? I downloaded the > thing, installed it, and then nothing. I can find a stupid README.txt > that is useful. > > Can someone help?Please! Install Python 2.4 Install Zope 3 in that python by using setup.py Make a Zope ins

Re: getting started, .py file

2006-02-21 Thread Steven D'Aprano
Ingrid wrote: > Thanks everyone. That's exactly what I was looking for, but I still > can't seem to make it work. I've got the interpreter starting in > "C:\Program Files\Python2.4", and my code is in "C:\Documents and > Settings\Ingrid\My Documents". So, I did: > import os > os.chdir("C:\\Doc

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

2006-02-21 Thread bonono
11MB is seldom a concern for today's machine. Durumdara wrote: > Hi ! > > I have a problem. > I have a little tool that can get data about filesystems and wrote it in > python. > > The main user asked me a GUI for this software. > > This user is needed a portable program, so I create this kind of

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

2006-02-21 Thread Martin Franklin
Durumdara wrote: > Hi ! > > I have a problem. > I have a little tool that can get data about filesystems and wrote it in > python. > > The main user asked me a GUI for this software. > > This user is needed a portable program, so I create this kind of the > software with Py2Exe. > > But it hav

Re: fast text processing

2006-02-21 Thread Ben Sizer
Maybe this code will be faster? (If it even does the same thing: largely untested) filehandle = open("data",'r',buffering=1000) fileIter = iter(filehandle) lastLine = fileIter.next() lastTokens = lastLine.strip().split(delimiter) lastGeno = extract(lastTokens[0]) for currentLine in fileIter:

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

2006-02-21 Thread Durumdara
Hi ! Yes, it is. But that tool is designed for USB PenDrive usage. The assessor is collect all tools it needed to see a machine(s) in the checked corporation. He/she needs little programs, because he need to store the results of the checkings too, not the tools only. So I need to minimalize the

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

2006-02-21 Thread Ravi Teja
Dependency tracking is usually not perfect in exe generators. I don't recall how good py2exe is at this. If you understand which of those files will not be used by your program, you can safely delete them. A bit of trial and error here if you are not sure. Unless you are using floppies or dialup to

Re: how to break a for loop?

2006-02-21 Thread Gregory Petrosyan
Thanks to everybody for help. Python community is very friendly and helpfull indeed! -- http://mail.python.org/mailman/listinfo/python-list

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

2006-02-21 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > So, so close The problem with this implementation is that it > doesn't monitor usb keyboards under linux at all as far as I can > tellsince no keyboard entry will show up in /proc/interrupts with a > usb keyboard. I absolutely need the keyboard monitoring as w

Re: converting sqlite return values

2006-02-21 Thread Gerhard Häring
bolly wrote: > Hi, > I've been putting Python data into a sqlite3 database as tuples but > when I retrieve them they come back as unicode data e.g > 'u(1,2,3,4)'. Looks like you're using pysqlite 2.x. > How can I change it back to a tuple so I can use it as a > Python native datatype? You canno

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

2006-02-21 Thread bonono
I doubt you can do much then as you mentioned you need GUI which is why there is the GUI related dll in the list(takes a large chunk of it), then the necessary python runtime. However, even for USB pen, I don't think 11M is that much a big deal. We have digicam that can produce file size like that

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

2006-02-21 Thread Giovanni Bajo
Durumdara wrote: > I need to have more compressed result. Can I compress dll-s, pyd-s > with Py2Exe ? > Can I decrease the total size with something ? > > If not, how to I create an self-unpackager and self-starter program > that use an temporary directory in the disk ? With WinRar ? You can use

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

2006-02-21 Thread Mikael Olofsson
Durumdara wrote: > But it have very big size: 11 MB... :-( > > The dist directory: > [snip relatively small files] > 2005.09.28. 12:41 1 867 776 python24.dll > [snip relatively small files] > 2006.01.10. 19:09 4 943 872 wxmsw26uh_vc.dll > [snip relatively small files] >

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

2006-02-21 Thread Durumdara
Dear Martin ! Thanx for it: setup( options = {"py2exe": {"bundle_files": 1, # < this help me "compressed": 1, "optimize": 2}}, # The lib directory contains everything except the executables and the python

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

2006-02-21 Thread Gerhard Häring
Durumdara wrote: > Hi ! > > I have a problem. > I have a little tool that can get data about filesystems and wrote it in > python. > > The main user asked me a GUI for this software. > > This user is needed a portable program, so I create this kind of the > software with Py2Exe. > > But it have

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

2006-02-21 Thread Gerhard Häring
Durumdara wrote: > Hi ! > > Yes, it is. But that tool is designed for USB PenDrive usage. > The assessor is collect all tools it needed to see a machine(s) in the > checked corporation. > He/she needs little programs, because he need to store the results of > the checkings too, not the tools onl

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

2006-02-21 Thread Durumdara
Hi ! >I've snipped out the relatively small files above. Yes, true, some of >them consume about 0.5MB each. > >It seems to me that your choice of GUI framework is a major cost here. I >have never used wxpython. Instead my GUIs are based on tkinter. What I >typically end up with is roughly 7MB.

Re: fast text processing

2006-02-21 Thread Alexis Gallagher
Steve, First, many thanks! Steve Holden wrote: > Alexis Gallagher wrote: >> >> filehandle = open("data",'r',buffering=1000) > > This buffer size seems, shall we say, unadventurous? It's likely to slow > things down considerably, since the filesystem is probably going to > naturally wnt to use

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

2006-02-21 Thread Martin Franklin
Durumdara wrote: > Dear Martin ! > > Thanx for it: > > setup( > options = {"py2exe": {"bundle_files": 1, # < this > help me > "compressed": 1, > "optimize": 2}}, > # The lib directory contains everything e

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Kay Schluehr
Alexander Schmolck wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > > Alexanders hypothesis is completely absurd. > > You're currently not in the best position to make this claim, since you > evidently misunderstood what I wrote (I certainly did not mean to suggest that > Guido *deliberatel

Re: editor for Python on Linux

2006-02-21 Thread Fabio Zadrozny
Well... pydev has it: http://pydev.sf.net and pydev extensions goes much further: http://www.fabioz.com/pydev Cheers, Fabio jean-michel bain-cornu wrote: >>Boa-Constructor is an IDE rather than an editor. Although it focuses >>on wxPython, it has a good editor. >> >> >Yes, some possibilit

Re: general coding issues - coding style...

2006-02-21 Thread calmar
On 2006-02-20, JW <[EMAIL PROTECTED]> wrote: Hi JW, > About this line: > 1585 if sys.path[0][-12:] == "\library.zip": #for py2exe > > pl... suggested: > if sys.path[0].endswith( "\\library.zip" ): > > > print "\\library.zip" > Yeah, I have two backslashes, but thaks for pointing out. > If you

Re: editor for Python on Linux

2006-02-21 Thread Sbaush
My favourite is Kate, available on KDE but working great also on Gnome!2006/2/21, Fabio Zadrozny <[EMAIL PROTECTED]>: Well... pydev has it: http://pydev.sf.net and pydev extensions goes muchfurther: http://www.fabioz.com/pydevCheers,Fabio jean-michel bain-cornu wrote:>>Boa-Constructor is an IDE rat

Re: Newbie question: Multiple installations of Python on Windows machines

2006-02-21 Thread Fuzzyman
Don Taylor wrote: > I have Python 2.4.2 installed on a Windows XP machine. > > There is an application that I want to use that refuses to install > unless I have Python 2.3.x installed. (The only way that I can install > this is to use it's .exe installer) > > Can I install two versions of Python

Re: changing value of 'self' when subclassing int

2006-02-21 Thread Fuzzyman
David Coffin wrote: > I'd like to subclass int to support list access, treating the integer > as if it were a list of bits. > Assigning bits to particular indices involves changing the value of > the integer itself, but changing 'self' obviously just alters the > value of that local variable. > Is

odt -> pdf

2006-02-21 Thread Katja Suess
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 -- http://mail.python.org/mailman/listi

Re: DCOracle2: OCI error

2006-02-21 Thread Chris
Update: Instead of disconnect / reconnect, I made it so that in case of 1084 errors I rollback and retry the same INSERT again. It worked... It's not beautiful code but it's working. So really I think something's fishy in dco2.c If someone tell me what should be investigated I could look into the i

Re: [DICTIONARY] - Copy dictionary entries to attributes

2006-02-21 Thread Ilias Lazaridis
Diez B. Roggisch wrote: > Ilias Lazaridis schrieb: >> remark: not sure if the term "dictionary" is correct here. >> >> I have the following situation: >> >> within a setup.cfg, settings are passed this way: >> >> settings=project_page=theProjectPage.com >> myVar=myValue >> >> those are acce

Re: - Copy dictionary entries to attributes

2006-02-21 Thread Ilias Lazaridis
Ben Wilson wrote: > Perhaps: > > def dictionary_make_attributes(self, settings): > for k,v in settings: > setattr(self, k, v) this one resulted in an error: "ValueError: too many values to unpack" it works with this correction: for k,v in settings.items() > http://ftp.python.org

Re: - Copy dictionary entries to attributes

2006-02-21 Thread Ilias Lazaridis
Alex Martelli wrote: > Ben Wilson <[EMAIL PROTECTED]> wrote: > >> Perhaps: >> >> def dictionary_make_attributes(self, settings): >> for k,v in settings: >> setattr(self, k, v) for k,v in settings.items() > This is a very general solution and will work for all kinds of objects > wit

CGAL bindings

2006-02-21 Thread jelle
Hi, I'm wondering whether anyone is aware of efforts being made wrapping the CGAL library? It's a highly advanced computational geometry library, see cgal.org -j //any other computational geometry links appreciated... -- http://mail.python.org/mailman/listinfo/python-list

Re: DCOracle2: OCI error

2006-02-21 Thread Diez B. Roggisch
Chris wrote: > Update: Instead of disconnect / reconnect, I made it so that in case of > 1084 errors I rollback and retry the same INSERT again. > It worked... It's not beautiful code but it's working. > So really I think something's fishy in dco2.c > If someone tell me what should be investigated

Re: deriving from float or int

2006-02-21 Thread bearophileHUGS
Probably this is interesting for you: http://home.tiscali.be/be052320/Unum.html I think its API can be improved, but it can be used. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter Checkboxes

2006-02-21 Thread D
Thank, Mikael..after messing with it for quite awhile, I finally found out I need the .get()! Appreciate the help.. Doug -- http://mail.python.org/mailman/listinfo/python-list

algorithm, optimization, or other problem?

2006-02-21 Thread Brian Blais
Hello, I am trying to translate some Matlab/mex code to Python, for doing neural simulations. This application is definitely computing-time limited, and I need to optimize at least one inner loop of the code, or perhaps even rethink the algorithm. The procedure is very simple, after initi

Re: changing value of 'self' when subclassing int

2006-02-21 Thread Nick Craig-Wood
David Coffin <[EMAIL PROTECTED]> wrote: > I'd like to subclass int to support list access, treating the integer > as if it were a list of bits. > Assigning bits to particular indices involves changing the value of > the integer itself, but changing 'self' obviously just alters the > valu

Re: Pyserial never read

2006-02-21 Thread Nick Craig-Wood
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. -- Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-

Re: how to break a for loop?

2006-02-21 Thread bearophileHUGS
This time it seems that using itertools gives slower results, this is the test code: import itertools as it from operator import __not__ def trim_leading_zeros(seq): if not seq: return seq for pos, el in enumerate(seq): if el != 0: break if seq[pos] == 0:

Re: In need of a virtual filesystem / archive

2006-02-21 Thread Ivan Vilata i Balaguer
En/na Enigma Curry ha escrit:: > I need to store a large number of files in an archive. From Python, I > need to be able to create an archive, put files into it, modify files > that are already in it, and delete files already in it. >[...] > Is there any archive format that can allow Python to mod

Re: how to break a for loop?

2006-02-21 Thread bonono
[EMAIL PROTECTED] wrote: > This time it seems that using itertools gives slower results, this is > the test code: Understandable, as dropwhile still needs to go through the whole list and the difference will be larger when the list get longer. Though I still prefer that if the list is not horribly

Re: share function argument between subsequent calls but not between class instances!

2006-02-21 Thread Duncan Booth
Steven D'Aprano wrote: >>> The most common idiom for such a marker is the None value. >>> >> >> Can you provide any firm evidence that using None is more common? > > > Yes, I wrote a quick and dirty script to roughly count the default > values in the Python 2.3 standard library. Here are my re

Re: Building python 2.4.2 on Cygwin

2006-02-21 Thread Jason Tishler
Steve, On Mon, Feb 20, 2006 at 11:49:06PM -0500, Stephen Gross wrote: > >On Mon, Feb 20, 2006 at 12:24:34PM -0800, mrstephengross wrote: > >>Ok, I'm working on building python 2.4.2 on cygwin. I *think* it's > >>version 3.0 or 3.1 (is there a quick way to find out what version of > >>cygwin is run

CGI and Redirect

2006-02-21 Thread Grzegorz Ślusarek
Hi All. I need to redirect user in my CGI script, i Try to use prin "Location: "+url but this is not working. Can anyone tell me what I'm doing wrong? Any thanks will be apreciated Gregor -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI and Redirect

2006-02-21 Thread Gerhard Häring
Grzegorz Ślusarek wrote: > Hi All. I need to redirect user in my CGI script, i Try to use prin > "Location: "+url but this is not working. Can anyone tell me what I'm > doing wrong? > Any thanks will be apreciated I guess you forgot to set the HTTP-Status. Either: print "Status: 301" # Mov

Re: CGI and Redirect

2006-02-21 Thread Fredrik Lundh
Grzegorz Slusarek wrote: > Hi All. I need to redirect user in my CGI script, i Try to use prin > "Location: "+url but this is not working. Can anyone tell me what I'm > doing wrong? something like print "Status: 302" print "Location: " + new_url print sys.exit(1) should work (a

Re: Building python 2.4.2 on Cygwin

2006-02-21 Thread Stephen Gross
>Just to be sure, what does the following indicate? $ cygcheck -c cygwin Cygwin Package Information Package VersionStatus cygwin 1.5.18-1 OK >BTW, can you use the pre-built Python 2.4.1 that is part of the standard Cygwin distribution? Nope--I need to

Re: Mutable numbers

2006-02-21 Thread fraca7
Suresh Jeevanandam a écrit : > # I am new to python. > > In python all numbers are immutable. This means there is one object ( a > region in the memory ) created every time we do an numeric operation. I > hope there should have been some good reasons why it was designed this way. The memory all

Re: Python vs. Lisp -- please explain

2006-02-21 Thread Chris Mellon
On 2/20/06, Donn Cave <[EMAIL PROTECTED]> wrote: > Quoth Steven D'Aprano <[EMAIL PROTECTED]>: > ... > | Nobody denies that Python code running with no optimization tricks is > | (currently) slower than compiled C code. That's a matter of objective > | fact. Nobody denies that Python can be easily r

message

2006-02-21 Thread Nina Almaguer
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, you have probably visited som

Zope/Plone - Is it the right solution?

2006-02-21 Thread kbperry
Hi everyone, 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 clerical staff). The biggest problem wi

Re: algorithm, optimization, or other problem?

2006-02-21 Thread Gerard Flanagan
Brian Blais wrote: > Hello, > > I am trying to translate some Matlab/mex code to Python, for doing neural > simulations. This application is definitely computing-time limited, and I > need to > optimize at least one inner loop of the code, or perhaps even rethink the > algorithm. >The proced

Re: algorithm, optimization, or other problem?

2006-02-21 Thread Gerard Flanagan
Gerard Flanagan wrote: > Brian Blais wrote: > > Hello, > > > > I am trying to translate some Matlab/mex code to Python, for doing neural > > simulations. This application is definitely computing-time limited, and I > > need to > > optimize at least one inner loop of the code, or perhaps even ret

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

2006-02-21 Thread Chris Lasher
You may want to look at either of the popular frameworks, TurboGears http://www.turbogears.org/ or Django http://www.djangoproject.com/ I have very little experience with both, but I decided to try learning the Django framework after watching the Snakes and Rubies videos. (See http://www.djangopro

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

2006-02-21 Thread skip
> So, so close The problem with this implementation is that it > doesn't monitor usb keyboards under linux at all as far as I can > tellsince no keyboard entry will show up in /proc/interrupts with > a usb keyboard. I absolutely need the keyboard monitoring as

Re: Building python 2.4.2 on Cygwin

2006-02-21 Thread Jason Tishler
Steve, On Tue, Feb 21, 2006 at 09:31:48AM -0500, Stephen Gross wrote: > >Just to be sure, what does the following indicate? > $ cygcheck -c cygwin > Cygwin Package Information > Package VersionStatus > cygwin 1.5.18-1 OK Try reinstalling Cygwin 1.5.18

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

2006-02-21 Thread kbperry
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. -- http://mail.python.org/mailman/listinfo/python-list

Re: Print a PDF transparently

2006-02-21 Thread Grant Edwards
On 2006-02-20, Tim Golden <[EMAIL PROTECTED]> wrote: > [Daniel Crespo] >| >| > Have you seen this? >| > http://tgolden.sc.sabren.com/python/win32_how_do_i/print.html >| > In particular, the section on using win32print directly. >| >| Yes, I have. The problems is that an external program is la

No

2006-02-21 Thread Gaz
Check this piece of code: #now add an image part part = writer.nextpart() part.addheader('Content-Transfer-Encoding', 'base64') body = part.startbody('image/jpeg') base64.encode(open('c:\check.jpg', 'rb'), body) I get the following error: IOError: [Errno 2] No such file or di

popen2() does not work correctly on windows!

2006-02-21 Thread Peter Cai
I want to catch the output of a program but I can not use redirect because it's interactive and thus I need to see the output on the screen. So I use popen2() to execute it and then both print the output on the screen and in a log file. But when I want to write something command to it, it seems th

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

2006-02-21 Thread Fredrik Lundh
"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 clerical staff). > > The bi

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

2006-02-21 Thread Bruce Southey
Hi, In the current version, note that Y is scalar so replace the squaring (Y**2) with Y*Y as you do in the dohebb function. On my system without blas etc removing the squaring removes a few seconds (16.28 to 12.4). It did not seem to help factorizing Y. Also, eta and tau are constants so define t

Re: Mutable numbers

2006-02-21 Thread Steve Holden
fraca7 wrote: > Suresh Jeevanandam a écrit : > >># I am new to python. >> >>In python all numbers are immutable. This means there is one object ( a >>region in the memory ) created every time we do an numeric operation. I >>hope there should have been some good reasons why it was designed this w

Re: Mutable numbers

2006-02-21 Thread Steve Holden
fraca7 wrote: > Suresh Jeevanandam a écrit : > >># I am new to python. >> >>In python all numbers are immutable. This means there is one object ( a >>region in the memory ) created every time we do an numeric operation. I >>hope there should have been some good reasons why it was designed this w

Re: Print a PDF transparently

2006-02-21 Thread Daniel Crespo
Thank you very much Roger Upole and Tim Golden for your posts... I found an exe that can print a pdf file (using Acrobat Reader) on any windows printer right from the command line. It opens Acrobat, order it to print the pdf file at a certain printer and then closes Acrobat. The exe is a c-compile

Re: editor for Python on Linux

2006-02-21 Thread Joel Hedlund
>>I really think that IDLE is one of the best around in Python source editing. > > For me, I find that IDLE is about the worse for editing Python sources. "Worse"? Now that's harsh. I'm with billie on this one. I usually spend a day or so every 3 months trying to find a free python editor that s

Re: Mutable numbers

2006-02-21 Thread Fredrik Lundh
Steve Holden wrote: > > The memory allocation for integers is optimized. 'Small' integers > > (between -5 and 100 IIRC) are allocated once and reused. The memory for > > larger integers is allocated once and reused whenever possible, so the > > malloc() overhead is negligible. > > The first bit's

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

2006-02-21 Thread kbperry
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 for a wiki. I will definitely c

Video Capture modules in linux

2006-02-21 Thread [EMAIL PROTECTED]
heya, i need this video capture modules which i can use in linux, u know the similar one used in windows, Now Windows is not my type and it would be really helpful if someone helps me out...i tried libfg but its not useful in my case (BTW its a great library)... regards Sudharshan S -- http://m

Re: Pyserial never read

2006-02-21 Thread Peter Hansen
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 that in his original post he says it works when he uses Delph

PDF on dot matrix printers

2006-02-21 Thread Daniel Crespo
Hi to all, Does anyone know about how to make a dot matrix printer print a PDF file with the quality of a Microsoft Word printing? When I print from Microsoft Word, the output is perfect for the kind of printer. But, from a PDF file, the characters are distortionated in an uniform way. With "unif

Re: Mutable numbers

2006-02-21 Thread Fredrik Lundh
Steve Holden wrote: > > The memory allocation for integers is optimized. 'Small' integers > > (between -5 and 100 IIRC) are allocated once and reused. The memory for > > larger integers is allocated once and reused whenever possible, so the > > malloc() overhead is negligible. > > The first bit's

Re: Mutable numbers

2006-02-21 Thread Dave Hansen
On Tue, 21 Feb 2006 12:44:52 +0530 in comp.lang.python, Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: ># I am new to python. > >In python all numbers are immutable. This means there is one object ( a >region in the memory ) created every time we do an numeric operation. I >hope there should have

Re: Pyserial never read

2006-02-21 Thread Peter Hansen
luca72 wrote: > Thanks for your help, but it don't solve the problem. > I receive only the echo and full stop. If you want help, you'll do better to post small pieces of code that you are actually using, rather than making us guess or imagine what you are doing. There are perhaps a dozen things

streaming Popen.stdout

2006-02-21 Thread Michele Simionato
I was experimenting with subprocess.Popen with the following script: $ cat Popen_ex.py import sys, subprocess po = subprocess.Popen([sys.executable, 'hello.py'], stdout=subprocess.PIPE, bufsize=0) for line in po.stdout: print line, where hello.py is the following script:

Re: No

2006-02-21 Thread Peter Hansen
Gaz wrote: > Check this piece of code: > > #now add an image part > part = writer.nextpart() > part.addheader('Content-Transfer-Encoding', 'base64') > body = part.startbody('image/jpeg') > base64.encode(open('c:\check.jpg', 'rb'), body) > > I get the following error: > > IOEr

Re: Mutable numbers

2006-02-21 Thread fraca7
Steve Holden a écrit : > [Thinks: or maybe fraca7 just meant that integers will be garbage > collected when there are no more references to them]. Actually I meant that the memory is reused, but the same integer won't always have the same address. I guess that in your example, the '121' is ass

Re: Mutable numbers

2006-02-21 Thread fraca7
fraca7 a écrit : > Steve Holden a écrit : > >> [Thinks: or maybe fraca7 just meant that integers will be garbage >> collected when there are no more references to them]. > > Actually I meant that the memory is reused, but the same integer won't > always have the same address. And of course thi

Re: Video Capture modules in linux

2006-02-21 Thread [EMAIL PROTECTED]
well wht can i say it simply refuses to compile...i m getting make errors. i think the culprit is the gcc-4.0..secondly i havent had a chance to really try it out..aneways does libfg manipulate inputs from webcams..like VideoCapture modules ..also i think libfg is mainly for C although a module for

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

2006-02-21 Thread Rene Pijlman
Michele Simionato: >I usually do not recommend Zope, unless you want to make a career as a >Zope consultant. You have a point there. >If you have to interact with a relational database, your life with Zope >may be hard: And if you have to interact with flat files, your life with an RDBMS may

Re: Multiple assignment and the expression on the right side

2006-02-21 Thread Alex Martelli
Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: ... > I think I got confused because of "Each time" in the sentence which > gives a feeling that it gets executed several times. Maybe, It could > have been just written, "When the statement gets executed, the right > hand side is evaluated once,

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

2006-02-21 Thread N.Davis
kbperry wrote: 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 clerical staff). That is exactly the kind of thing Plone is good at. A good match I would say. Check out http://plone.org

Re: Mutable numbers

2006-02-21 Thread Rocco Moretti
Steve Holden wrote: > fraca7 wrote: > >> The memory allocation for integers is optimized. 'Small' integers >> (between -5 and 100 IIRC) are allocated once and reused. The memory >> for larger integers is allocated once and reused whenever possible, so >> the malloc() overhead is negligible. >

  1   2   3   >