Zope 3.1.0c1 released!

2005-08-03 Thread Stephan Richter
The Zope 3 development team is proud to announce Zope 3.1.0 candidate 1. Zope 3 is the next major Zope release and has been written from scratch based on the latest software design patterns and the experiences of Zope 2. It is in our opinion that Zope 3.1 is more than ready for production use,

dnspython 1.3.4

2005-08-03 Thread Bob Halley
dnspython 1.3.4 has been released. New since 1.3.3: The source address and port may now be specified when calling dns.query.{udp,tcp,xfr}. The resolver now does exponential backoff each time it runs through all of the nameservers. Rcodes which

Fredericksburg, VA ZPUG August 10: .Net, functional testing

2005-08-03 Thread Gary Poster
Please join us August 10, 7:30-9:00 PM, for the third meeting of the Fredericksburg, VA Zope and Python User Group (ZPUG). This meeting has four features of note. - Brian Lloyd, the author of Python for .Net (http://www.zope.org/ Members/Brian/PythonNet/) and the Zope Corporation VP of

Parallel port programming on windows XP/2000?

2005-08-03 Thread Novice Experl
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 doesn't look like the standard library (the

Python 2.3.3 Exceptions

2005-08-03 Thread Saravanan
Hello, Im using Python 2.3.3 along with Win32all (163). Currently my python application runs as Windows Service. Im using Win32all Service Framework to run the Python Code as a Windows Service. The following error has been reported to event viewer sparadically. Reporting queued error: faulting

Re: Printing Docstrings Without Importing

2005-08-03 Thread Fuzzyman
Bengt Richter wrote: On 1 Aug 2005 06:50:23 -0700, Fuzzyman [EMAIL PROTECTED] wrote: This seems to scratch several people's itches. Care to develop/maintain it ? Are you talking to me? ;-) (My news server is having some problem. I saw my post on google groups but my normal news client

Re: Art of Unit Testing

2005-08-03 Thread Christoph Zwerschke
Benjamin Niemann wrote: The unittest module is a 'port' of the JUnit framework for Java which has a certain wellknown API and semantics. The same API is available for many other languages, so it is probably a good idea to stick with it in order to make people coming from other language feel

Re: Setting a drive's volume label

2005-08-03 Thread Reinhold Birkenfeld
Bob Greschke wrote: Looks like the label system command will do it in Windows. That's good enough for this exercise. So, in Linux...??? mlabel in the mtools package will do what you need. mkfs.vfat can also be given a volume label, but it will not allow you to set the label without creating

Re: Art of Unit Testing

2005-08-03 Thread Christoph Zwerschke
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 been done and, if not, does it once and sets a flag to say that it has now been done?

Re: pygettext ?

2005-08-03 Thread Jon Hewer
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 on what to do. I'm after a

Re: pygettext ?

2005-08-03 Thread Jon Hewer
That was sent with the wrong title, doh! On 8/3/05, Jon Hewer [EMAIL PROTECTED] 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

Ideas for Python project?

2005-08-03 Thread Jon Hewer
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 on what to do. I'm after a

Administrative prohibition error when sending email

2005-08-03 Thread Lad
I use a new webhosting provider and I can not send an email from my script. This is the script that I use to test the connection ### import smtplib,poplib, #I first login to my POP3 account M=poplib.POP3('www.mywebh.com') M.user('MYWeb) M.pass_('12345') print M.pass_ #check

distutils package_dir newbie

2005-08-03 Thread peter
Hello all, I've have following problem the layout of my program is the following: setup.py project_dev/__init__.py project_dev/someModule.py now I want to make a source-installer so python setup.py install will give the following directory stucture: site-packages/project_user/__init__.py

Re: Art of Unit Testing

2005-08-03 Thread Benjamin Niemann
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 pythonic) unittesting frameworks for

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread jkn
Novice Experl 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 doesn't look like the

Re: distutils package_dir newbie

2005-08-03 Thread Robert Kern
peter wrote: Hello all, I've have following problem the layout of my program is the following: setup.py project_dev/__init__.py project_dev/someModule.py now I want to make a source-installer so python setup.py install will give the following directory stucture:

Re: Art of Unit Testing

2005-08-03 Thread Christoph Zwerschke
rafi wrote: 'should' may be too strong, 'may' may be better. In the meantime I found: http://python-mock.sourceforge.net/ Thanks for the link. Björn also pointed to http://pmock.sourceforge.net Using mock objects sounds like a good idea. A problem with mock objects may be that they make

Re: distutils package_dir newbie

2005-08-03 Thread peter
thx for answering is such short notice. I recieve the following error when I use your setup: error: package directory 'project_user' does not exist (the complete error is added at the end of this document) I'm using python 2.3.5 (build by activeState) based on python 2.3.5 Do you have an idea

Re: distutils package_dir newbie

2005-08-03 Thread Robert Kern
peter wrote: thx for answering is such short notice. I recieve the following error when I use your setup: error: package directory 'project_user' does not exist (the complete error is added at the end of this document) I'm using python 2.3.5 (build by activeState) based on python 2.3.5

Re: pygettext ?

2005-08-03 Thread Jarek Zgoda
cantabile napisał(a): 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 python ? Is there a tutorial somewhere (python docs has nothing

Re: Python Programming Contest: First results

2005-08-03 Thread Brian Quinlan
Brian Quinlan wrote: Tomi Kyöstilä wrote: Why don't I see my solution (__author__ = dOb) in the results? I'm sure that you got it as you replied to my mail. Your solution is now included. See: http://www.sweetapp.com/pycontest/contest1/results.html Good job! Cheers, Brian --

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

2005-08-03 Thread Michael Rybak
I was a bit unhappy to read this, because what you describe here is just what I've tried yesterday in my test-game with 2 balls, so if I've pointed that out, you wouldn't have to say I DLB don't understand threading either, it appears. :'( Thank you very much for putting so much effort in making

Re: pygettext ?

2005-08-03 Thread Reinout van Schouwen
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 python ? Short answer: the functionality of

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. Thanks, I'll try htmllib. In other case, I found a solution. Feeding data to the HTMLParser by chunks extracted from the string using string.split(), will allow me to

Re: Python Programming Contest: First results

2005-08-03 Thread Tomi Kyöstilä
Brian Quinlan wrote: Brian Quinlan wrote: Tomi Kyöstilä wrote: Why don't I see my solution (__author__ = dOb) in the results? I'm sure that you got it as you replied to my mail. Your solution is now included. See: http://www.sweetapp.com/pycontest/contest1/results.html Good job!

Re: trying to parse non valid html documents with HTMLParser

2005-08-03 Thread florent
From http://www.crummy.com/software/BeautifulSoup/: You didn't write that awful page. You're just trying to get some data out of it. Right now, you don't really care what HTML is supposed to look like. Neither does this parser. True, I just want to extract some data from

Re: Python Programming Contest: First results

2005-08-03 Thread Brian Quinlan
Tomi Kyöstilä wrote: Any idea when the next competition is coming? (it hasn't been quite weekly as you hoped, eh? ;) Uh no. It turns out that I have less time than I thought, though a big chunk of it should be freed-up after this weekend. I do have an idea... :-) Cheers, Brian --

Re: JBUS and Python which way

2005-08-03 Thread Alan Kennedy
[mjekl] My aim is to have an idea of the alternatives technologies for accessing information produced by a machine with a JBUS interface (RS232) and how to access this information realtime in Python (connecting a PC locally via serial port). I'm aware of pyserial but I wonder if there

Re: Python IDE's

2005-08-03 Thread bruno modulix
Jon Hewer wrote: I do use Vim a lot. I am currently using it for some PHP development i'm doing. I'm been using it so much recently that i keep pressing ESC and typing vi commands out of vi. But, if i use Vi, then whenever i want to test some code i have to open up python, import the

Re: distutils package_dir newbie

2005-08-03 Thread peter
hello Robert I've tried your setup.py file and now it seems to work... I've made the following fault in the setup: I did use: setup(..., packages = ['project_dev'], ...) instead of the correct one: setup(..., packages = ['project_user'], ...) you have been a great help Peter --

wmi addprinterdriver for remote PC

2005-08-03 Thread future_retro
Hi all, cannot work this one out at all... import win32com.client WBEM = win32com.client.GetObject(rwinmgmts:{impersonationLevel=impersonate}!\\ + servername + r\root\cimv2) WBEM.Security_.Privileges.AddAsString(SeLoadDriverPrivilege) drv = WBEM.Get(Win32_PrinterDriver)

Re: wmi addprinterdriver for remote PC

2005-08-03 Thread future_retro
soz I missed the glaring error. The file paths need to be to a UNC location of have to exist on the remote PC. -- http://mail.python.org/mailman/listinfo/python-list

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread Neil Benn
Novice Experl 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 doesn't look like the

Re: trying to parse non valid html documents with HTMLParser

2005-08-03 Thread Benji York
florent wrote: True, I just want to extract some data from html documents. But the problem is the same. The parser looses the position he was in the string when he encounters a bad tag. Are you saying that Beautiful Soup can't parse the HTML? If so, I'm sure the author would like an

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread Benji York
Novice Experl wrote: I'd like to write a simple application that interfaces with the parallel port Use pyParallel. You don't have to worry about the Java stuff unless you're using Jython. Just follow the instructions on the page (download, unarchive, python setup.py install). After that you

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Tue, 02 Aug 2005 21:11:52 +0200, Christoph Zwerschke [EMAIL PROTECTED] wrote: Thanks for the link, Grig. 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

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Tue, 02 Aug 2005 19:02:09 +0200, Björn Lindström [EMAIL PROTECTED] wrote: Christoph Zwerschke [EMAIL PROTECTED] writes: Would it make sense to add globaleSetup and globalTearDown methods to the TestCase class? I think at least it would not harm anybody. Where should such proposals be

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Tue, 02 Aug 2005 21:26:28 +0200, Christoph Zwerschke [EMAIL PROTECTED] wrote: Björn Lindström wrote: Would it make sense to add globaleSetup and globalTearDown methods to the TestCase class? In general that's not such a good idea. I completely agree and I think it makes a lot of sense that

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Tue, 02 Aug 2005 23:13:08 +0200, rafi [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 much time, people are discouraged to

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread phil hunt
On Tue, 02 Aug 2005 11:05:16 +0100, Michael Sparks [EMAIL PROTECTED] wrote: Phil Hunt wrote: Kamaelia seems it might be an interesting project. However, I don't think the project is well served by this announcement -- which I find vague and hard to understand. Which is a shame, because it

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Wed, 03 Aug 2005 09:35:08 +0200, Christoph Zwerschke [EMAIL PROTECTED] 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 pythonic)

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread phil hunt
On Tue, 2 Aug 2005 12:53:29 +0100, Tim Golden [EMAIL PROTECTED] wrote: [Michael Sparks] | Phil Hunt wrote: | | Kamaelia seems it might be an interesting project. However, I don't | think the project is well served by this announcement -- which I | find vague and hard to understand. Which is a

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Tue, 02 Aug 2005 18:44:01 +0200, Christoph Zwerschke [EMAIL PROTECTED] wrote: In August 2001, there was a thread about the Art of Unit Testing: http://groups.google.com/group/comp.lang.python/browse_frm/thread/aa2bd17e7f995d05/71a29faf0a0485d5 Paul Moore asked the legitimate question why

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Sergei Organov
[EMAIL PROTECTED] (phil hunt) writes: [...] Unix pipelines act on ascii files; No, they don't. -- Sergei. -- http://mail.python.org/mailman/listinfo/python-list

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Wed, 03 Aug 2005 10:19:05 +0200, Christoph Zwerschke [EMAIL PROTECTED] wrote: rafi wrote: 'should' may be too strong, 'may' may be better. In the meantime I found: http://python-mock.sourceforge.net/ Thanks for the link. Björn also pointed to http://pmock.sourceforge.net Using mock

Re: Art of Unit Testing

2005-08-03 Thread phil hunt
On Tue, 02 Aug 2005 17:18:51 -0400, Peter Hansen [EMAIL PROTECTED] wrote: If you're going to quote XP rules of thumb, the tests should be independent and very fast, and if you have a setup code that is taking a long time, it's likely a code smell of some kind, and you should be fixing the

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 of testing, not limited to unit tests. - use mock objects to mimic the behaviour of external components like databases ...when doing unit testing.

Re: Wheel-reinvention with Python

2005-08-03 Thread Mike Meyer
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 whatever it is) for Windows? You're telling me how to install wxPython on

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 something

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 much time,

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

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 been done

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 decorated]

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 python ?

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 ideas on

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: 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

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

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 'htmlbody bgcolor=CC' print 'table border=1 bgcolor=FF width=800' print 'trtd colspan=2h2' print 'Differences %s: %s' % (htypestr, lbl1) if html: ...

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

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

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: 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,

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 automatically.

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

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
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

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: 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. 8) tom The

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 requirement for extreme

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 dot uk

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() - floating

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 testing,

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 'htmlbody bgcolor=CC' print 'table border=1 bgcolor=FF width=800' print 'trtd colspan=2h2' print 'Differences %s: %s' % (htypestr, lbl1)

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: 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

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

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 (http://wiki.python.org/moin/PythonSpeed/PerformanceTips) suggests the following code for sorting a list using decorate-sort-undecorate, but doing it in-place: def

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

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 --

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); } } And

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 pythonic)

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

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,

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 when

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 --

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. --

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: 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, because

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
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 releasing

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 can

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? --

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 reasons why there are

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: 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 programming

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 is

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 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 either

  1   2   >