Re: Calling a shared library using C types

2008-03-24 Thread Gabriel Genellina
En Mon, 24 Mar 2008 19:56:08 -0300, Nathan Harmston <[EMAIL PROTECTED]> escribió: > import ctypes > t = ctypes.CDLL('./Simulation.so') > this works fine, I have a simple function I ve put in for testing which > just > returns the integer 4. However when I try to access this function it > doe

RE: Breaking the barrier of a broken paradigm... part 1

2008-03-24 Thread Ryan Ginstrom
> On Behalf Of john s. > import os, sys, string, copy, getopt, linecache > from traceback import format_exception > > #The file we read in... > fileHandle = "/etc/passwd" > srcFile = open(fileHandle,'r') > srcList = srcFile.readlines() > > #yah, a for loop that "iterates" through the file of "lin

New Full Tkinter document editor widget -- suggestions, comments, etc.

2008-03-24 Thread Ron Provost
I've posted a demo (http://tkinter.unpy.net/wiki/StyledEditor). This demo creates a widget with full "styled editing" capabilities; sort of a mini-word processor. It runs "as is" on my WinXP machine with Python 2.5. The demo allows styling of any selected text via toolbars; just select the te

Re: Calling a shared library using C types

2008-03-24 Thread Nathan Harmston
On 25/03/2008, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Mon, 24 Mar 2008 19:56:08 -0300, Nathan Harmston > <[EMAIL PROTECTED]> escribió: > > > > import ctypes > > t = ctypes.CDLL('./Simulation.so') > > this works fine, I have a simple function I ve put in for testing which > > just > > r

Re: Python 2.2.1 and select()

2008-03-24 Thread Derek Martin
On Mon, Mar 24, 2008 at 05:52:54PM -0700, Noah wrote: > On Mar 24, 2:58 pm, Derek Martin <[EMAIL PROTECTED]> wrote: > > If and only if the total amount of output is greater than the > > specified buffer size, then reading on this file hangs indefinitely. > I think this is more of a limitation with

Python based server Uptime

2008-03-24 Thread Jaimy Azle
Hi, I'm just curious, if anyone ever implement python based application server just like CheryPy, Django, TinyERP, or something else, how many requests do they proceed and what is the longest runing server ever reached before downtime? Salam, -Jaimy. -- http://mail.python.org/mailman/list

Re: Is IronPython real Python?

2008-03-24 Thread Benjamin
On Mar 24, 12:00 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > I know that IronPython and CPython are different in that one does not > use the .net framework, but are they both really the same Python > language. From my basic understanding, it will depend on what the > programmer's goal is as to whic

Re: Beautiful Soup Looping Extraction Question

2008-03-24 Thread Paul McGuire
On Mar 24, 7:56 pm, Tess <[EMAIL PROTECTED]> wrote: > > Anyhow, a simple regex took care of the issue in BS: > > for i in soup.findAll(re.compile('^p|^div'),align=re.compile('^center| > ^left')): >     print i > But I thought you only wanted certain combinations: "My goal is to extract all elem

Re: Python 2.2.1 and select()

2008-03-24 Thread Gabriel Genellina
En Mon, 24 Mar 2008 23:03:56 -0300, Derek Martin <[EMAIL PROTECTED]> escribió: > On Mon, Mar 24, 2008 at 05:52:54PM -0700, Noah wrote: >> On Mar 24, 2:58 pm, Derek Martin <[EMAIL PROTECTED]> wrote: >> > If and only if the total amount of output is greater than the >> > specified buffer size, then

Re: "Soup Strainer" for ElementSoup?

2008-03-24 Thread John Nagle
erikcw wrote: > Hi all, > > I was reading in the Beautiful Soup documentation that you should use > a "Soup Strainer" object to keep memory usage down. > > Since I'm already using Element Tree elsewhere in the project, I > figured it would make sense to use ElementSoup to keep the api > consisten

Non-buffering stdout

2008-03-24 Thread Cecil Westerhof
With python -u script, you can make stdout unbuffered. Is there a way to do it in the script itself? I use just a script with a shebang (#!/usr/bin/env python) and then it is not possible to use -u. -- http://mail.python.org/mailman/listinfo/python-list

Re: Does python hate cathy?

2008-03-24 Thread Edward A. Falk
Interestingly, if you change swaroop = Person('Swaroop', 'M') swaroop.sayHi() swaroop.howMany() kalam = Person('Abdul Kalam', 'M') kalam.sayHi() kalam.howMany() cathy = Person('Catherine', 'F') cathy.sayHi() cathy.howMany() swaroop.sayHi() swaroop.howMany() to def main()

Re: Does python hate cathy?

2008-03-24 Thread Gabriel Genellina
En Tue, 25 Mar 2008 02:09:58 -0300, Edward A. Falk <[EMAIL PROTECTED]> escribió: > However, Adding > > self.myclass = Person > > to the __init__() method didn't stop the problem. I thought it might, > because > then each of the objects would have held a reference to Person. > Actuall

Re: Does python hate cathy?

2008-03-24 Thread Patrick Mullen
It seems like this is mostly a non-issue. The original code actually works correctly (of course the updated versions that solve the exception problem are probably better). The only thing that is going haywire is the interpreter shutdown process. I think it is going a bit overboard to "consider _

<    1   2