Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Fredrik Lundh
Tim Peters wrote: > Equally true of #1, if you write doctest files separate from your > code. newer versions of doctest have more extensive support for this, but the old trick of using doctest to test your *test programs* work remarkably well. > In fact, it's standard practice there to write "tu

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Fredrik Lundh
Terry Hancock wrote: > Doctest is very easy to use, so it's easy to ensure that > tests get written. OTOH, they're only really good for stuff > that can be easily tested in the interpreter (e.g. that can > be easily verified from their text output). When you get > into stickier stuff like graphic

Re: From Python to c++

2006-03-21 Thread [EMAIL PROTECTED]
Marco Aschwanden wrote: > This is actually a c++ problem. Got no satisfying answer on comp.lang.c++. > Maybe you can help better because I know, there are many c++-converts ;). > > Suppose you've got the following list (first line has field names, second > line has types and any row after is data):

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Well, since this is a mailing list where this sort of thing is > discussed, and since I was was asking about which way > is preferred, could you tell us why you (presumably) think > doctest is vastly superior to unittest? doctest comes with extensive documentation, whic

Re: mydate.strftime('%x') and cgi script

2006-03-21 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Sibylle Koczian wrote: >>>I'm writing a cgi script which only needs to run in a small LAN. I tried >>>to show dates in a reasonable format by using >>> >> >> That's the web server's locale appropriate date representation then. >> > > The web server is on my machine - doe

Re: Spam avoidance

2006-03-21 Thread Neil Schemenauer
Tim Peters <[EMAIL PROTECTED]> wrote: > [Douglas Alan] >>> I've noticed that there is little to no spam in comp.lang.python >>> and am wondering how this is accomplished. > > [Skip Montanaro] >> Most mailing lists which originate on mail.python.org have SpamBayes >> filtering in front of them. > >

Re: Extending Methods Vs Delegates

2006-03-21 Thread Alex Martelli
vbgunz <[EMAIL PROTECTED]> wrote: ... > Python in a nutshell explains on page 80: Delegating to superclass > method (5.1.6.2 in the ebook) that the first example above (extending I'm not using "delegate" in any specialized technical sense, e.g. (picking from a google search on [define:delegate]

Re: New-style Python icons

2006-03-21 Thread Brian Beck
[EMAIL PROTECTED] wrote: > http://www.doxdesk.com/img/software/py/icons.png Great work! Add an icon for Python egg files and you've covered all the bases. -- Brian Beck Adventurer of the First Order -- http://mail.python.org/mailman/listinfo/python-list

Re: apache config file parser

2006-03-21 Thread ygao
Can ZConfig write apache conf file? -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple py script to calc folder sizes

2006-03-21 Thread John Zenger
Caleb Hattingh wrote: > Hi everyone > > [Short version: I put a some code below: what changes can make it run > faster?] On my slow notebook, your code takes about 1.5 seconds to do my C:\Python24 dir. With a few changes my code does it in about 1 second. Here is my code: import os, os.path,

Re: Handling yes/no questions from the User

2006-03-21 Thread Steve
You need easygui: http://www.ferg.org/easygui/index.html -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError coercing to Unicode with field read from XML file

2006-03-21 Thread Ben Cartwright
Randall Parker wrote: > My problem is that once I parse the file with minidom and a field from > it to another variable as shown with this line: > IPAddr = self.SocketSettingsObj.IPAddress > > I get this error: [...] > if TargetIPAddrList[0] <> "" and TargetIPPortList[0]

Re: Spam avoidance

2006-03-21 Thread Terry Reedy
"Douglas Alan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've noticed that there is little to no spam in comp.lang.python and > am wondering how this is accomplished. Is there a moderator who > actively cancels spam? For the newsgroup, as opposed to the maillist, there is no

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Irmen de Jong
Sion Arrowsmith wrote: > I've got an established client-server application here where there > is now a need to shovel huge amounts of data (structured as lists of > lists) between the two, and the performance bottleneck has become > the amount of time spent parsing XML Any chance of replacing the

TypeError coercing to Unicode with field read from XML file

2006-03-21 Thread Randall Parker
Running Python 2.4.2 on Windows in SPE. I have a very small XML file (see below) that is in UTF-8 and saved by Windows Notepad as such. I'm reading it with minidom. My problem is that once I parse the file with minidom and a field from it to another variable as shown with this line: IP

Re: Command line arguments question (Windows XP)

2006-03-21 Thread [EMAIL PROTECTED]
Ross Ridge wrote: > Tim Golden wrote: > > python.file="C:\Python24\python.exe" "%1" %* > > [EMAIL PROTECTED] wrote: > > So now I got to decide whether the file association should be > > set to "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9" and change the > > programs that count the arguments or set it to

Re: Using Dictionaries in Sets - dict objects are unhashable?

2006-03-21 Thread Ben Cartwright
Gregory Piñero wrote: > Hey guys, > > I don't understand why this isn't working for me. I'd like to be able > to do this. Is there another short alternative to get this > intersection? > > [Dbg]>>> set([{'a':1},{'b':2}]).intersection([{'a':1}]) > Traceback (most recent call last): > File "", li

Re: py web-app-frameworks without a rdbms...

2006-03-21 Thread CatDude
> If you don't want to use RDBMS, I think Karrigell is better. Many > features of Django and TurboGears relate to database. I've just begun looking at it, but I've also been impressed with Myghty. -- http://mail.python.org/mailman/listinfo/python-list

Re: py web-app-frameworks without a rdbms...

2006-03-21 Thread limodou
On 21 Mar 2006 17:06:12 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi folks, > > Of TurboGers & Django WAF candidates, which one would be easier to use > in an environment where the data/content doesn't come an RDBMS, but > from other server-side apps... If these are not good candidates,

py web-app-frameworks without a rdbms...

2006-03-21 Thread venkatbo
Hi folks, Of TurboGers & Django WAF candidates, which one would be easier to use in an environment where the data/content doesn't come an RDBMS, but from other server-side apps... If these are not good candidates, could you suggest appropriate ones... TIA, /venkat -- http://mail.python.org/mail

Re: Command line arguments question (Windows XP)

2006-03-21 Thread Ross Ridge
Tim Golden wrote: > python.file="C:\Python24\python.exe" "%1" %* [EMAIL PROTECTED] wrote: > So now I got to decide whether the file association should be > set to "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9" and change the > programs that count the arguments or set it to "%*" and change > the programs

Re: From Python to c++

2006-03-21 Thread Gonzalo Monzón
Hi Marco! Perhaps the simpler way could be to store them all in the map as string data, but of course, it depends on what you must do later with that data, so you can save the field types and convert from string when needed to use any value... if you do not need to process later that data at a

Re: TaskQueue

2006-03-21 Thread Rene Pijlman
Carl Banks: >Rene Pijlman: >> Ah yes, clever trick. But you'd have to worry about thread-safety of your >> subclass though. > >Queue worries about this for you. The Queue class only calls _get when >it has the queue's mutex, so you can assume thread safety when >subclassing it. Ah yes, I overlook

Re: NOT Python: Taxonomy list reference

2006-03-21 Thread Francois
This taxonomy is described in the Python Cookbook 2nd Ed,. Chapter 6, Introduction written by Alex Martelli, on page 234. The author explains that "multiple inheritance frees you from these contraints" - of fitting into a single taxonomy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Dictionaries in Sets - dict objects are unhashable?

2006-03-21 Thread Jonathan Gardner
Welcome to Python, where all types are either static (and thus hashable) or volatile (and thus not hashable.) The way hash tables work (which is what powers the set and dict types), you have to be able to get a number from an instance of the type, with the following conditions true: (1) Every equ

Using Dictionaries in Sets - dict objects are unhashable?

2006-03-21 Thread Gregory Piñero
Hey guys, I don't understand why this isn't working for me. I'd like to be able to do this. Is there another short alternative to get this intersection? [Dbg]>>> set([{'a':1},{'b':2}]).intersection([{'a':1}]) Traceback (most recent call last): File "", line 1, in ? TypeError: dict objects are

Re: TaskQueue

2006-03-21 Thread Carl Banks
Rene Pijlman wrote: > Carl Banks: > >Rene Pijlman: > >> for i in range(self.numberOfThreads): > >> self.workQueue.put(None) > > > >Or, you could just put one sentinel in the Queue, and subclass the > >Queue's _get method not to take the sentinel out. > > Ah yes, clever trick. Bu

Extending Methods Vs Delegates

2006-03-21 Thread vbgunz
Hello everyone. I own two books. Learning Python and Python in a nutshell. When cross referencing the two books to try and clarify the ideas behind extending methods and delegates, this is where confusion veered it's ugly head :( Learning Python explains on page 324: Class Interface Techniques (2

Re: Simple py script to calc folder sizes

2006-03-21 Thread Ben Cartwright
Caleb Hattingh wrote: > Unless you have a nice tool handy, calculating many folder sizes for > clearing disk space can be a click-fest nightmare. Looking around, I > found Baobab (gui tool); the "du" linux/unix command-line tool; the > extremely impressive tkdu: http://unpythonic.net/jeff/tkdu/ ;

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-21 Thread funkyj
Dinko Tenev wrote: > Doug Quale wrote: > Hmmm...storage is not an issue in the Prolog version. It generates a > candidate solution, then checks membership in the wildcard set, then > backtracks (backtracking is caused by "fail" in the test goal.) On > backtracking, it effectively "forgets" the l

Re: Python vs. Java gzip performance

2006-03-21 Thread Martin v. Löwis
Caleb Hattingh wrote: > What does ".readlines()" do differently that makes it so much slower > than ".read().splitlines(True)"? To me, the "one obvious way to do it" > is ".readlines()". readlines reads 100 bytes (at most) at a time. I'm not sure why it does that (probably in order to not read fu

Re: ** Operator

2006-03-21 Thread Georg Brandl
Terry Reedy wrote: >>> ... which was promptly rejected. >> >> ... but now it has been checked in by somebody else anyway. The Python >> gods sometimes move in mysterious ways ;-) > > The tracker item reviewers are people, including me, with different > knowledge, viewpoints and experiences, who s

Simple py script to calc folder sizes

2006-03-21 Thread Caleb Hattingh
Hi everyone [Short version: I put a some code below: what changes can make it run faster?] Unless you have a nice tool handy, calculating many folder sizes for clearing disk space can be a click-fest nightmare. Looking around, I found Baobab (gui tool); the "du" linux/unix command-line tool; th

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Terry Hancock
On Tue, 21 Mar 2006 22:26:57 +0100 Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > If unittest is the standard way to write test code, why > > do we still have doctest? (I notice there's no mention > > in PEP 3000 of deprecating the doctest module). > > Because both h

Re: Console UI library for Python

2006-03-21 Thread Christoph Zwerschke
Sean Hammond schrieb: > > Anyone know of a good library for building text-mode user-interfaces in > Python, like if I wanted to make an email program like Pine or Mutt? > > A quick Google reveals Urwid: > > http://excess.org/urwid/ > > which looks pretty good. Urwid is probably a more sophist

Re: Why "class exceptions" are not deprecated?

2006-03-21 Thread Terry Reedy
"Gregory Petrosyan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Are there any deprecation plans? In Python 3, many redundant options will likely be eliminated, including some for the raise statement. -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Christoph Zwerschke
[EMAIL PROTECTED] wrote: > By that, do you mean you can write your tests and your > docstrings in one shot with doctest? Right. The tests serve also as usage examples. -- http://mail.python.org/mailman/listinfo/python-list

Console UI library for Python

2006-03-21 Thread Sean Hammond
Anyone know of a good library for building text-mode user-interfaces in Python, like if I wanted to make an email program like Pine or Mutt? A quick Google reveals Urwid: http://excess.org/urwid/ which looks pretty good. -- -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Christoph Zwerschke
[EMAIL PROTECTED] schrieb: > Anyhow, I'm not attacking doctest, but rather, just trying > to understand why there seems to be two very similar ways > of testing your code built into the system (considering that > one motto around here is "There should be one -- and > preferably only one -- obvious

Re: Python 2.5 Schedule

2006-03-21 Thread Peter Hansen
Terry Reedy wrote: > "Ant" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Looks like some good new stuff coming along. Does anyone know what's >>happened to the path PEP (http://www.python.org/doc/peps/pep-0355/) - I >>thought I'd seen somewhere that that was originally planned

Re: NOT Python: Taxonomy list reference

2006-03-21 Thread Gerard Flanagan
ej wrote: > I hope you will forgive this being a bit off subject, but this is about > the smartest list of people I know. I came across a list in the past while > studying OO methdology stuff. The list was trying to make the point of the > problem classification systems often run into (i.e., ofte

[ANNOUNCE] Thirtieth release of PythonCAD now available

2006-03-21 Thread Art Haas
Hi. I'm pleased to announce the thirtieth development release of PythonCAD, a CAD package for open-source software users. As the name implies, PythonCAD is written entirely in Python. The goal of this project is to create a fully scriptable drafting program that will match and eventually exceed fe

Re: Command line arguments question (Windows XP)

2006-03-21 Thread [EMAIL PROTECTED]
Tim Golden wrote: > [ezd] > > | # u.py > | import sys > | print 'args',sys.argv > | > | in "Command Prompt" window, with 2 command lines on 2 PCs: > | > | # Case (1L): > | C:\tmp> u.py a b c > | args ['C:\\tmp\\u.py'] > | > | # Case (1D): > | C:\tmp> u.py a b c > | args ['C:\\tmp\\u.py', 'a', 'b',

Re: nested for loops

2006-03-21 Thread Peter Otten
John Salerno wrote: > Can someone tell me why 'n' in this example isn't 2? > > >>> for n in range(2, 10): > for x in range(2, n): > print 'x =', x, 'n =', n > > > x = 2 n = 3 Hint: >>> range(2, 2) [] Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing two module variables and having one clobber the other?

2006-03-21 Thread Joseph Turian
Fredrik Lundh wrote: > if you prefer to use a "parameters.value" syntax, you can wrap the resulting > dictionary in a class. That sounds good. How do I do that? > I assume "from" means "beneath" and "getcwd" means "walk" ? Actually: def superdirs(d): lst = [d] while d != os.environ["HOME"]

Re: nested for loops

2006-03-21 Thread Jesus Rivero - (Neurogeek)
It is, but range(2,2) doesn't do anything Jesus Rivero - Neurogeek John Salerno wrote: >Can someone tell me why 'n' in this example isn't 2? > > >>> for n in range(2, 10): > for x in range(2, n): > print 'x =', x, 'n =', n > > >x = 2 n = 3 > > -- http://ma

Re: nested for loops

2006-03-21 Thread Christoph Haas
On Tue, Mar 21, 2006 at 09:54:21PM +, John Salerno wrote: > Can someone tell me why 'n' in this example isn't 2? > > >>> for n in range(2, 10): > for x in range(2, n): > print 'x =', x, 'n =', n > > > x = 2 n = 3 Assume n=2. Then the first inner loop will

nested for loops

2006-03-21 Thread John Salerno
Can someone tell me why 'n' in this example isn't 2? >>> for n in range(2, 10): for x in range(2, n): print 'x =', x, 'n =', n x = 2 n = 3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Spam avoidance

2006-03-21 Thread Tim Peters
[Douglas Alan] >> I've noticed that there is little to no spam in comp.lang.python >> and am wondering how this is accomplished. [Skip Montanaro] > Most mailing lists which originate on mail.python.org have SpamBayes > filtering in front of them. Worth noting that the SpamBayes project started sp

Re: NOT Python: Taxonomy list reference

2006-03-21 Thread jay graves
ej wrote: > Any Pythonistas out there know the list I am referring to and could point me > to it? Thanks for your time! :) google for "Celestial Emporium of Benevolent Knowledge" I don't have my copy with me now but I think I might have seen it in "Code Complete 2" or maybe I'm just imagining th

Re: Python vs. Java gzip performance

2006-03-21 Thread Caleb Hattingh
Hi Peter Clearly I misunderstood what Martin was saying :)I was comparing operations on lines via the file generator against first loading the file's lines into memory, and then performing the concatenation. What does ".readlines()" do differently that makes it so much slower than ".read().sp

Re: Problems writing to file

2006-03-21 Thread Bernard Lebel
Hi Gary, That is actually what I do. Each time the program prints something to the file, it flushes the buffer. I also tried opening and closing the file, same result. I could indeed post the code. That is only a fraction of the program, as the log is managed through the Queue module: def __n

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Tim Peters
[EMAIL PROTECTED] <[EMAIL PROTECTED]>[ > For writing testcode, it looks like there's three ways that it's > typically done: > > (1). using the doctest module, > > (2). using the unittest module (i.e. "pyunit"), or else > > (3). just putting an "if __name__ = '__main__':" at the bottom of your > mod

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread john_sips_tea
> and you can kill two birds with one stone. By that, do you mean you can write your tests and your docstrings in one shot with doctest? > I would like to see yet another alternatise such as py.test > in the standard lib, Ah: http://codespeak.net/py/current/doc/home.html -- http://mail.python.

Re: Spam avoidance

2006-03-21 Thread skip
Doug> I've noticed that there is little to no spam in comp.lang.python Doug> and am wondering how this is accomplished. Most mailing lists which originate on mail.python.org have SpamBayes filtering in front of them. The one notable exception are the two SpamBayes-related mailing lists

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > For writing testcode, it looks like there's three ways that it's > typically done: Actually, there's at least one more > (1). using the doctest module, > > (2). using the unittest module (i.e. "pyunit"), or else > > (3). just putting an "if __name__ = '__main__':"

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Diez B. Roggisch
> Beware, CORBA marshaling/unmarshaling can be similarly deadly, especially if > you are passing Any's and have to marshal complex type codes. But if you > are just sending arrays of octets, or strings of chars, then CORBA > marshal/unmarshal will be quite fast. Sure, any is no good at all. But I

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread john_sips_tea
> because it's a vastly superior way to write tests ? Well, since this is a mailing list where this sort of thing is discussed, and since I was was asking about which way is preferred, could you tell us why you (presumably) think doctest is vastly superior to unittest? > why is it that comp.lang.

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Jay Parlar
On Mar 21, 2006, at 1:12 PM, Fredrik wrote: > >> (I notice there's no mention in PEP 3000 of deprecating >> the doctest module). > > why is it that comp.lang.python is suddenly full of folks who > want to deprecate anything they don't understand ? don't > you have better things to do with your t

Re: Importing two module variables and having one clobber the other?

2006-03-21 Thread Fredrik Lundh
Joseph Turian wrote > Here's the functionality I need: > > We allow the user to define parameter values, which are imported and > can be accessed directly as variables within Python. These are defined > in "parameters.py". > > More specifically, let's say the user creates "dir/parameters.py" and >

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Christoph Zwerschke
[EMAIL PROTECTED] wrote: > If unittest is the standard way to write test code, why do we still > have doctest? (I notice there's no mention in PEP 3000 of deprecating > the doctest module). Because both have their pros and cons and their right to exist. Doctest is really easy to use and you can k

Re: Why "class exceptions" are not deprecated?

2006-03-21 Thread Steven Bethard
Gregory Petrosyan wrote: > 1) From 2.4.2 documentation: > There are two new valid (semantic) forms for the raise statement: > raise Class, instance > raise instance Check `PEP 8`_ -- the latter form is preferred: """ When raising an exception, use "raise ValueError('message')" instead of the old

Re: Problems writing to file

2006-03-21 Thread Gary Herron
Bernard Lebel wrote: >Hello, > >I have this strange problem. I have written a program that writes a >log to a log file. > >To start the program (I'm on Linux Fedora Core 3), I used a service. >This service runs a bash file, wich in turn runs the Python top >program file. > >Sooner or later the pro

Spam avoidance

2006-03-21 Thread Douglas Alan
I've noticed that there is little to no spam in comp.lang.python and am wondering how this is accomplished. Is there a moderator who actively cancels spam? If so, that wouldn't seem to prevent spam from making it through to the mailing list version of the newsgroup. Is there an exceptionally goo

Re: TaskQueue

2006-03-21 Thread Ron Adam
Raymond Hettinger wrote: > I would like to get feedback on an idea I had for simplifying the use > of queues with daemon consumer threads > > Sometimes, I launch one or more consumer threads that wait for a task > to enter a queue and then work on the task. A recurring problem is that > I sometime

Re: Module import information

2006-03-21 Thread Eric White
I found a builtin function called "execfile" that seems to suite my needs quite well.  The import function is less applicable.  Thanks for your time.On 3/21/06, Steve Holden <[EMAIL PROTECTED]> wrote: Eric White wrote:> Peter:>> Thanks for the reply.  Consider the following situation:>> A set of va

NOT Python: Taxonomy list reference

2006-03-21 Thread ej
I hope you will forgive this being a bit off subject, but this is about the smartest list of people I know. I came across a list in the past while studying OO methdology stuff. The list was trying to make the point of the problem classification systems often run into (i.e., often things belong

Re: - Python Newcomer Starting with Coding

2006-03-21 Thread John Salerno
Chris Lasher wrote: > And there's always Mark Pilgrim's very good and very free "Dive Into > Python". > http://www.diveintopython.org/ > Reading that now...definitely not for a newbie. -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote > For writing testcode, it looks like there's three ways that it's > typically done: > > (1). using the doctest module, > > (2). using the unittest module (i.e. "pyunit"), or else > > (3). just putting an "if __name__ = '__main__':" at the bottom of your > module containing

Python on an old NEC MobilePro 780

2006-03-21 Thread gregarican
I have Python 2.3 with Tkinter working on a Dell Axim x50 (ARM Windows Mobile 5.0) and Python 2.3 with PyQt working on a Sharp Zaurus SL-5500 (ARM Linux Embedded). Now I purchased an NEC MobilePro 780 (MIPS Windows CE 2.11 Handheld PC 3.01). Any suggestions on the most recent Python and Tkinter imp

doctest, unittest, or if __name__='__main__'

2006-03-21 Thread john_sips_tea
For writing testcode, it looks like there's three ways that it's typically done: (1). using the doctest module, (2). using the unittest module (i.e. "pyunit"), or else (3). just putting an "if __name__ = '__main__':" at the bottom of your module containing code to manually run your class through

Problems writing to file

2006-03-21 Thread Bernard Lebel
Hello, I have this strange problem. I have written a program that writes a log to a log file. To start the program (I'm on Linux Fedora Core 3), I used a service. This service runs a bash file, wich in turn runs the Python top program file. Sooner or later the program stops writing to the log fi

Re: - Python Newcomer Starting with Coding

2006-03-21 Thread Michael Tobis
Are you sure this is what you want to do? It seems an odd objective for a preliminary effort. Forgive me if I am reading this wrong, but I am concerned that you think you need to do all this work to use the package. If so, you are asking the wrong questions. Please look into the PYTHONPATH environ

Re: New-style Python icons

2006-03-21 Thread and-google
Fredrik Lundh wrote: > could you perhaps add an SVG version ? Yes. I'll look at converting when I've used them a bit and am happy with them. I think some of the higher-level Xara effects may not convert easily to SVG but I'm sure there'll be workarounds of some sort. -- And Clover mailto:[EMAIL

Re: ANN: pywinauto 0.3.0 released - now localization proof

2006-03-21 Thread mark . m . mcmahon
Hi Bryan, On 3/21/06, Bryan <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > ANN: pywinauto 0.3.0 released - now localization proof > > i just tried the notepad demo and it's very nice. the only thing was in the > demo it shows one Click() method to close the notepadabout dialog. but fo

Re: ANN: pywinauto 0.3.0 released - now localization proof

2006-03-21 Thread mark . m . mcmahon
Hi Bryan, On 3/21/06, Bryan <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > ANN: pywinauto 0.3.0 released - now localization proof > > i just tried the notepad demo and it's very nice. the only thing was in the > demo it shows one Click() method to close the notepadabout dialog. but fo

Re: New-style Python icons

2006-03-21 Thread and-google
Luis M. González wrote: > This is strange... I've been trying to access this site since > yesterday, but I couldn't Might it be possible you have malware installed? Since I do a bunch of anti-spyware work, there are a few different bits of malware that try to block doxdesk.com, usually using a Ho

Why "class exceptions" are not deprecated?

2006-03-21 Thread Gregory Petrosyan
1) From 2.4.2 documentation: There are two new valid (semantic) forms for the raise statement: raise Class, instance raise instance 2) In python: >>> raise NameError Traceback (most recent call last): File "", line 1, in ? NameError >>> help(NameError) Help on class NameError in module exception

Importing two module variables and having one clobber the other?

2006-03-21 Thread Joseph Turian
Can I simulate the behavior of "from foo import *" using imp.load_module()? Here's the functionality I need: We allow the user to define parameter values, which are imported and can be accessed directly as variables within Python. These are defined in "parameters.py". More specifically, let's sa

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Steve Holden
gregarican wrote: > Skip wrote: > > >>I don't know about the OP, but in my case it was a drop-dead simple >>cross-language RPC protocol. > > > Exactly. RPC implementations. Typically these are a quick "do this with > this" sent from the client, with a brief "okay, I did that, here's the > resul

Re: Why "class exceptions" are not deprecated?

2006-03-21 Thread Fredrik Lundh
Gregory Petrosyan wrote: > Thanks for answer. But what about "Explicit is better than implicit"? "Practicality beats purity" Changing the language just because some random guy on a newsgroup read the tutorial backwards isn't really practical. -- http://mail.python.org/mailman/listinfo/pyth

Re: Why "class exceptions" are not deprecated?

2006-03-21 Thread Gregory Petrosyan
"The first argument to raise names the exception to be raised. The optional second argument specifies the exception's argument. Alternatively, the above could be written as raise NameError('HiThere'). Either form works fine, but there seems to be a growing stylistic preference for the latter." Are

Re: From Python to c++

2006-03-21 Thread Farshid Lashkari
> Any suggestions are very welcome! Are you allowed to use any boost libraries? If so then boost::any would probably help. The boost::any object can contain any object type. So you could have a single container that looked like the following: std::map< std::string, std::vector > result; Since

Re: Why "class exceptions" are not deprecated?

2006-03-21 Thread Gregory Petrosyan
Thanks for answer. But what about "Explicit is better than implicit"? -- http://mail.python.org/mailman/listinfo/python-list

Re: From Python to c++

2006-03-21 Thread Roman Yakovenko
On 3/21/06, Marco Aschwanden <[EMAIL PROTECTED]> wrote: > Any suggestions are very welcome! > > > Regards, > Marco (Forced to code in c++ again let me estimate the simplicity of > python) C++ is also simple, if you have right library to do the job: http://boost.org/doc/html/variant.html http://bo

Re: - Python Newcomer Starting with Coding

2006-03-21 Thread Chris Lasher
And there's always Mark Pilgrim's very good and very free "Dive Into Python". http://www.diveintopython.org/ -- http://mail.python.org/mailman/listinfo/python-list

From Python to c++

2006-03-21 Thread Marco Aschwanden
This is actually a c++ problem. Got no satisfying answer on comp.lang.c++. Maybe you can help better because I know, there are many c++-converts ;). Suppose you've got the following list (first line has field names, second line has types and any row after is data): csv = "name,age,place\nstri

Re: Why "class exceptions" are not deprecated?

2006-03-21 Thread Fredrik Lundh
Gregory Petrosyan wrote: > 1) From 2.4.2 documentation: > There are two new valid (semantic) forms for the raise statement: > raise Class, instance > raise instance > > 2) In python: > >>> raise NameError > Traceback (most recent call last): > File "", line 1, in ? > NameError > >>> help(NameErr

Why "class exceptions" are not deprecated?

2006-03-21 Thread Gregory Petrosyan
1) From 2.4.2 documentation: There are two new valid (semantic) forms for the raise statement: raise Class, instance raise instance 2) In python: >>> raise NameError Traceback (most recent call last): File "", line 1, in ? NameError >>> help(NameError) Help on class NameError in module exception

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-21 Thread Geoffrey Summerhayes
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > After the basic fact of generating the exclusion - a considerable > achievement - the program should be interactive. What if the target set > has thousands or millions of elements? There should be a loop-like way > ('do' in Haskell, f

Release: vizann-2.0 Tkinter Neural Net Demo Program

2006-03-21 Thread I. Myself
Release Name: vizann-2.0 This freeware program may be downloaded from http://sourceforge.net/projects/annevolve. *Notes:* This is a program to graphically demonstrate the operational details of two types of ANN (Artificial Neural Network) when used to implement the XOR function. The program is 1

Re: Handling yes/no questions from the User

2006-03-21 Thread dwelch
[EMAIL PROTECTED] wrote: > I'm writing a scipt that need to interact with the user. > Lets say I have the: > > "Do you want to continue [Y|n]" > > Where just pressing return means Yes (since its uppercase). > > Its easy to write a function for this, but perhaps something like this > already exis

Re: Installing PyExcelerator to write Excel files from Python

2006-03-21 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I downloaded PyExcelerator.zip as I need to write some data into Excel > files, and tried unsuccessfully to install it. I unzipped the files > into C:/Python24/Lib/site-packages/PyExcelerator You should unzip to somewhere else, the install step will put the correct file

Re: Can XML-RPC performance be improved?

2006-03-21 Thread gregarican
Skip wrote: > I don't know about the OP, but in my case it was a drop-dead simple > cross-language RPC protocol. Exactly. RPC implementations. Typically these are a quick "do this with this" sent from the client, with a brief "okay, I did that, here's the result" back from the server. Shovelling

Re: Installing PyExcelerator to write Excel files from Python

2006-03-21 Thread tkpmep
Thanks!!! I had a good laugh at myself after i got it working. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can XML-RPC performance be improved?

2006-03-21 Thread skip
Steve> I suppose there *was* a good reason for using XML-RPC in the Steve> first place? I don't know about the OP, but in my case it was a drop-dead simple cross-language RPC protocol. At one point Mojam's XML-RPC server talked to clients written in Python, Perl and Objective-C (via a Ja

Re: Design mini-lanugage for data input

2006-03-21 Thread aurora
P.S. Also it is a 'mini-language' because it is an ad-hoc design that is good enough and can be easily implemented for a given problem. This is oppose to a general purpose solution like XML that is one translation from the original data format and carries too much baggages. > Just consider y

Re: [CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread Dave Hansen
On Tue, 21 Mar 2006 20:05:48 +0200 in comp.lang.python, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: >bruno at modulix wrote: [...] >> Look for the Python cookbook (google is your friend). >... > >http://www.oreilly.com/catalog/pythoncook/ > >sorry, I've not clarified that I mean an free internet re

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Steve Holden
gregarican wrote: > Sion Arrowsmith wrote: > > >>shovel huge amounts of data > > > That right there basically takes XML-RPC off the table as a viable > solution. No matter how much fine tuning you try large amounts of data > don't bode well using XML-RPC. The other posted alternatives are > cer

Re: [CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread Ilias Lazaridis
Ed Singleton wrote: > On 21/03/06, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: >> Where can I find practical coding examples for real life coding problems? >> >> Something like a categorized solution guide? >> > > This sounds quite a lot like PLEAC. It certainly contains a lot that > you would fin

  1   2   >