Re: ANN: pry unit testing framework

2008-04-06 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Aldo Cortesi <[EMAIL PROTECTED]> wrote: > I should also note that converting from unittest to Pry is quite simple > - Pry's test structure is a superset of unittest's, and AutoTree was > explicitly written to make "unittest-style" testing possible, meaning > that n

Re: When does a binary extension gets the file extension '.pyd' and when is it '.so'

2008-04-06 Thread Steve Holden
Fredrik Lundh wrote: > Steve Holden wrote: > >>> for reference, here's what I get on Ubuntu 7.10, with the standard >>> Python interpreter (2.5.1): >>> >>> $ python -c "import imp; print imp.get_suffixes()" >>> [('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1), >>> ('.pyc', 'rb', 2)] >>>

Re: Tkinter, a lot of buttons, make prog shorter?

2008-04-06 Thread skanemupp
should i not use self. in Clean() and Calculate() either? anyway i had changed it before. must have copied the wrong program. #! /usr/bin/env python from Tkinter import * import tkMessageBox class GUIFramework(Frame): """This is the GUI""" def __init__(self, master=None): """I

Re: Tkinter, a lot of buttons, make prog shorter?

2008-04-06 Thread 7stud
On Apr 6, 8:50 pm, [EMAIL PROTECTED] wrote: > should i not use self. in Clean() and Calculate() either? > You probably shouldn't be using classes at all. When you are trying to learn the basics of a language, you don't want to complicate things further with classes. Copying a program off the int

Re: ANN: pry unit testing framework

2008-04-06 Thread Aldo Cortesi
Thus spake Roy Smith ([EMAIL PROTECTED]): > I've been following this thread for a while with a mix of amusement and > alarm. Contributing code to the community is a good thing, and should be > celebrated. If people like it, they will use it. If they don't, it will > be ignored. None of whic

Re: ANN: pry unit testing framework

2008-04-06 Thread Aldo Cortesi
Thus spake Steve Holden ([EMAIL PROTECTED]): > It probably reflects personal preference, but it's a preference that > many people will maintain. I understand that PEP 008 was largely > directed at standard library authors and maintainers, but anything > that claims wide utility should have ambiti

Re: Learning curve for new database program with Python?

2008-04-06 Thread CM
On Apr 5, 11:50 am, Jetus <[EMAIL PROTECTED]> wrote: > I have a need for a database program. I downloaded the db2 from ibm, > and reviewed some of the documentation. > > My question is, what is the easiest program for me to try to learn. I > will be creating a database of about 25,000 records, it w

Help replacing os.system call with subprocess call

2008-04-06 Thread David Pratt
Hi. I am trying to replace a system call with a subprocess call. I have tried subprocess.Popen and subprocess.call with but have not been successful. The command line would be: svnadmin dump /my/repository > svndump.db This is what I am using currently: os.system('svnadmin dump %s > %s' % (svn

Re: Help replacing os.system call with subprocess call

2008-04-06 Thread David Harrison
On 07/04/2008, David Pratt <[EMAIL PROTECTED]> wrote: > Hi. I am trying to replace a system call with a subprocess call. I have > tried subprocess.Popen and subprocess.call with but have not been > successful. The command line would be: > > svnadmin dump /my/repository > svndump.db > > This is

Re: Help replacing os.system call with subprocess call

2008-04-06 Thread David Harrison
On 07/04/2008, David Harrison <[EMAIL PROTECTED]> wrote: > On 07/04/2008, David Pratt <[EMAIL PROTECTED]> wrote: > > Hi. I am trying to replace a system call with a subprocess call. I have > > tried subprocess.Popen and subprocess.call with but have not been > > successful. The command line wo

Adherence to PEP 8 for published code (was: ANN: pry unit testing framework)

2008-04-06 Thread Ben Finney
Aldo Cortesi <[EMAIL PROTECTED]> writes: > Thus spake Ben Finney ([EMAIL PROTECTED]): > > > > I'm afraid that Pry is unashamedly incompatible with any other unit > > > testing method in existence, including but not limited to doctest, > > > unittest, nose and py.test. ;) I didn't write this. Ple

Re: Learning curve for new database program with Python?

2008-04-06 Thread CM
On Apr 5, 11:50 am, Jetus <[EMAIL PROTECTED]> wrote: > I have a need for a database program. I downloaded the db2 from ibm, > and reviewed some of the documentation. > > My question is, what is the easiest program for me to try to learn. I > will be creating a database of about 25,000 records, it w

Re: how to do "load script; run script" in a loop in embedded python?

2008-04-06 Thread Gabriel Genellina
En Thu, 03 Apr 2008 20:52:31 -0300, <[EMAIL PROTECTED]> escribió: > Hi, all, > > I am currently involved in a project that needs to load/run a python > script dynamically in a C application. The sample code is as > following: > > PyObject *LoadScript(char *file, char *func) > { > PyObject *pNa

Re: splitting an XML file on the basis on basis of XML tags

2008-04-06 Thread Stefan Behnel
[EMAIL PROTECTED] schrieb: > Hi all, > > i have an XML file with the following structure:: > > > -| > | > | > . | > . | > constitutes one record. > . | > . | > . | > | > | > | > > .

Re: Parsing HTML?

2008-04-06 Thread Stefan Behnel
Benjamin wrote: > I'm trying to parse an HTML file. I want to retrieve all of the text > inside a certain tag that I find with XPath. The DOM seems to make > this available with the innerHTML element, but I haven't found a way > to do it in Python. import lxml.html as h tree = h.parse("s

Re: html DOM

2008-04-06 Thread Stefan Behnel
Sam the Cat wrote: > Is there a package that would allow me the same or similar functionality > for modifying html code via the DOM model as I have in JavaScript ? I'd > like to parse an html file, then modify it and save the result. I am > not trying to do this online, rather I would like to do

Re: How to get an XML DOM while offline?

2008-04-06 Thread Stefan Behnel
william tanksley wrote: > I want to parse my iTunes Library xml. All was well, until I unplugged > and left for the train (where I get most of my personal projects > done). All of a sudden, I discovered that apparently the presence of a > DOCTYPE in the iTunes XML makes xml.dom.minidom insist on ac

Re: Python Data Utils

2008-04-06 Thread Jesse Aldridge
> Docstrings go *after* the def statement. Fixed. > changing "( " to "(" and " )" to ")". Changed. I attempted to take out everything that could be trivially implemented with the standard library. This has left me with... 4 functions in S.py. 1 one of them is used internally, and the others a

Getting jabber:iq:last with xmpppy

2008-04-06 Thread georgeencina
Hi, I'm trying to do the following with the xmpppy library: - log on to the google jabber server - get idle time of one specific person on my roster. Idle time means the values of jabber:iq:last. When I do this in pidgin with the xmpp console open, I get the following conversation: (me)

Re: How to get an XML DOM while offline?

2008-04-06 Thread Fredrik Lundh
Stefan Behnel wrote: >> Is there a simpler way to read the iTunes XML? (It's merely a plist, >> so the format is much simpler than general XML.) > > Try lxml. Since version 2.0, its parsers will not access the network unless > you tell it to do so. > > http://codespeak.net/lxml which makes it t

Re: while-loops enter the last time after condition is filled?

2008-04-06 Thread Sumit
On Apr 6, 4:53 am, [EMAIL PROTECTED] wrote: > it seems to me from my results that when i use a while-loop it will > execute once after the condition is met. Perhaps your condition is wrong. Please provide the code where this occured. -- http://mail.python.org/mailman/listinfo/python-list

<    1   2