Re: Advanced concurrancy

2005-08-03 Thread Stefan Rank
on 04.08.2005 00:36 Michael Sparks said the following: > Peter Tillotson wrote: >>I'm quite interested in the mini version and also using the modules as >>mobile code rather than installing it formally. > > I'll document it slightly better and post up on the website in the next 48 > hours or so.

Re: Wheel-reinvention with Python

2005-08-03 Thread Robert Kern
Paul McNett wrote: > Mike Meyer wrote: > >>Mike Meyer <[EMAIL PROTECTED]> writes: >> I think you'll find that wxPython installs perfectly on Tiger using the package provided. Indeed, the only really painful platform to install wxPython on is Linux, where you pretty much need to build f

Re: Wheel-reinvention with Python

2005-08-03 Thread Paul McNett
Mike Meyer wrote: > Mike Meyer <[EMAIL PROTECTED]> writes: > >>>I think you'll find that wxPython installs perfectly on Tiger using >>>the package provided. Indeed, the only really painful platform to >>>install wxPython on is Linux, where you pretty much need to build from >>>source if you want t

Re: Ideas for Python project?

2005-08-03 Thread Stuart Turner
Jon Hewer wrote: > Hi > > I'm pretty new to Python, and recently been working my way through > Dive Into Python, and I'm currently writing a really simple rss reader > purely to get familiarised with the language. I want to move onto > something a little more challenging, but I'm stuck for ideas

Re: Python-Excel: How to paste selected cells (range) to different location on the same sheet in Excel

2005-08-03 Thread zxo102
I found the solution for this. It needs to select a new location and paste from "sh". Thank you for your reading this. import win32com.client xl=win32com.client.Dispatch("E­xcel.Application") xl.Visible=1 wb = xl.Workbooks.Add( ) sh=wb.Worksheets(1) sh.Cells(1,1).Value = "Hello World!" sh.Cells(3,

Re: Art of Unit Testing

2005-08-03 Thread Terry Reedy
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message news:[EMAIL PROTECTED] > I knew there was some other one before unittest came along but I thought > unittest was supposed to replace the older stuff. I believe unittest was an alternative rather than replacement for doctest. > What'

Re: Wheel-reinvention with Python

2005-08-03 Thread Torsten Bronger
Hallöchen! Mike Meyer <[EMAIL PROTECTED]> writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> Mike Meyer <[EMAIL PROTECTED]> writes: >> >>> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> >>> [...] >>> >>> You didn't answer the question about how you define agile >>> project. Please do so

Python-Excel: How to paste selected cells (range) to different location on the same sheet in Excel

2005-08-03 Thread zxo102
Hi there, I need your help for python <--> excel. I want to paste selected cells (range) to different location on the same sheet in Excel through python. I have tried it for a while but could not figure it out. Here is my sample code: import win32com.client xl=win32com.client.Dispatch("Excel.A

Re: Wheel-reinvention with Python

2005-08-03 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > No, it's not a discussion about estimates. The average household in > a G8 country has more computers that don't run Windows - and in fact > don't have GUIs at all - than otherwise. This is a fact of life. Most of those computers aren't programmable in Pyth

Re: Standards not standard

2005-08-03 Thread Mike Meyer
Dark Cowherd <[EMAIL PROTECTED]> writes: >> > I really think that the community needs a lot more of STANDARDS not >> > a STANDARD GUI >> >> Standards happen in one of two ways. Either an 800-lb gorrilla >> establishes them by fiat, or a group of people interested in having >> their code play well

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
Mike Meyer <[EMAIL PROTECTED]> writes: >> I think you'll find that wxPython installs perfectly on Tiger using >> the package provided. Indeed, the only really painful platform to >> install wxPython on is Linux, where you pretty much need to build from >> source if you want the latest and greatest.

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
Cliff Wells <[EMAIL PROTECTED]> writes: > On Wed, 2005-08-03 at 09:47 -0400, Mike Meyer wrote: >> Cliff Wells <[EMAIL PROTECTED]> writes: >> > On Tue, 2005-08-02 at 20:17 -0400, Mike Meyer wrote: >> >> Um - you're not answering the question I asked. I asked "What app do I >> >> use to bundle my app

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> Because such projects attract the greatest number of developers, >>> many of them being amongst the most diligent developers, too. I >>> expect this

Re: Python's CSV reader

2005-08-03 Thread Christopher Subich
Stephan wrote: > Can the CSV module be coerced to read two line formats at once or am I > better off using read and split? Well, readlines/split really isn't bad. So long as the file fits comfortably in memory: fi = open(file) lines = fi.readlines() evens = iter(lines[0::2]) odds = iter(lines[1

Is there a way to determine -- when parsing -- if a word contains a builtin name or other imported system module name?

2005-08-03 Thread Casey Hawthorne
Is there a way to determine -- when parsing -- if a word contains a builtin name or other imported system module name? Like "iskeyword" determines if a word is a keyword! -- Regards, Casey -- http://mail.python.org/mailman/listinfo/python-list

Python's CSV reader

2005-08-03 Thread Stephan
I'm fairly new to python and am working on parsing some delimited text files. I noticed that there's a nice CSV reading/writing module included in the libraries. My data files however, are odd in that they are composed of lines with alternating formats. (Essentially the rows are a header record a

Re: Secure email

2005-08-03 Thread whisper
Paul Rubin wrote: >[EMAIL PROTECTED] writes: > > >>I need to write a .cgi that will take the content of an https GET or >>POST and send it securely as email to an Outlook client. >> >> > >You're asking how to make S/MIME messages? This isn't really the >right newsgroup. > > Well, perhaps

Re: quetion about "+=" and "runtime"

2005-08-03 Thread Robert Kern
[EMAIL PROTECTED] wrote: > 1.i have look " += " up,but i can't find it. http://docs.python.org/ref/augassign.html > is it ofthen used? Reasonably so. > 2.i saq a result like this in a web page: > > > $ time python permute2.py 56789 3 > Got 120 items. > Maximum at 87596 ,product 84000 > > rea

Re: Art of Unit Testing

2005-08-03 Thread Paul Rubin
Benjamin Niemann <[EMAIL PROTECTED]> writes: > Some (many?) people don't like the unittest module, because it is not very > pythonic - nothing to wonder as it has its root in the Java world. That's > probably one of the reasons why there are other (more pythonic) unittesting > frameworks for Python

Re: quetion about "+=" and "runtime"

2005-08-03 Thread gagaguy
1.i have look " += " up,but i can't find it.is it ofthen used? 2.i saq a result like this in a web page: $ time python permute2.py 56789 3 Got 120 items. Maximum at 87596 ,product 84000 real0m0.057s user0m0.050s sys 0m0.000s $ time python permute3.py 56789 3 Got 120 items. Maximum a

Re: Mass importing of a template based system.. Trouble with name substitutions

2005-08-03 Thread Robert Kern
rh0dium wrote: > Hi all, > > Basically I have a bunch of pluggins in a directory (METDIR). For each > one of these templated pluggins I want to do a specific routine. Let's > start with a basic template > > file example1.py > > class example1: >def __init__(self): > pr

Re: quetion about "+=" and "runtime"

2005-08-03 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 1.i saw "+=" in a program code,but i haven't see it before,neither can > i find it in a cook,who can tell me the usage of "python0" It probably is in the tutorial and certainly is in the reference manual. I don't understand "usage of

quetion about "+=" and "runtime"

2005-08-03 Thread gagaguy
1.i saw "+=" in a program code,but i haven't see it before,neither can i find it in a cook,who can tell me the usage of "python0" 2.how can i know how long does a program run? -- http://mail.python.org/mailman/listinfo/python-list

quetion about "+=" and "runtime"

2005-08-03 Thread gagaguy
1.i saw "+=" in a program code,but i haven't see it before,neither can i find it in a cook,who can tell me the usage of "python0" 2.how can i know how long does a program run? -- http://mail.python.org/mailman/listinfo/python-list

Mass importing of a template based system.. Trouble with name substitutions

2005-08-03 Thread rh0dium
Hi all, Basically I have a bunch of pluggins in a directory (METDIR). For each one of these templated pluggins I want to do a specific routine. Let's start with a basic template file example1.py class example1: def __init__(self): print "Initialize" def run(self):

pyunit and Eclipse

2005-08-03 Thread Steve Jorgensen
I was working with a friend on a project Monday night, and tried to run a pyunit test from Eclipse, and nothing seemed to happen. We finally figured out that the test is doing exactly what it's supposed to do, but the pyunit output isn't making it to the Eclipse console window. We get the same re

Re: Getting a dictionary from an object

2005-08-03 Thread Mike Moum
Thanos Tsouanas wrote: I'm not sure what you're getting at, but have you tried this: class A(object): def __getitem__(self, ky): return self.__dict__[ky] for example: >>> class A(object): def __init__(self,a,b,c): self.a = a self.b = b

Re: Art of Unit Testing

2005-08-03 Thread Raymond Hettinger
Christoph Zwerschke wrote: > I wasn't aware of the py lib so far. The > possibility to create fixtures at the three different scopes is exactly > what I was looking for. > > Anyway, I think it would be nice to have that feature in the standard > lib unittest as well. It should not be too hard to ad

Re: cut & paste text between tkinter widgets

2005-08-03 Thread Christopher Subich
Apologies in advance to anyone who has this post mangled, I use a couple Unicode characters at the end and Thunderbird wants to use UTF8 for the message encoding. Unless it does something weird, this post should still be legible... but I'm not going to rely on that. :) William Gill wrote: >> 2

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Terry Reedy
"Michael Sparks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > An alternative to this is this: > > def updater(interval, message): > t = time.time(): > while 1: > if time.time() - t > interval: > print message yield None # add this > > def long_r

Re: START YOUR OWN BIZ MAKING THOUSANDS USING PAYPAL!!!

2005-08-03 Thread lemon97
) [EMAIL PROTECTED] 2) [EMAIL PROTECTED] 3) [EMAIL PROTECTED] 4) [EMAIL PROTECTED] 5) [EMAIL PROTECTED] 6) [EMAIL PROTECTED] The following addresses above, ARE all yours! You are just another SCAMMER. And the method for making this money, is completely idiotic. Here is my example: [EMAIL PROTECT

Re: Advanced concurrancy

2005-08-03 Thread Michael Sparks
Peter Tillotson wrote: > I've not yet had a chance to try some examples, but i've looked through > the documentation. It feels quite familiar, It hopefully should. The approach is based essentially on an asynchronous hardware approach, on the recognition that the fundamental reason that hangs to

RE: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
Tim Golden wrote: > I just wanted to say that I find the ideas behind Kamaelia > interesting, and I only wish I had an application for it! > Because I'm not especially into media-streaming, I'm more > interested in it from the point of view of the generator-based > architecture. It's nice to know

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
phil hunt wrote: > On Wed, 03 Aug 2005 16:57:34 +0100, Michael Sparks <[EMAIL PROTECTED]> > wrote: ... >>Which aside from other things means you can't build (say) a video >>& SMIL playback system trivially, yet. > > Isn't SMIL something that's goinhg to go into web browsers? In which > case, you'

RE: Art of Unit Testing

2005-08-03 Thread Delaney, Timothy (Tim)
phil hunt wrote: >> tests? If they were unit tests, they should take only a few minutes >> to run, total, > > Eek! Seconds, more like. Unfortunately, when you've got umteen zillion of them, having individually fast test suites doesn't help much :( The complete test suite for my current project

Re: cut & paste text between tkinter widgets

2005-08-03 Thread jepler
Here's some code that gives a cut-copy-paste pop-up window on all Entry widgets in an application. This code is released into the public domain. Jeff Epler # import Tkinter def make_menu(w): global the_menu the_menu

RE: HELP:sorting list of outline numbers

2005-08-03 Thread Delaney, Timothy (Tim)
Scott David Daniels wrote: > Delaney, Timothy (Tim) wrote: >> Scott David Daniels wrote: >>> For 2.3: (using DSU -- Decorate, Sort, Undecorate) > ... >>> lst = ['1', '1.2', '1.12', '1.1', '3.1'] >>> decorated = [(numparts(txt), txt) for txt in lst] >>> decorated.sort() lst[

Re: Py: a very dangerous language

2005-08-03 Thread [EMAIL PROTECTED]
Luis M. Gonzalez wrote: > Well, I have no problems going to bed. > The problem is that while sleeping, I keep on coding in my head... > Sometimes I reach the "A ha!" state, then I wake up, turn on the my pc > and type the solution. > I'm a little bit worried though... I don't even have erotic drea

Re: cut & paste text between tkinter widgets

2005-08-03 Thread William Gill
>> Is there a simple way to cut and paste from a tkinter text widget to >> an entry widget? I know I could create a mouse button event that >> triggers a popup (message widget) prompting for cut/paste in each of >> the widgets using a temp variable to hold the text, but I don't wnat >> to re

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
phil hunt wrote: > On Wed, 03 Aug 2005 16:57:34 +0100, Michael Sparks <[EMAIL PROTECTED]> wrote: >>> Is the audience programmers or >>> less technical people? A project that allows non-technical people >>> to build complex network applications is an ambitious one, but not ... >>It's a little ambit

Re: Secure email

2005-08-03 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I need to write a .cgi that will take the content of an https GET or > POST and send it securely as email to an Outlook client. You're asking how to make S/MIME messages? This isn't really the right newsgroup. -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-08-03 Thread Cliff Wells
On Wed, 2005-08-03 at 09:47 -0400, Mike Meyer wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > > On Tue, 2005-08-02 at 20:17 -0400, Mike Meyer wrote: > > > >> Um - you're not answering the question I asked. I asked "What app do I > >> use to bundle my applications for Unix, ala py2exe (or what

PyAr - Python Argentina 10th Meeting, Thursday, August 4th

2005-08-03 Thread Batista, Facundo
Title: PyAr - Python Argentina 10th Meeting, Thursday, August 4th The Argentine Python User Group, PyAr, will have its tenth meeting this Thursday, August 4th at 7:00pm. Agenda -- Despite our agenda tends to be rather open, this time we would like to cover these topics: - Discuss pr

Re: pain

2005-08-03 Thread Mage
Terry Reedy wrote: >"Mage" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > >>Thank you, I will check this out. My company will switch to a jsp site. >>Isn't jython slower (I mean performance) than java? As well as I >>understand jython code will be interpreted twice. >> >> >

Re: Py: a very dangerous language

2005-08-03 Thread Luis M. Gonzalez
Well, I have no problems going to bed. The problem is that while sleeping, I keep on coding in my head... Sometimes I reach the "A ha!" state, then I wake up, turn on the my pc and type the solution. I'm a little bit worried though... I don't even have erotic dreams anymore! -- http://mail.python

Re: pain

2005-08-03 Thread Terry Reedy
"Mage" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you, I will check this out. My company will switch to a jsp site. > Isn't jython slower (I mean performance) than java? As well as I > understand jython code will be interpreted twice. I believe only in the sense that Java

Re: pain

2005-08-03 Thread Grant Edwards
On 2005-08-03, Mage <[EMAIL PROTECTED]> wrote: > Isn't jython slower (I mean performance) than java? As well as > I understand jython code will be interpreted twice. Jython gets compiled into Java byte code just like Java gets compiled into Java byte code. Then whatever platform you're using eit

Re: pain

2005-08-03 Thread Mage
Michael Hoffman wrote: > >I would have used print sum(xrange(11)) myself. > This is why I love python and this list. I can't be as offtopic that you wouldn't be able to say something useful to me about python. Thank you. Mage -- http://mail.python.org/mailman/listinfo/python-list

Re: Py: a very dangerous language

2005-08-03 Thread Benjamin Niemann
yoda wrote: > It was 2a.m I was writing my first enterprise scale application in > Python the logic just flowed from my mind onto the keyboard and was > congealed into the most beautiful terse lines of code I had ever > seen... > > It was 3a.m I knew I had to sleep work the next d

Re: pain

2005-08-03 Thread Mage
Mandus wrote: >Wed, 03 Aug 2005 17:45:34 +0200 skrev Mage: > > >> Hello, >> >>I started to learn python some months ago. Mostly for fun, but I >>replaced php to python in many tools at my company in the last weeks. >> >>Because of our boss decision now I have to learn java. I can tell

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread phil hunt
On Wed, 03 Aug 2005 16:57:34 +0100, Michael Sparks <[EMAIL PROTECTED]> wrote: > >> Is the audience programmers or >> less technical people? A project that allows non-technical people >> to build complex network applications is an ambitious one, but not >> impossible (I'd find it very impressive and

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread phil hunt
On Wed, 03 Aug 2005 16:57:34 +0100, Michael Sparks <[EMAIL PROTECTED]> wrote: >I've reordered the q's slightly to avoid repetition... Also by answering >this question first, it may put the rest of the answer into context >better. > >phil hunt wrote: > >> At what stage of completion is it? > >This

Re: trying to parse non valid html documents with HTMLParser

2005-08-03 Thread Benjamin Niemann
Steve M wrote: >>You were right, the HTMLParser of htmllib is more permissive. He just > ignores the bad tags ! > > The HTMLParser on my distribution is a she. But then again, I am using > ActivePython on Windows... Although building parsers is for some strange reason one of my favourite program

Re: socket and os.system

2005-08-03 Thread Peter Hansen
mfaujour wrote: > I HAVE THIS PYTHON PROGRAMM: [snip] > socket.error: (98, 'Address already in use') > > DOES SOMEONE HAS AN IDEA ? PLEASE learn to format your questions more appropriately! Your post is simply _awful_ to read

Re: Art of Unit Testing

2005-08-03 Thread Benjamin Niemann
Michael Hoffman wrote: > Benjamin Niemann wrote: >> Christoph Zwerschke wrote: >> >> >>>Benjamin Niemann wrote: >>> Some (many?) people don't like the unittest module, because it is not very pythonic - nothing to wonder as it has its root in the Java world. That's probably one of the

Re: socket and os.system

2005-08-03 Thread Mandus
Wed, 03 Aug 2005 15:46:50 - skrev mfaujour: > > I HAVE THIS PYTHON PROGRAMM: > [snip] welcome to usenet! Maybe you get an answer if you doesn't shout that much. Or maybe you just have a problem with you Caps Lock? -- Man

Re: pain

2005-08-03 Thread Mandus
Wed, 03 Aug 2005 17:45:34 +0200 skrev Mage: > Hello, > > I started to learn python some months ago. Mostly for fun, but I > replaced php to python in many tools at my company in the last weeks. > > Because of our boss decision now I have to learn java. I can tell java [snip] maybe you

Re: Art of Unit Testing

2005-08-03 Thread Peter Hansen
phil hunt wrote: > I think we might be talking at cross purposes here. To me > "acceptance test suite" means a test suite that has to be passed > each time before a new version of the software is released to the > users. I don't see that 10 minutes is a sensible limit here, unless > you are rel

Re: Windows command line problem

2005-08-03 Thread [EMAIL PROTECTED]
considering that all the command lines are in sys.argv, it's very simple. -- http://mail.python.org/mailman/listinfo/python-list

Re: Art of Unit Testing

2005-08-03 Thread Peter Hansen
Christoph Zwerschke wrote: >>> - unittest is for *unit* testing (only) ;-) >> >> Why would you say that? We've used it extensively for a wide ranging... > > That was actually only a quote from this thread that summarizes some of > the answers I got: unittest has no support for "global" fixtures,

Re: using httplib for authentication

2005-08-03 Thread James Stroud
Thank you Fuzzy, I will look into these things. Maybe the site is setting a cookie, as you have suggested. I have never delved into the ways of http except to configure apache and write some very bare-bones web pages, so I have to say that some very obvious things do not occur to me. James On

Re: time.clock() or time.time()

2005-08-03 Thread Nelson Minar
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I'm trying to benchmark some function calls for Zope project Other folks have explained time() vs. clock(), so I'll leave that. But rather than roll your own timer functions, consider using timeit. -- http://mail.python.org/mailman/listinfo/pyth

Re: Printing Docstrings Without Importing

2005-08-03 Thread Jaime Wyant
On 1 Aug 2005 06:50:23 -0700, Fuzzyman <[EMAIL PROTECTED]> wrote: > This seems to scratch several people's itches. Has anyone tried this doxygen filter: http://i31www.ira.uka.de/~baas/pydoxy/ I really like doxygen but am not sure if this is worth the trouble. jw -- http://mail.python.org/mailm

Re: Dabo in 30 seconds?

2005-08-03 Thread Fernando Perez
Paul McNett wrote: > I've done things like this in the past, in my own Visual Foxpro > framework. In that situation, I had enough control over the deployment > to also ship a small smtp client, and automatically email the error > without requiring any interaction at all. Clients were impressed whe

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread c d saunter
Forgot to say - under OS' derived from Windows NT (i.e. NT 3.5, NT4, 2K, XP and future) it is not possible to directly access the parallel port, this has to be done by a kernel driver, hence the need to install something like DLPortIO, which parly exists in the kernel to access the hardware, an

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread c d saunter
Novice Experl ([EMAIL PROTECTED]) wrote: : I'd like to write a simple application that interfaces with the parallel port, and changes the data on it according to keyboard input. I hope I can get it to run under windows xp and / or windows 2000. : How can I do this? What do I need to know? It doe

Re: Art of Unit Testing

2005-08-03 Thread Michael Hoffman
Benjamin Niemann wrote: > Christoph Zwerschke wrote: > > >>Benjamin Niemann wrote: >> >>>Some (many?) people don't like the unittest module, because it is not >>>very pythonic - nothing to wonder as it has its root in the Java world. >>>That's probably one of the reasons why there are other (more

Re: pain

2005-08-03 Thread Michael Hoffman
Mage wrote: > Look at this tutorial from java.com: > > public class BasicsDemo { >public static void main(String[] args) { >int sum = 0; >for (int current = 1; current <= 10; current++) { >sum += current; >} >System.out.println("Sum = " + sum); >

Re: In-place decorate-sort-undecorate - best implementation?

2005-08-03 Thread Benji York
Tom Anderson wrote: > I don't have python 2.4; anyone care to check how they compare there? I > used the following timer function: I think on 2.4 the new "key" option to list.sort would be the fastest way to accomplish what you want. -- Benji York -- http://mail.python.org/mailman/listinfo/py

Secure email

2005-08-03 Thread whisper
I need to write a .cgi that will take the content of an https GET or POST and send it securely as email to an Outlook client. I think that OpenSSL is somewhere in this, but I'm not even sure how to create the right certificate, how to use it to encrypt mail and how to install a certificate in O

In-place decorate-sort-undecorate - best implementation?

2005-08-03 Thread Tom Anderson
Subtitle: the war on temporary objects continues! The page on python performance tips on the python.org wiki () suggests the following code for sorting a list using decorate-sort-undecorate, but doing it in-place: def sortby_inplace(some

Re: finding sublist

2005-08-03 Thread Johan Lindberg
> thanks everyone. only a question. there is a way to advantage of binary > sequences? I doubt you'll find any way to optimize the code that somehow only applies to binary sequences. You still have to find each possible subsequence of minimum length within the sequence and compare it to all other

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
I've reordered the q's slightly to avoid repetition... Also by answering this question first, it may put the rest of the answer into context better. phil hunt wrote: > At what stage of completion is it? This is something we deliberately try to reflect in the version number. Yes, you can build n

Re: trying to parse non valid html documents with HTMLParser

2005-08-03 Thread Steve M
>You were right, the HTMLParser of htmllib is more permissive. He just ignores the bad tags ! The HTMLParser on my distribution is a she. But then again, I am using ActivePython on Windows... -- http://mail.python.org/mailman/listinfo/python-list

Re: HTML/text formatting question

2005-08-03 Thread Steven Bethard
Dr. Who wrote: > I have a tool that outputs data in either html or text output. > > Currently I'm writing chucnks like: > > if html: > print '' > print '' > print '' > print 'Differences %s: %s' % (htypestr, lbl1) > if html: > ... I'd create two Formatter classes, one for HTML

Re: Art of Unit Testing

2005-08-03 Thread Christoph Zwerschke
>> - unittest is for *unit* testing (only) ;-) > Why would you say that? We've used it extensively for a wide ranging... That was actually only a quote from this thread that summarizes some of the answers I got: unittest has no support for "global" fixtures, because it is intended for unit test

Re: time.clock() or time.time()

2005-08-03 Thread Shane Hathaway
Magnus Lycka wrote: > Shane Hathaway wrote: > >>time.time() measures real time, while time.clock() measures the time the >>CPU dedicates to your program. > > > I suppose that varies with the platform... "help(time.clock)" says: > > Help on built-in function clock: > > clock(...) > clock

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread phil hunt
On 03 Aug 2005 17:30:31 +0400, Sergei Organov <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (phil hunt) writes: >[...] >> Unix pipelines act on ascii files; > >No, they don't. Nitpicker. I would have thought it was perfectly obvious, in context, what I meant. -- Email: zen19725 at zen dot co d

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Wed, 03 Aug 2005 09:51:49 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: >phil hunt wrote: >> On Tue, 02 Aug 2005 21:26:28 +0200, Christoph Zwerschke <[EMAIL PROTECTED]> >> wrote: >>>According to the "extreme programming" paradigm, testing should be done >>>several times a day. So a requiremen

Re: Dabo in 30 seconds?

2005-08-03 Thread Adriano Varoli Piazza
Tom Anderson ha scritto: > On Mon, 1 Aug 2005, Benji York wrote: > >> Cliff Wells wrote: >> >>> As I mentioned earlier, programming is half brains and half >>> tenacity. >> >> >> +1 QOTY (quote of the year) > > > Personally, i'd say it was 50% brains, 40% tenacity and 20% basic > arithmetic. >

Re: Dabo in 30 seconds?

2005-08-03 Thread Tom Anderson
On Mon, 1 Aug 2005, Benji York wrote: > Cliff Wells wrote: > >> As I mentioned earlier, programming is half brains and half >> tenacity. > > +1 QOTY (quote of the year) Personally, i'd say it was 50% brains, 40% tenacity and 20% basic arithmetic. 8) tom -- non, scarecrow, forensics, rituals,

Re: trying to parse non valid html documents with HTMLParser

2005-08-03 Thread florent
> Are you saying that Beautiful Soup can't parse the HTML? If so, I'm > sure the author would like an example so he can "fix" it. I finally use the htmllib module wich is more permissive than the HTMLParser module when parsing bad html documents. Anyway, where can I find the author's contact in

socket and os.system

2005-08-03 Thread mfaujour
I HAVE THIS PYTHON PROGRAMM: [test]$ cat socpb.py import BaseHTTPServer, SocketServer, os, socket, threading

Re: trying to parse non valid html documents with HTMLParser

2005-08-03 Thread florent
> AFAIK not with HTMLParser or htmllib. You might try (if you haven't done > yet) htmllib and see, which parser is more forgiving. You were right, the HTMLParser of htmllib is more permissive. He just ignores the bad tags ! -- http://mail.python.org/mailman/listinfo/python-list

Re: using httplib for authentication

2005-08-03 Thread Fuzzyman
James Stroud wrote: > Hello All, > > I want to use python to download files from sites where authentication is > required. The page appears to send a form with the login and pass by post. I > would like to log in and keep this session open within python and > download a number of files automatical

Re: Py: a very dangerous language

2005-08-03 Thread Tom Anderson
On Mon, 1 Aug 2005, Peter Otten wrote: > Harald Massa wrote: > >> Always go to bed exactly when you want to write the first lambda. > > Eureka. The Twentieth Pythonic Thesis has finally surfaced. So what does it mean that i do much of my programming in bed? tom -- non, scarecrow, forensics, ri

pain

2005-08-03 Thread Mage
Hello, I started to learn python some months ago. Mostly for fun, but I replaced php to python in many tools at my company in the last weeks. Because of our boss decision now I have to learn java. I can tell java is one of the worst things including WW2. Even after seeing the light I

Re: cut & paste text between tkinter widgets

2005-08-03 Thread Christopher Subich
William Gill wrote: > Is there a simple way to cut and paste from a tkinter text widget to an > entry widget? I know I could create a mouse button event that triggers > a popup (message widget) prompting for cut/paste in each of the widgets > using a temp variable to hold the text, but I don't

Re: MySQL help

2005-08-03 Thread [EMAIL PROTECTED]
Hey Dennis thanks for the tips I haven't had a chance to take another stab at that code yet but I think I may try some of your suggestions. The SQL statements are valid but something doesn't appear to work right I may try and switch them to what you're suggesting and see if that helps with my probl

HTML/text formatting question

2005-08-03 Thread Dr. Who
I have a tool that outputs data in either html or text output. Currently I'm writing chucnks like: if html: print '' print '' print '' print 'Differences %s: %s' % (htypestr, lbl1) if html: ... This seems clunky and my next step was going to be to define generic functions whi

Re: HELP:sorting list of outline numbers

2005-08-03 Thread Christopher Subich
Felix Collins wrote: > Using Decorate, Sort , Undecorate... > > works like a charm. As a one-liner, you can also deconstruct and rebuild the outline numbers: new_outline = ['.'.join(v) for v in (sorted([k.split('.') for k in old_outline]))] -- http://mail.python.org/mailman/listinfo/python-list

Re: 2-player game, client and server at localhost

2005-08-03 Thread Christopher Subich
Michael Rybak wrote: > As stated above, that's how I'm trying it right now. Still, if doing > it turn-base, I would have to create a new thread every time. >I have some other questions though - please see below. No, you should never need to create a new thread upon receiving input. What you

cut & paste text between tkinter widgets

2005-08-03 Thread William Gill
Is there a simple way to cut and paste from a tkinter text widget to an entry widget? I know I could create a mouse button event that triggers a popup (message widget) prompting for cut/paste in each of the widgets using a temp variable to hold the text, but I don't wnat to reinvent the wheel

Re: pygettext ?

2005-08-03 Thread cantabile
Jon Hewer a écrit : > Hi > > I'm pretty new to Python, and recently been working my way through > Dive Into Python, and I'm currently writing a really simple rss reader > purely to get familiarised with the language. I want to move onto > something a little more challenging, but I'm stuck for ide

Re: pygettext ?

2005-08-03 Thread cantabile
Reinout van Schouwen a écrit : > Hi, > > On Wed, 3 Aug 2005, cantabile wrote: > >> Hi, I'm trying to write an internationalized app. I'm learning python >> and read that pygettext would help me, but I found elsewhere it was >> obsolete (??) >> So, what's the correct and up to date tool to i18n

Re: HELP:sorting list of outline numbers

2005-08-03 Thread Scott David Daniels
Delaney, Timothy (Tim) wrote: > Scott David Daniels wrote: >>For 2.3: (using DSU -- Decorate, Sort, Undecorate) ... >> lst = ['1', '1.2', '1.12', '1.1', '3.1'] >> decorated = [(numparts(txt), txt) for txt in lst] >> decorated.sort() >> lst[:] = [txt for code, txt in decorate

Re: Art of Unit Testing (Acceptance Tests)

2005-08-03 Thread John Roth
"Christoph Zwerschke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Peter Hansen wrote: >> What's wrong with using Python's existing "global" support, and just >> having your test case setUp() call a global setup routine which checks >> whether that global setup work has already

COM makepy problem

2005-08-03 Thread Alexander Eisenhuth
Hello together, My system: ActivePython 2.4.1 Windows XP I write a COM Server in VC++ 6.0 using ATL. So far so good. While I develop I got sometimes strange behaviour with makepy utility. Today again. :-( What I do on the python (COM client) side. 1) Register COM server 2) Use COM makepy utili

Re: Art of Unit Testing

2005-08-03 Thread Peter Hansen
phil hunt wrote: > On Tue, 02 Aug 2005 21:26:28 +0200, Christoph Zwerschke <[EMAIL PROTECTED]> > wrote: >>According to the "extreme programming" paradigm, testing should be done >>several times a day. So a requirement for extreme programm is that tests >>are fast enough. If the testing needs too

Re: Art of Unit Testing

2005-08-03 Thread Peter Hansen
Christoph Zwerschke wrote: > I think wanting to have a more global initialization > indicates that you are acutally not wanting to do a "unit" test, but a > more global test of the overall system, something like an acceptance or > integration test, i.e. you are trying to abuse unittest for somet

  1   2   >