Re: Unicode error handler

2007-01-30 Thread Martin v. Löwis
Walter Dörwald schrieb: > You might try the following: > > # -*- coding: iso-8859-1 -*- > > import unicodedata, codecs > > def transliterate(exc): > if not isinstance(exc, UnicodeEncodeError): > raise TypeError("don'ty know how to handle %r" % r) > return (unicodedata.n

Re: Conditional expressions - PEP 308

2007-01-30 Thread Paddy
On Jan 30, 9:51 pm, "Colin J. Williams" <[EMAIL PROTECTED]> wrote: > It would be helpful if the rules of the game were spelled out more clearly. > > The conditional expression is defined as X if C else Y. > We don't know the precedence of the "if" operator. From the little test > below, it seem to

Re: how to "free" an object/var ?

2007-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2007 23:22:52 -0800, Paddy wrote: >> As far as I know there is no way to force the deletion of an object >> even if it is in use. This is a Good Thing. >> >> -- >> Steven D'Aprano > > The folowing will make the data available for garbage collection no > matter what references it: >

Re: PY Zip

2007-01-30 Thread risomt
On Jan 31, 12:18 am, "GISDude" <[EMAIL PROTECTED]> wrote: > Hi all. > > I am trying to find a module that has a Zip utility that I can use in > Python. I would like to be able to call the module and ZIP up a > directory. I thought there was such a module, but I have not been able > to find it. > >

Re: how to "free" an object/var ?

2007-01-30 Thread John Nagle
Steven D'Aprano wrote: > On Tue, 30 Jan 2007 15:48:37 -0800, James Stroud wrote: > > >>Stef Mientki wrote: >> >>>If I create a large array of data or class, >>>how do I destroy it (when not needed anymore) ? If your data structure has no backlinks, it will go away as soon as the last referen

Re: PY Zip

2007-01-30 Thread Zara
On 30 Jan 2007 21:18:52 -0800, "GISDude" <[EMAIL PROTECTED]> wrote: >Hi all. > >I am trying to find a module that has a Zip utility that I can use in >Python. I would like to be able to call the module and ZIP up a >directory. I thought there was such a module, but I have not been able >to find it

Re: PY Zip

2007-01-30 Thread Gary Herron
GISDude wrote: > Hi all. > > I am trying to find a module that has a Zip utility that I can use in > Python. I would like to be able to call the module and ZIP up a > directory. I thought there was such a module, but I have not been able > to find it. > > I need this to be able to be used in Python

Re: parent-child object design question

2007-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2007 21:15:53 -0800, manstey wrote: > Hi Ben, > > Could I also do something like the following? What does it mean to > store the parent class as a private variable in the child class? What it means is that references to "self.__data" (note the TWO leading underscores) in your code

Re: PY Zip

2007-01-30 Thread risomt
On Jan 31, 12:18 am, "GISDude" <[EMAIL PROTECTED]> wrote: > Hi all. > > I am trying to find a module that has a Zip utility that I can use in > Python. I would like to be able to call the module and ZIP up a > directory. I thought there was such a module, but I have not been able > to find it. > >

Re: how to "free" an object/var ?

2007-01-30 Thread Paddy
On Jan 31, 6:52 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 30 Jan 2007 15:48:37 -0800, James Stroud wrote: > > Stef Mientki wrote: > >> If I create a large array of data or class, > >> how do I destroy it (when not needed anymore) ? > > >> Assign it to an empty list ? > > >> thanks, >

Re: how to "free" an object/var ?

2007-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2007 15:48:37 -0800, James Stroud wrote: > Stef Mientki wrote: >> If I create a large array of data or class, >> how do I destroy it (when not needed anymore) ? >> >> Assign it to an empty list ? >> >> thanks, >> Stef Mientki > > It will be gc'd when you leave the scope or you ca

Re: error messages containing unicode

2007-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2007 04:34:24 -0800, Jim wrote: > Thank you for the reply. It happens that, as I understand it, none of > the options that you mentioned is a solution for my situation. > > On Jan 29, 9:48 pm, Steven D'Aprano <[EMAIL PROTECTED]> > wrote: >> The easiest ways to fix that are: >> >

Re: parent-child object design question

2007-01-30 Thread Ben Finney
"manstey" <[EMAIL PROTECTED]> writes: > Could I also do something like the following? I can't immediately see a problem with the code you posted. Does it do what you want it to do? > What does it mean to store the parent class as a private variable in > the child class? I don't understand this

Re: Executing Javascript, then reading value

2007-01-30 Thread Melih Onvural
In fact what you're describing is exactly what I needed. I ended up finding a way to execute the javascript using Rhino and then capturing the result. Not exactly what I wanted to do, but once I found it out, it works. Melih Onvural On Jan 30, 2:57 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Meli

Re: grp.struct_group bug ?

2007-01-30 Thread attn . steven . kuo
On Jan 30, 5:42 pm, spam <[EMAIL PROTECTED]> wrote: > Is this a bug ? > > Running the following script with Python 2.3.5: > > #!/usr/bin/python > > import grp > > # groups = grp.getgrall() > > agroup = grp.getgrnam('wheel') > print agroup > print type(agroup) > > print agroup.__con

Re: socket.inet_ntop, and pton question

2007-01-30 Thread Andrew
Hi I just thought I would mention that I found what I needed from dnspython if anyone ever needs ;) http://www.dnspython.org/ -- http://mail.python.org/mailman/listinfo/python-list

PY Zip

2007-01-30 Thread GISDude
Hi all. I am trying to find a module that has a Zip utility that I can use in Python. I would like to be able to call the module and ZIP up a directory. I thought there was such a module, but I have not been able to find it. I need this to be able to be used in Python Win. Is there a ZIP utilty a

Re: parent-child object design question

2007-01-30 Thread manstey
Hi Ben, Could I also do something like the following? What does it mean to store the parent class as a private variable in the child class? class CacheProperty(object): def __init__(self, obj, parent, properties=None): self.__data = obj self._parent = parent

Re: Bush, clean up your shit and farts before you leave - Hillary Clinton

2007-01-30 Thread Tommy
I' m not a Bush or Hillary fan, but this strikes me as pretty funny. Hillary: I'm not for any fixed date, as long as it's before the 2008 election. Dammit, George, I don't want Iraq to be a campaign issue! <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > But Bush was merely an ego f

Re: Unicode error handler

2007-01-30 Thread [EMAIL PROTECTED]
On Jan 30, 11:28 pm, Walter Dörwald <[EMAIL PROTECTED]> wrote: > > codecs.register_error("transliterate", transliterate) > >Walter Really, really slick solution. Though, why was it [:1], not [0]? ;-) And one more thing: > def transliterate(exc): > if not isinstance(exc, UnicodeEncode

Re: Random passwords generation (Python vs Perl) =)

2007-01-30 Thread [EMAIL PROTECTED]
On Jan 30, 5:07 am, "NoName" <[EMAIL PROTECTED]> wrote: > WOW! :shock: > > in this case: > > while 1:i=__import__;print > i('binascii').b2a_base64(i('os').urandom(6)),;raw_input() > > > :) raw_input can do the job of print while 1: raw_input(__import__('os').urandom(6).encode('base64')) And can a

Re: PythonCard

2007-01-30 Thread Tequila
On Jan 30, 6:26 pm, [EMAIL PROTECTED] wrote: > Tequila> I'm having some trouble starting PythonCard on my PC. I've > Tequila> downloaded and ran python-2.5.msi to install Python on my > Tequila> machine. And PythonCard-0.8.2.win32.exe to install PythonCard. > ... > Tequila>

Re: BYU Physics Prof Finds Thermate in WTC Physical Samples, Building Collapses an Inside Job

2007-01-30 Thread soutjhyDin
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://portland.indymedia.org/en/2006/06/341238.shtml > > BYU Physics Prof Finds Thermate in WTC Physical Samples, Building > Collapses an Inside Job > author: Jacob Hamblin > Based on chemical analysis of WTC structural steel residue,

Re: Synchronous shutil.copyfile()

2007-01-30 Thread Hugo Ferreira
Well.. Thx for the answers. The only way I had to make it work was to use a time.sleep(10) after the shutil.copyfile(). Since this is a night-run script, I can waste 10 seconds, but it still knocks me out "why" it happens... Cheers! Hugo Ferreira On 30 Jan 2007 18:06:15 + (GMT), Matthew Wo

Re: data design

2007-01-30 Thread James Stroud
Szabolcs Nagy wrote: >>Hurray for yaml! A perfect fit for my need! And a swell tool! >>Thanks a lot! > > > i warn you against yaml > it looks nice, but the underlying format is imho too complex (just > look at their spec.) > > you said you don't want python source because that's too complex for

Re: Sorting a List of Lists

2007-01-30 Thread Paul Rubin
Létezo <[EMAIL PROTECTED]> writes: > > I then thought I'd just go events.sort(lambda x,y: x[2]http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a List of Lists

2007-01-30 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I can't seem to get this nailed down and I thought I'd toss it out > there as, by gosh, its got to be something simple I'm missing. > > I have two different database tables of events that use different > schemas. I am using python to collate these records for display.

Re: how to "free" an object/var ?

2007-01-30 Thread Aahz
In article <[EMAIL PROTECTED]>, Stef Mientki <[EMAIL PROTECTED]> wrote: > >If I create a large array of data or class, how do I destroy it (when >not needed anymore) ? You should be aware that releasing memory may not cause the size of your process to shrink -- many OSes keep memory assigned to a

Re: Why don't have an object() instance a __dict__ attribute by default?

2007-01-30 Thread Gabriel Genellina
En Tue, 30 Jan 2007 20:31:26 -0300, Létező <[EMAIL PROTECTED]> escribió: > I use Python 2.5, Win32 MSI release. > > Setting attributes on an empty object does not work: > a=object() > a.x=1 > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'object' object ha

Re: Sorting a List of Lists

2007-01-30 Thread Létezo
> events = [['Event URL as String', 'Event Title as String ', Event Date > as Datetime], ...] > > I then thought I'd just go events.sort(lambda x,y: x[2] it a day. That didn't work. But then lamda functions like to be very > simple, maybe object subscripts aren't allowed (even though I didn't > get

Garbage collection (was: how to "free" an object/var ?)

2007-01-30 Thread Ben Finney
Stef Mientki <[EMAIL PROTECTED]> writes: > If I create a large array of data or class, how do I destroy it > (when not needed anymore) ? Python comes with garbage collection, which is enabled by default. Some time after your code stops needing the object, the garbage collector will clean it up.

Re: Sorting a List of Lists

2007-01-30 Thread Thomas Nelson
On Jan 30, 5:55 pm, [EMAIL PROTECTED] wrote: > I can't seem to get this nailed down and I thought I'd toss it out > there as, by gosh, its got to be something simple I'm missing. > > I have two different database tables of events that use different > schemas. I am using python to collate these reco

Re: DCOP memory leak?

2007-01-30 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hello, > > I'm writing a python script for Amarok, I communicate with Amarok > using DCOP. > Now, I have to call DCOP very often and I noticed that every time I > make a DCOP call my program keeps growing in memory size. > > To make sure it was DCOP i wrote the small

Sorting a List of Lists

2007-01-30 Thread apotheos
I can't seem to get this nailed down and I thought I'd toss it out there as, by gosh, its got to be something simple I'm missing. I have two different database tables of events that use different schemas. I am using python to collate these records for display. I do this by creating a list of li

Re: data design

2007-01-30 Thread Szabolcs Nagy
> Hurray for yaml! A perfect fit for my need! And a swell tool! > Thanks a lot! i warn you against yaml it looks nice, but the underlying format is imho too complex (just look at their spec.) you said you don't want python source because that's too complex for the users. i must say that yaml i

Re: how to "free" an object/var ?

2007-01-30 Thread Stef Mientki
James Stroud wrote: > Stef Mientki wrote: >> If I create a large array of data or class, >> how do I destroy it (when not needed anymore) ? >> >> Assign it to an empty list ? >> >> thanks, >> Stef Mientki > > It will be gc'd when you leave the scope or you can call del() to > explicitly get rid o

Re: how to "free" an object/var ?

2007-01-30 Thread James Stroud
Stef Mientki wrote: > If I create a large array of data or class, > how do I destroy it (when not needed anymore) ? > > Assign it to an empty list ? > > thanks, > Stef Mientki It will be gc'd when you leave the scope or you can call del() to explicitly get rid of the object if its existence bot

BYU Physics Prof Finds Thermate in WTC Physical Samples, Building Collapses an Inside Job

2007-01-30 Thread stj911
http://portland.indymedia.org/en/2006/06/341238.shtml BYU Physics Prof Finds Thermate in WTC Physical Samples, Building Collapses an Inside Job author: Jacob Hamblin Based on chemical analysis of WTC structural steel residue, a Brigham Young University physics professor has identified the materi

how to "free" an object/var ?

2007-01-30 Thread Stef Mientki
If I create a large array of data or class, how do I destroy it (when not needed anymore) ? Assign it to an empty list ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Why don't have an object() instance a __dict__ attribute by default?

2007-01-30 Thread Létező
I use Python 2.5, Win32 MSI release. Setting attributes on an empty object does not work: >>> a=object() >>> a.x=1 Traceback (most recent call last): File "", line 1, in AttributeError: 'object' object has no attribute 'x' >>> setattr(a, 'x', 1) Traceback (most recent call last): File "",

Re: PythonCard

2007-01-30 Thread skip
Tequila> I'm having some trouble starting PythonCard on my PC. I've Tequila> downloaded and ran python-2.5.msi to install Python on my Tequila> machine. And PythonCard-0.8.2.win32.exe to install PythonCard. ... Tequila> import wx Tequila> ImportError: No module named

Re: PythonCard

2007-01-30 Thread Gabriel Genellina
En Tue, 30 Jan 2007 18:45:49 -0300, Tequila <[EMAIL PROTECTED]> escribió: > I'm having some trouble starting PythonCard on my PC. Usually it's a good idea at least to read the installation instructions :) http://pythoncard.sourceforge.net/windows_installation.html -- Gabriel Genellina -- ht

Re: Convert raw data to XML

2007-01-30 Thread Gabriel Genellina
[EMAIL PROTECTED] wrote: > is there any other way to do this without using BeautifulStoneSoup.. > using existing minidom or ext.. > i dont want to install anything new It appears that you already know the answer... Look at the minidom documentation, toprettyxml method. -- Gabriel Genellina -

Re: PythonCard

2007-01-30 Thread Paul Watson
Tequila wrote: > I'm having some trouble starting PythonCard on my PC. > > I've downloaded and ran python-2.5.msi to install Python on my > machine. And PythonCard-0.8.2.win32.exe to install PythonCard. > > When I try to run the program I get the following error: > =

Re: Resizing widgets in text windows

2007-01-30 Thread deacon . sweeney
On Jan 29, 3:33 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Fri, 26 Jan 2007 22:35:20 +0100, <[EMAIL PROTECTED]> wrote: > > Hi, I've been searching for a .resize()-like function to overload much > > like can be done for the delete window protocol as follows: > > > toplevel.protocol("WM_DELETE

Re: Resizing widgets in text windows

2007-01-30 Thread deacon . sweeney
On Jan 26, 10:52 pm, James Stroud <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, I've been searching for a .resize()-like function to overload much > > like can be done for the delete window protocol as follows: > > > toplevel.protocol("WM_DELETE_WINDOW", callback) > > > I realize th

Re: Secret Technology of THERMATE and 911 Crime

2007-01-30 Thread stj911
Thanks for this great link On Jan 29, 7:27 pm, [EMAIL PROTECTED] wrote: > Excellent Technology, and photos: > > http://stj911.org/jones/focus_on_goal.html > > As scientists, we look at the evidence, perform experiments, and apply > the Scientific Method. The Greek method was to look at the evidenc

Conditional expressions - PEP 308

2007-01-30 Thread Colin J. Williams
It would be helpful if the rules of the game were spelled out more clearly. The conditional expression is defined as X if C else Y. We don't know the precedence of the "if" operator. From the little test below, it seem to have a lower precedence than "or". Thus, it is desirable for the user to

Re: DCOP memory leak?

2007-01-30 Thread jean-michel bain-cornu
> Now, I have to call DCOP very often and I noticed that every time I > make a DCOP call my program keeps growing in memory size. > > To make sure it was DCOP i wrote the small program below: > > from dcopext import DCOPClient, DCOPApp > > while 0==0: > dcop=DCOPClient() > dcop.attach()

Re: data design

2007-01-30 Thread Imbaud Pierre
Paddy a écrit : > > On Jan 30, 2:34 pm, Imbaud Pierre <[EMAIL PROTECTED]> wrote: > >>The applications I write are made of, lets say, algorithms and data. >>I mean constant data, dicts, tables, etc: to keep algorithms simple, >>describe what is peculiar, data dependent, as data rather than "case >

PythonCard

2007-01-30 Thread Tequila
I'm having some trouble starting PythonCard on my PC. I've downloaded and ran python-2.5.msi to install Python on my machine. And PythonCard-0.8.2.win32.exe to install PythonCard. When I try to run the program I get the following error: == C:\Python25\Lib\sit

Re: Convert raw data to XML

2007-01-30 Thread hg
[EMAIL PROTECTED] wrote: > On Jan 30, 12:05 pm, John Nagle <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >> >> >>En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: >> > the reason I wanted to write it a

DCOP memory leak?

2007-01-30 Thread [EMAIL PROTECTED]
Hello, I'm writing a python script for Amarok, I communicate with Amarok using DCOP. Now, I have to call DCOP very often and I noticed that every time I make a DCOP call my program keeps growing in memory size. To make sure it was DCOP i wrote the small program below: from dcopext import DCOPC

Re: Help me understand this

2007-01-30 Thread Beej
On Jan 30, 9:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > A float is, too. 2.__add is a float followed by an identifier. > Not legal. As pointed out elsewhere in the thread, (2). forces > it to be an integer followed by a ".". Which leads to these two beauties: >>> (2.).__add__(1) 3.

Re: Help me understand this

2007-01-30 Thread Beej
On Jan 30, 1:38 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Because 2. is the start of a float-literal. That isn't distinguishable for > the parsere otherwise. Oh, excellent! I wonder why I didn't think of that--I was too busy in "get a field" mode it didn't even occur to me that the "."

Re: Convert raw data to XML

2007-01-30 Thread elrondrules
On Jan 30, 12:05 pm, John Nagle <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > >>En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > > the reason I wanted to write it as a file was to parse the file, l

Re: Find and replace in a file with regular expression

2007-01-30 Thread Matimus
The re module is used for regular expressions. Something like this should work (untested): import fileinput, string, sys, re fileQuery = "Text.txt" sourceText = '''SOURCE''' replaceText = '''REPLACE''' def replace(fileName, sourceText, replaceText): file = open(fileName, "r") tex

Re: Convert raw data to XML

2007-01-30 Thread John Nagle
[EMAIL PROTECTED] wrote: > On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > >>En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > the reason I wanted to write it as a file was to parse the file, look > for a specific attribute and execute a set of commands bas

Re: Sourcing Python Developers

2007-01-30 Thread John Nagle
Ralf Schönian wrote: > Kartic schrieb: > >> Hello, >> >> My company has quite a few opening involving python expertise. We are >> always looking for python resources (and find it difficult filling >> these positions, might I add). Is there any place to find developers' >> resumes (like finding

Re: MoinMoin

2007-01-30 Thread skip
Dan> Is it fair game to ask questions about MoinMoin here? Dan> If not, can someone recommend a resource please? Yes, however [EMAIL PROTECTED] will probably yield more responses: https://lists.sourceforge.net/lists/listinfo/moin-user I've had problems getting my posts to appear the

Re: Executing Javascript, then reading value

2007-01-30 Thread John Nagle
Melih Onvural wrote: > Thanks, let me check out this route, and then I'll post the results. > > Melih Onvural > > On Jan 29, 4:04 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >> On 29 Jan 2007 12:44:07 -0800, Melih Onvural <[EMAIL PROTECTED]> >> wrote: >> >> >>> I need to execute some

SQLObject 0.7.3

2007-01-30 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.3 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wit

Find and replace in a file with regular expression

2007-01-30 Thread TOXiC
Hi everyone, First I say that I serched and tryed everything but I cannot figure out how I can do it. I want to open a a file (not necessary a txt) and find and replace a string. I can do it with: import fileinput, string, sys fileQuery = "Text.txt" sourceText = '''SOURCE''' replaceText = '''REP

MoinMoin

2007-01-30 Thread Daniel Klein
Is it fair game to ask questions about MoinMoin here? If not, can someone recommend a resource please? Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
John Nagle wrote: > Aahz wrote: > >> In article <[EMAIL PROTECTED]>, >> Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: >> My point is that an app that dies only once every few months under load >> is actually pretty damn stable! That is not the kind of problem that >> you are likely to stimulat

Re: strip question

2007-01-30 Thread Daniel Klein
On 26 Jan 2007 21:33:47 -0800, [EMAIL PROTECTED] wrote: >hi >can someone explain strip() for these : >[code] x='www.example.com' x.strip('cmowz.') >'example' >[/code] > >when i did this: >[code] x = 'abcd,words.words' x.strip(',.') >'abcd,words.words' >[/code] > >it does not st

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
Steve Holden wrote: > [snip] > > Are you using memory with built-in error detection and correction? > > You mean in the hardware? I'm not really sure, I'd assume so but is there any way I can check on this? If the hardware isn't doing that, is there anything I can do with my software to offe

Re: Convert raw data to XML

2007-01-30 Thread elrondrules
On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > > > For example the raw data is as follows > > > SomeText > Description>PassorFail > > > without spaces or new lines. I need this to be written into an XML > > f

Re: data design

2007-01-30 Thread Paddy
On Jan 30, 2:34 pm, Imbaud Pierre <[EMAIL PROTECTED]> wrote: > The applications I write are made of, lets say, algorithms and data. > I mean constant data, dicts, tables, etc: to keep algorithms simple, > describe what is peculiar, data dependent, as data rather than "case > statements". These co

C extension module causes bus error on Python exit

2007-01-30 Thread Anand Patil
Hi all, I was referred to this list from python-help. I've written an extension module in C which contains several new types. The types can be instantiated, used, and deleted under Python 2.4.3 on OS X 10.4 without problems. However, whenever I import the module Python tries to dereference a

Re: SQL connecting

2007-01-30 Thread Scripter47
Dennis Lee Bieber skrev: > On Mon, 29 Jan 2007 19:45:47 GMT, John Nagle <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Scripter47 wrote: >>> Hey >>> >>> It got a problem with python to connect to my SQL DBs, that's installed >>> on my apache server. how do i connect to sql

Re: Help me understand this

2007-01-30 Thread Neil Cerutti
On 2007-01-30, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Tue, 30 Jan 2007 06:34:01 -0300, Beej <[EMAIL PROTECTED]> escribió: > >> But here's one I still don't get: >> > type(2) >> > type((2)) >> > (2).__add__(1) >> 3 > 2.__add__(1) >> File "", line 1 >> 2.__add__(1)

Re: Convert raw data to XML

2007-01-30 Thread John Nagle
Actually, that's not "raw data" coming in, that's valid XML. Why do you need to indent it? Just write it to a file. If you really need to indent XML, get BeautifulSoup, read the XML in with BeautifulStoneSoup, and write it back out with "prettify()". But if the next thing to see that XML

Re: Help me understand this

2007-01-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Jean-Paul Calderone wrote: >>An integer is a primary so 2.__add(1) should be valid. > > A float is, too. 2.__add is a float followed by an identifier. > Not legal. As pointed out elsewhere in the thread, (2). forces > it to be an integer followed by a ".". A space betwe

Re: Synchronous shutil.copyfile()

2007-01-30 Thread Matthew Woodcraft
Hugo Ferreira <[EMAIL PROTECTED]> wrote: > I have a problem. I'm using calling shutil.copyfile() followed by > open(). The thing is that most of the times open() is called before > the actual file is copied. I don't have this problem when doing a > step-by-step debug, since I give enough time for t

Re: The reliability of python threads

2007-01-30 Thread John Nagle
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > My point is that an app that dies only once every few months under load > is actually pretty damn stable! That is not the kind of problem that > you are likely to stimulate. This has all been so

Re: Help me understand this

2007-01-30 Thread Jean-Paul Calderone
On Tue, 30 Jan 2007 14:39:28 -0300, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >En Tue, 30 Jan 2007 06:34:01 -0300, Beej <[EMAIL PROTECTED]> escribió: > >> But here's one I still don't get: >> > type(2) >> > type((2)) >> > (2).__add__(1) >> 3 > 2.__add__(1) >> File "", line 1

Re: Help me understand this

2007-01-30 Thread Gabriel Genellina
En Tue, 30 Jan 2007 06:34:01 -0300, Beej <[EMAIL PROTECTED]> escribió: > But here's one I still don't get: > type(2) > type((2)) > (2).__add__(1) > 3 2.__add__(1) > File "", line 1 > 2.__add__(1) > ^ > SyntaxError: invalid syntax It appears to be a bug, eit

Re: How can I know both the Key c and Ctrl on the keyboard are pressed?

2007-01-30 Thread Gabriel Genellina
En Tue, 30 Jan 2007 05:50:29 -0300, <[EMAIL PROTECTED]> escribió: > How can I know the Key c and Ctrl on the keyboard are pressed? Or how > to let the program press the > > key Ctrl+c automatically? I just want to use python to develop a > script program. > gear If you are on Windows and want to

test,please ignore 2 qrm

2007-01-30 Thread Mark Harrison
please ignore -- http://mail.python.org/mailman/listinfo/python-list

Re: Secret Technology of THERMATE and 911 Crime

2007-01-30 Thread thermate
A little intro to Uncle Al. This bastard is a spook from the criminal agencies. His job is to harass, disinform and such on the internet. He has been doing it overtime for many years. Now he was indeed doing his job in the last post. Thermate is indeed the correct terminology. When you search th

Re: data design

2007-01-30 Thread Larry Bates
Imbaud Pierre wrote: > Larry Bates a écrit : >> Imbaud Pierre wrote: >> >>> The applications I write are made of, lets say, algorithms and data. >>> I mean constant data, dicts, tables, etc: to keep algorithms simple, >>> describe what is peculiar, data dependent, as data rather than "case >>> stat

test, please ignore qrm

2007-01-30 Thread Mark Harrison
test, please ignore -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: OSCON 2007 Call for Participation Ends Soon

2007-01-30 Thread Kevin Altis
Be Heard at OSCON 2007 -- Submit Your Proposal to Lead Sessions and Tutorials by February 5! The O'Reilly Open Source Convention July 23-27, 2007 Portland, Oregon http://conferences.oreillynet.com/os2007/ More than 2500 open source developers, gurus, experts and users will gather, eager to netwo

Re: Please take me off the list

2007-01-30 Thread Christopher Mocock
Paul Boddie wrote: > See also the Tutor mailing list, which might be a bit better for > starting to learn Python, should you (Daniel) decide to change your > mind. Here's the mailing list's Web page: > > http://mail.python.org/mailman/listinfo/tutor > > If you haven't seen much information for

Re: Unicode error handler

2007-01-30 Thread Walter Dörwald
Rares Vernica wrote: > Hi, > > Does anyone know of any Unicode encode/decode error handler that does a > better replace job than the default replace error handler? > > For example I have an iso-8859-1 string that has an 'e' with an accent > (you know, the French 'e's). When I use s.encode('asci

Re: Please take me off the list

2007-01-30 Thread Paul Boddie
On 30 Jan, 16:33, Mikael Olofsson <[EMAIL PROTECTED]> wrote: > >http://mail.python.org/mailman/listinfo/python-list See also the Tutor mailing list, which might be a bit better for starting to learn Python, should you (Daniel) decide to change your mind. Here's the mailing list's Web page:

Re: message handling in Python / wxPython

2007-01-30 Thread Chris Mellon
On 1/30/07, murali iyengar <[EMAIL PROTECTED]> wrote: > hi, > i have basic knowledge of python and wxPython... now i need to know about > message handling in python/wxPython? > > could anybody pls help me by giving some info on how to handle (in Python), > 'the user defined messages' posted from VC

Re: Sourcing Python Developers

2007-01-30 Thread Ralf Schönian
Kartic schrieb: > Hello, > > My company has quite a few opening involving python expertise. We are > always looking for python resources (and find it difficult filling these > positions, might I add). Is there any place to find developers' resumes > (like finding jobs from http://python.org/com

Re: Please take me off the list

2007-01-30 Thread Jacques Cazotte
Daniel kavic a écrit : > Sorry to waste email space , but I wish to be off this list because I have > tried python and it is too difficult for me. > > -Dan Hi Daniel, My name is God, and I am quite new to mailing lists. I sometimes wonder wether computerizing the whole thing was a good idea. Do Y

Re: Help me override append function of list object

2007-01-30 Thread jeremito
On Jan 30, 10:47 am, Peter Otten <[EMAIL PROTECTED]> wrote: > jeremito wrote: > > I have created a class that inherits from the list object. I want to > > override the append function to allow my class to append several > > copies at the same time with one function call. I want to do > > someth

Re: Synchronous shutil.copyfile()

2007-01-30 Thread Jean-Paul Calderone
On Tue, 30 Jan 2007 15:05:23 +, Hugo Ferreira <[EMAIL PROTECTED]> wrote: >Hi there, > >I have a problem. I'm using calling shutil.copyfile() followed by >open(). The thing is that most of the times open() is called before >the actual file is copied. I don't have this problem when doing a >step-

python-list@python.org

2007-01-30 Thread Chris Lambacher
On Tue, Jan 30, 2007 at 10:42:22AM -0500, Jason Persampieri wrote: >Sadly, the group is tied to Python 2.3 for now. Subprocess for 2.2 and 2.3: http://www.lysator.liu.se/~astrand/popen5/ Win32 installers for subversion for 2.2 and 2.3: http://www.lysator.liu.se/~astrand/popen5/ -Chris > >

Re: data design

2007-01-30 Thread Imbaud Pierre
Larry Bates a écrit : > Imbaud Pierre wrote: > >>The applications I write are made of, lets say, algorithms and data. >>I mean constant data, dicts, tables, etc: to keep algorithms simple, >>describe what is peculiar, data dependent, as data rather than "case >>statements". These could be called c

Re: data design

2007-01-30 Thread Imbaud Pierre
Szabolcs Nagy a écrit : >>The lazy way to do this: have modules that initialize bunches of >>objects, attributes holding the data: the object is somehow the row of >>the "table", attribute names being the column. This is the way I >>proceeded up to now. >>Data input this way are almost "configurati

Re: Help me override append function of list object

2007-01-30 Thread Peter Otten
jeremito wrote: > I have created a class that inherits from the list object. I want to > override the append function to allow my class to append several > copies at the same time with one function call. I want to do > something like: > > import copy > > class MyList(list): > __init__(self):

Re: thread and processes with python/GTK

2007-01-30 Thread Thomas Guettler
Hi, how do you start the python app? Goes stdout to a terminal or a pipe? "python script.py" and "python script.py | cat" behave different. Maybe "sys.stdout.flush()" helps you. BTW, I switched from threads to idle_add for pygtk applications. awalter1 wrote: > Hello, > > I'm developping an app

python-list@python.org

2007-01-30 Thread Jason Persampieri
Sadly, the group is tied to Python 2.3 for now. Actually, I got around this problem by using an intermediate process that happens to handle output on its own (bsub). On 1/30/07, Chris Lambacher <[EMAIL PROTECTED]> wrote: The subprocess module is probably a good starting point: http://docs.pyth

Help me override append function of list object

2007-01-30 Thread jeremito
I have created a class that inherits from the list object. I want to override the append function to allow my class to append several copies at the same time with one function call. I want to do something like: import copy class MyList(list): __init__(self): pass def append(self, ob

python-list@python.org

2007-01-30 Thread Chris Lambacher
On Mon, Jan 29, 2007 at 03:12:37PM -0800, Pappy wrote: > SHORT VERSION: > Python File B changes sys.stdout to a file so all 'prints' are written > to the file. Python file A launches python file B with os.popen("./B > 2>&^1 >dev/null &"). Python B's output disappears into never-never > land. >

  1   2   >