sum and strings

2006-08-17 Thread Paddy
I was browsing the Voidspace blog item on "Flattening Lists", and followed up on the use of sum to do the flattening. A solution was: >>> nestedList = [[1, 2], [3, 4], [5, 6]] >>> sum(nestedList,[]) [1, 2, 3, 4, 5, 6] I would not have thought of using sum in this way. When I did help(sum) the doc

Re: os.path.normpath

2006-08-17 Thread placid
placid wrote: > Hi all, > > I was just wondering if there is a anti-os.path.normpath function? For > example if i have the path "C:\Program Files\Games" i want to > anti-os.path.normpath is so that it becomes "C:\\Program Files\\Games" > ? > > Cheers Ahh ignore my post. I was using abspath, and n

os.path.normpath

2006-08-17 Thread placid
Hi all, I was just wondering if there is a anti-os.path.normpath function? For example if i have the path "C:\Program Files\Games" i want to anti-os.path.normpath is so that it becomes "C:\\Program Files\\Games" ? Cheers -- http://mail.python.org/mailman/listinfo/python-list

Http client to POST using multipart/form-data

2006-08-17 Thread Bruno Dilly
Hi, I'm implementing a http client to POST using multipart/form-data. It uses urllib2 module, and files are uploaded correctly. But I need to know how much has been uploaded at a given moment, to inform the user the proportion of the file already uploaded. Anybody knows how could I do that? Tha

Re: The Semicolon Wars as a software industry and human condition

2006-08-17 Thread Greg R. Broderick
"Iain King" <[EMAIL PROTECTED]> wrote in news:1155827943.041208.51220 @i3g2000cwc.googlegroups.com: > I'm confused - I thought Xah Lee loved Perl? Now he's bashing it? > Huh? That's his other personality. -- - Greg R. Broderic

Re: Import module with non-standard file name

2006-08-17 Thread Ben Finney
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Ben Finney schrieb: > > Question: I have Python modules named without '.py' as the extension, > > and I'd like to be able to import them. How can I do that? > > I recommend to use imp.load_module. I've tried this; as Patrick Maupin alludes to, it c

Which field is Python suitable to do some tasks?

2006-08-17 Thread many_years_after
hello , members: I have basic knowledge of python programming. But i don't know what to do next step. I don't know in which field I should learn more about python and finally finish some tasks. Can you give me some ideas? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

python and poplib

2006-08-17 Thread 叮叮当当
Hi, all. i have two question with poplib: 1. How to judge if a mail is or not a new mail ? 2. How Can i get the send-mailbox's mail? thanks . -- http://mail.python.org/mailman/listinfo/python-list

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
danielx wrote: > > Mark E. Fenner wrote: >> Mark E. Fenner wrote: >> >> > John Machin wrote: >> > >> >> >> >> Mark E. Fenner wrote: >> >> >> >>> Here's my class of the objects being copied: >> >> >> >> Here's a couple of things that might help speed up your __init__ >> >> method, and hence your c

Re: How to fill a form

2006-08-17 Thread Justin Ezequiel
Sulsa wrote: > On Tue, 15 Aug 2006 03:37:02 - > Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2006-08-15, Sulsa <[EMAIL PROTECTED]> wrote: > > > > > I want to fill only one smiple form so i would like not to use > > > any non standard libraries. > > > > Then just send the HTTP "POST" reques

Re: Optimizing Inner Loop Copy

2006-08-17 Thread danielx
Mark E. Fenner wrote: > Mark E. Fenner wrote: > > > John Machin wrote: > > > >> > >> Mark E. Fenner wrote: > >> > >>> Here's my class of the objects being copied: > >> > >> Here's a couple of things that might help speed up your __init__ > >> method, and hence your copy method: > >> > >>> > >>> cl

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Michael Spencer
Mark E. Fenner wrote: > Michael Spencer wrote: > >> Mark E. Fenner wrote: >> >>> and the copy is taking the majority (42%) of my execution time. >>> So, I'd like to speed up my copy. I had an explicit copy method that did >>> what was needed and returned a new object, but this was quite a bit >>>

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
Mark E. Fenner wrote: > John Machin wrote: > >> >> Mark E. Fenner wrote: >> >>> Here's my class of the objects being copied: >> >> Here's a couple of things that might help speed up your __init__ >> method, and hence your copy method: >> >>> >>> class Rule(list): >>> def __init__(self, lh

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
John Machin wrote: > > Mark E. Fenner wrote: > >> Here's my class of the objects being copied: > > Here's a couple of things that might help speed up your __init__ > method, and hence your copy method: > >> >> class Rule(list): >> def __init__(self, lhs=None, rhs=None, nClasses=0, nCases=0

Re: Looking For mp3 ID Tag Module

2006-08-17 Thread Tim Daneliuk
Iñigo Serna wrote: > On 8/18/06, Tim Daneliuk <[EMAIL PROTECTED]> wrote: >> > try mutagen. >> http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen >> >> This module is more-or-less exactly what I needed. However, I am running >> into problems when the filenames or ID tags have unicode cha

Interactive display of trace.py output?

2006-08-17 Thread Diane Jaquay
I've been using trace.py to get code coverage results for my unit tests, and like it. Now I'm trying to use it for code coverage of the GUI parts of my wxPython-based program, and I realized how nice it would be to be able to see what lines I'd covered and what remained to be exercised, without ha

Re: Optimizing Inner Loop Copy

2006-08-17 Thread John Machin
Mark E. Fenner wrote: > Here's my class of the objects being copied: Here's a couple of things that might help speed up your __init__ method, and hence your copy method: > > class Rule(list): > def __init__(self, lhs=None, rhs=None, nClasses=0, nCases=0): def __init__(self, lhs=None, r

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
Michael Spencer wrote: > Mark E. Fenner wrote: > >> >> and the copy is taking the majority (42%) of my execution time. >> So, I'd like to speed up my copy. I had an explicit copy method that did >> what was needed and returned a new object, but this was quite a bit >> slower than using the stan

Re: re.sub() backreference bug?

2006-08-17 Thread jeff emminger
thanks - that's the trick. On 8/17/06, Tim Chase <[EMAIL PROTECTED]> wrote: > Looks like you need to be using "raw" strings for your > replacements as well: > > s = re.sub(r'([A-Z]+)([A-Z][a-z])', r"\1_\2", s) > s = re.sub(r'([a-z\d])([A-Z])', r"\1_\2", s) > > This should allow the backslashes to

Re: Newbie SQL ? in python.

2006-08-17 Thread John Machin
len wrote: > I have tried both the pyodbc and mxODBC and with help from the ng been > able to do what I want using either. My needs are pretty basic some > simple selects and inserts. > > The current problem I have hit is the database I am inserting into have > a special ODBC driver that using the

Re: Best IDE for Python

2006-08-17 Thread Simone Murdock
On 14 Aug 2006 15:04:41 -0700, "Tryker" <[EMAIL PROTECTED]> wrote: >Gotta love PyScripter. Light, easy to use, free. >http://mmm-experts.com/Products.aspx?ProductID=4 I agree: I'm trying it only from 4 days the beta version 1.6 and it's good (some little problems, normal for a beta version, that

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Michael Spencer
Mark E. Fenner wrote: > > and the copy is taking the majority (42%) of my execution time. > So, I'd like to speed up my copy. I had an explicit copy method that did > what was needed and returned a new object, but this was quite a bit slower > than using the standard lib copy.copy(). > How are

Re: re.sub() backreference bug?

2006-08-17 Thread Tim Chase
> Tim's given you the solution to the problem: with the re module, > *always* use raw strings in regexes and substitution strings. "always" is so...um...carved in stone. One can forego using raw strings if one prefers having one's strings looked like they were trampled by a stampede of creatu

plpython and pickle

2006-08-17 Thread Gerardo Herzig
Hi all, sory if this is kind of [OT], but cannot find the answer for this behaviour Im programming a db function using plpython...i have a db called 'sessions', and a postgres 8.1.2 database called 'test'. In 'sessions', i store several values in a `pickled' way so If a do """ You are now

Re: Looking For mp3 ID Tag Module

2006-08-17 Thread Iñigo Serna
On 8/18/06, Tim Daneliuk <[EMAIL PROTECTED]> wrote: > > try mutagen. http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen > > This module is more-or-less exactly what I needed. However, I am running > into problems when the filenames or ID tags have unicode characters in them. > > Typicall

Re: re.sub() backreference bug?

2006-08-17 Thread John Machin
[EMAIL PROTECTED] wrote: > using this code: > > import re > s = 'HelloWorld19-FooBar' > s = re.sub(r'([A-Z]+)([A-Z][a-z])', "\1_\2", s) > s = re.sub(r'([a-z\d])([A-Z])', "\1_\2", s) > s = re.sub('-', '_', s) > s = s.lower() > print "s: %s" % s > > i expect to get: > hello_world19_foo_bar > > but i

Re: How to delete a directory tree in FTP

2006-08-17 Thread tobiah
I thought that the plain ftp command 'mdel' would do that. T wrote: > I connect to a FTP server which can be either unix or windows server. > Once in the FTP session, I would like to delete a directory tree on the > server. Is there a command that will do this? If not, can someone > point me to

Re: How to fill a form

2006-08-17 Thread Philippe Martin
Sulsa wrote: > On Tue, 15 Aug 2006 03:37:02 - > Grant Edwards <[EMAIL PROTECTED]> wrote: > >> On 2006-08-15, Sulsa <[EMAIL PROTECTED]> wrote: >> >> > I want to fill only one smiple form so i would like not to use >> > any non standard libraries. >> >> Then just send the HTTP "POST" request

Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
Hello all, I have a code where my inner loop looks like: allNew = [] for params in cases: newObj = copy(initialObject) newObj.modify(params) allNew.append(newObj) return allNew and the copy is taking the majority (42%) of my execution time. So, I'd like to speed up my copy. I had an

Re: The Semicolon Wars as a software industry and human condition

2006-08-17 Thread Philippe Martin
>>It was philosophers that got us out of that Dark Ages mess, and no small >>number of them lost their lives in doing so. And today, the philosophy >>majors are the butts of the most jokes, because after the philosophers >>succeeded in opening our minds, we forgot why we needed them. Look east X

Re: It is __del__ calling twice for some instances?

2006-08-17 Thread Max Yuzhakov
Duncan Booth wrote: DB> You should post a working code sample which generates your output if you DB> want a more useful answer. Hello! Today I have found a compact variant of a code which shows my question: --- #!/usr/local

Re: hide python code !

2006-08-17 Thread Paul Boddie
danielx wrote: > [The suggestion that works apparently given away unconditionally become part of common culture.] > Extremely interesting point! This should really motivate people to > answer the question I posed earlier: Does an author of software forfeit > his rights to the code if he shares hi

Re: drawingarea problem

2006-08-17 Thread Lee Harr
On 2006-08-16, Rafa³ Janas <[EMAIL PROTECTED]> wrote: > Is somebody try to paint filled boxes in drawingarea? > I don't know how to paint line or someting like this. > Maybe somebody have tutorial or samples? Your question could use a few more details (like what you have tried, what "drawingarea"

Re: New to python

2006-08-17 Thread Paddy
Gallagher, Tim (NE) wrote: > Hello all, > I am new to python and I have a few questions. I am an old Perl hacker > been using Perl for many years. I wanted to give python a try, I am > happy with it so far. > Question: > 1. Is there a repository that I can go to for modules? Perl has CPAN and >

Re: trouble understanding inheritance...

2006-08-17 Thread enigmadude
If what you're trying to do is have more control over the type of object that is instantiated, then you could use a function that decides what class to use based upon the arguments supplied to the function, where it then instantiates an object from the chosen class, then returns the object. The __i

Re: List match

2006-08-17 Thread Paddy
OriginalBrownster wrote: > Hi there: > > I know this probably is a very easy thing to do in python, but i wanted > to compare 2 lists and generate a new list that does not copy similar > entries. An example below > > list= ["apple", "banana", "grape"] > list2=["orange","banana", "pear"] > > now I

Re: List match

2006-08-17 Thread Paddy
[EMAIL PROTECTED] wrote: > OriginalBrownster wrote: > > Hi there: > > > > I know this probably is a very easy thing to do in python, but i wanted > > to compare 2 lists and generate a new list that does not copy similar > > entries. An example below > > > > list= ["apple", "banana", "grape"] > > l

Newbie SQL ? in python.

2006-08-17 Thread len
I have tried both the pyodbc and mxODBC and with help from the ng been able to do what I want using either. My needs are pretty basic some simple selects and inserts. The current problem I have hit is the database I am inserting into have a special ODBC driver that using the files natively has an

Re: re.sub() backreference bug?

2006-08-17 Thread Tim Chase
> s = re.sub(r'([A-Z]+)([A-Z][a-z])', "\1_\2", s) > s = re.sub(r'([a-z\d])([A-Z])', "\1_\2", s) > i expect to get: > hello_world19_foo_bar > > but instead i get: > hell☺_☻orld19_fo☺_☻ar Looks like you need to be using "raw" strings for your replacements as well: s = re.sub(r'([A-Z]+)([A-Z][a-z

Re: hide python code !

2006-08-17 Thread Gerhard Fiedler
On 2006-08-17 16:27:46, danielx wrote: > A second point to consider: The chip is patentable (I think this is the > case legally, as well as in the court of public opinion), No. A chip is not patentable. In your scenario, the /idea/ behind the chip's functionality may be patentable, but for a pat

re.sub() backreference bug?

2006-08-17 Thread jemminger
using this code: import re s = 'HelloWorld19-FooBar' s = re.sub(r'([A-Z]+)([A-Z][a-z])', "\1_\2", s) s = re.sub(r'([a-z\d])([A-Z])', "\1_\2", s) s = re.sub('-', '_', s) s = s.lower() print "s: %s" % s i expect to get: hello_world19_foo_bar but instead i get: hell☺_☻orld19_fo☺_☻ar (in case the a

Re: Curried class methods?

2006-08-17 Thread Scott Lamb
Thanks, Antoon and Carl. Just tried your solutions - both work and are much cleaner than mine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Py2Exe and sys.argv : The Lost Arguments

2006-08-17 Thread Larry Bates
I entered the following simple program, compiled with py2exe (2.4) and ran it the way you describe with two files selected and it did what you said (e.g. only shows ays.argv[0] and sys.argv[1]): import sys print sys.argv x=raw_input('Press return to continue') Under 2.5 it didn't work at all (not

Interactive display of trace.py output?

2006-08-17 Thread djaquay
I've been using trace.py to get code coverage results for my unit tests, and like it. Now I'm trying to use it for code coverage of the GUI parts of my wxPython-based program, and I realized how nice it would be to be able to see what lines I'd covered and what remained to be exercised, without ha

Re: CGI script running not completely in HTML

2006-08-17 Thread Tim Chase
> In which case you probably need to tweak the server timeout > setting. Nothing you can do from Python (except possibly make > your CGI run faster). Or have Python send a better SQL statement that would run faster...a little SQL mojo goes a long way. The OP failed (as far as my thread-dabbling

Re: CGI script running not completely in HTML

2006-08-17 Thread Steve Holden
Yong Wang wrote: > Hi Steve: >The propblem I run into is about one minute. The CGI script is not > completed to run and aborted. > If I run the python script in backend solaris machine, the script needs about > one minute for database > access. > Thanks, > > Yong > In which case yo

Re: sqlite3 or mysqldb?

2006-08-17 Thread Jarek Zgoda
John Salerno napisał(a): > I did a little experimentation with MySQL, and yesterday I was reading > up on SQLite. Since they both use the SQL language, does this mean that > the queries you write will be the same for both modules? I'm sure there > are slight differences for how you connect to DBs,

Re: How to fill a form

2006-08-17 Thread John J. Lee
Sulsa <[EMAIL PROTECTED]> writes: > On Tue, 15 Aug 2006 03:37:02 - > Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2006-08-15, Sulsa <[EMAIL PROTECTED]> wrote: > > > > > I want to fill only one smiple form so i would like not to use > > > any non standard libraries. > > > > Then just se

Re: CGI script running not completely in HTML

2006-08-17 Thread Steve Holden
Yong Wang wrote: > Hi, All: > I have written a python CGI script to run in html web page. When I access > to > the html page, it only runs part of the script, then abort because the late > part of > the script is involved in database access, it is slow. I wonder whether there > is > a way t

Re: CGI script running not completely in HTML

2006-08-17 Thread Tim
Yong Wang wrote: > Hi, All: > I have written a python CGI script to run in html web page. When I access > to > the html page, it only runs part of the script, then abort because the late > part of > the script is involved in database access, it is slow. I wonder whether there > is > a way t

Re: New to python

2006-08-17 Thread bearophileHUGS
Tim Gallagher: > I am new to python and I have a few questions. I am an old Perl hacker > been using Perl for many years. I wanted to give python a try, I am > happy with it so far. In some places and jobs Perl is the only scripting language used still, but It seems there are other people like y

Re: trouble understanding inheritance...

2006-08-17 Thread Ant
Try running the following example - it should help clear up what is going on: class Base: def __init__(self): print "Initializing base" def shouldBeImplemented(self): raise NotImplementedError def hasDefaultImplementation(self): print "Wey Hey!" class A(Base):

Re: Defining our own types?

2006-08-17 Thread tobiah
> suppose I type: > ip = 123.45.67.89 This is probably far from what you want, but I would do something like this: class ip(list): def __init__(self, ip): bytes = ip.split('.') for x in range(4):

Problem installing Python 2.4.3 on FreeBSD 5.3-RELEASE-p31

2006-08-17 Thread james
I have a problem installing Pyhton 2.4.3, running "./configure --with-threads=no" completes, but gives the warning: configure: WARNING: curses.h: present but cannot be compiled configure: WARNING: curses.h: check for missing prerequisite headers? configure: WARNING: curses.h: see the Autoconf

Re: CGI script running not completely in HTML

2006-08-17 Thread Christoph Haas
On Thursday 17 August 2006 21:50, Yong Wang wrote: > I have written a python CGI script to run in html web page. When I > access to the html page, it only runs part of the script, then abort > because the late part of the script is involved in database access, it > is slow. I wonder whether the

FrontPage COM Object Model

2006-08-17 Thread iman gowhari
I want to get frontpage web and page object models with this code. OnPageNew works properly but when I click on the page nothing happen. from win32com.client import DispatchWithEvents import time, pythoncom, msvcrt class FrontPageEvents: def __init__(self): print 'FrontPageEvents'

CGI script running not completely in HTML

2006-08-17 Thread Yong Wang
Hi, All: I have written a python CGI script to run in html web page. When I access to the html page, it only runs part of the script, then abort because the late part of the script is involved in database access, it is slow. I wonder whether there is a way to control html running speed so th

Re: sqlite3 or mysqldb?

2006-08-17 Thread andychambers2002
> I was using mysqldb just because MySQL seems to be a pretty big > standard, but now that sqlite3 is coming with Python 2.5, I might > switch, since it seems to be easier to use. Yes and No. Sqlite takes less to configure and manage but you have to consider your needs for concurrent processing.

Re: Dynamic objects

2006-08-17 Thread Larry Bates
Mark Shewfelt wrote: > Hello, > > I have implemented a series of classes representing a Building, its > respective Equipment, and then various Components of that equipment > like so (as you'll be able to tell, I'm a newbie): > > class Building: > equipment = {} > def AddEquipment( name,

Py2Exe and sys.argv : The Lost Arguments

2006-08-17 Thread Thomas W
I've created a simple script like so : import sys import wx app = wx.PySimpleApp() dlg = wx.MessageDialog(None, "%s" % sys.argv, 'A Message Box', wx.YES_NO | wx.ICON_QUESTION) retCode = dlg.ShowModal() app.MainLoop() If I run this on the command line like python testcmd.py /somefile.ext /another

Re: Dynamic objects

2006-08-17 Thread Mark Shewfelt
Thanks a lot Tim! My __init__ functions didn't set the dictionaries like you did below (e.g. self.equipment = {} ). Newbie mistake - won't make that one again. Thanks again, Mark Tim wrote: > Mark Shewfelt wrote: > > Hello, > > > > I have implemented a series of classes representing a Buildin

Re: hide python code !

2006-08-17 Thread danielx
Paul Boddie wrote: > danielx wrote: > > > > But we have only considered the economics of such a decision. Even if > > there is no market value to a work, a person has an understandable > > desire to exercise the rights of ownership over a work, given the > > amount of personal investment one makes

Re: Dynamic objects

2006-08-17 Thread Tim
Mark Shewfelt wrote: > Hello, > > I have implemented a series of classes representing a Building, its > respective Equipment, and then various Components of that equipment > like so (as you'll be able to tell, I'm a newbie): > > class Building: > equipment = {} > def AddEquipment( name,

Re: New to python

2006-08-17 Thread Gabe
Gallagher, Tim (NE) wrote: > 1. Is there a repository that I can go to for modules? Perl has CPAN and > I was wondering what the Python equivalent was. You can try the CheeseShop. You can locate it here: http://cheeseshop.python.org/pypi. Also, you might want to look into the new .egg format fo

Re: ANN: Pybots -- Python Community Buildbots

2006-08-17 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.5 (release candidate 1)

2006-08-17 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Dynamic objects

2006-08-17 Thread Mark Shewfelt
Hello, I have implemented a series of classes representing a Building, its respective Equipment, and then various Components of that equipment like so (as you'll be able to tell, I'm a newbie): class Building: equipment = {} def AddEquipment( name, data ): equipment[ name ] =

New to python

2006-08-17 Thread Gallagher, Tim (NE)
Hello all, I am new to python and I have a few questions. I am an old Perl hacker been using Perl for many years. I wanted to give python a try, I am happy with it so far. Question: 1. Is there a repository that I can go to for modules? Perl has CPAN and I was wondering what the Python equival

Re: hide python code !

2006-08-17 Thread danielx
Steven D'Aprano wrote: > On Wed, 16 Aug 2006 13:39:10 -0700, danielx wrote: > > > Steven D'Aprano wrote: > >> On Tue, 15 Aug 2006 09:00:16 -0700, Ben Sizer wrote: > >> > >> > Yes, in much the same way that there is no point ever locking your > >> > doors or installing burglar alarms, as a determine

Re: PySequence_SetItem

2006-08-17 Thread Jack Diederich
On Thu, Aug 17, 2006 at 02:35:11PM +0200, Fredrik Lundh wrote: > John Machin wrote: > > > 1. It's also documented as being the recommended way of filling up a > > list after PyList_New. > > since it doesn't work in any existing Python release, it's hardly > "recommended". > > the Python documen

Subprocess confusion: how file-like must stdin be?

2006-08-17 Thread Cameron Laird
Question: import subprocess, StringIO input = StringIO.StringIO("abcdefgh\nabc\n") # I don't know of a compact, evocative, and # cross-platform way to exhibit this behavior. # For now, depend on cat(1). p = subprocess.Popen(["cat"], stdout = subprocess.PIPE,

Re: trouble understanding inheritance...

2006-08-17 Thread Jason
KraftDiner wrote: > c = [a, b] > for c in [a,b]: >c.getName() > > but when does baseClass ever get used? > Why did i even have to define it? > One reason for using base classes are for logical reasons. Oranges and Apples are different, but they are both fruits. Python has both unicode string

Re: OT: p-gal website

2006-08-17 Thread John Bokma
"ajaksu" <[EMAIL PROTECTED]> wrote: > And to answer your question, I recommend to follow standards because > that's how I call the mixed bag of Recommendations, some of which are > also Specifications, allowing for the inclusion of both significant > Standards and standards. I guess I must've been

Re: Python2.5 RC1 vs sgmlop.c

2006-08-17 Thread Robin Becker
[EMAIL PROTECTED] wrote: > Robin> Just replaced three PyMem_DEL's with PyObject_FREE and things now > Robin> work again. > > Can you send me a patch? > > Thx, > > Skip On its way -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: where can i get older version of python?

2006-08-17 Thread calchp
[EMAIL PROTECTED] wrote: > does any one know where can I get older version of python for windows? > > I am looking for versions between 2.0 and 2.2. > > thanks for your help This site might be useful http://www.oldapps.com/Python.php http://www.oldapps.com/ -- http://mail.python.org/mailman/li

Re: where can i get older version of python?

2006-08-17 Thread beliavsky
[EMAIL PROTECTED] wrote: > does any one know where can I get older version of python for windows? > > I am looking for versions between 2.0 and 2.2. http://www.python.org/download/releases/ -- http://mail.python.org/mailman/listinfo/python-list

where can i get older version of python?

2006-08-17 Thread chppatel
does any one know where can I get older version of python for windows? I am looking for versions between 2.0 and 2.2. thanks for your help -- http://mail.python.org/mailman/listinfo/python-list

Python for arcgis

2006-08-17 Thread subramanian2003
Hello All, From where can I get the python tutorial for arcgis customisation?. Bye, Subramanian. Sign Up for your FREE eWallet at www.wallet365.com -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe and COM problem

2006-08-17 Thread Naytie
I figured it out. I can change the table column by selecting it through the table, e.g. column = table.Columns(1) column.Width = 150 etc etc -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking For mp3 ID Tag Module

2006-08-17 Thread Tim Daneliuk
Iñigo Serna wrote: > Hi Tim, > > try mutagen. http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen > > Regards, > Iñigo Many thanks - this looks promising... Tim Daneliuk [EMAIL PROTECTED] PGP Key: h

Re: Python2.5 RC1 vs sgmlop.c

2006-08-17 Thread skip
Robin> Just replaced three PyMem_DEL's with PyObject_FREE and things now Robin> work again. Can you send me a patch? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Curried class methods?

2006-08-17 Thread Carl Banks
Scott Lamb wrote: > I'm trying to dynamically generate class methods which have access to > some state passed in at creation time. (Basically as a workaround to > twisted's trial not having a way to dynamically add stuff. Plain > unittest seems to have TestSuite, but the trial runner doesn't know >

Re: modify element of a list.

2006-08-17 Thread Steve Holden
KraftDiner wrote: > Hi I have a list of Ojbects... I want to change one of the objects in > the list for a new object > How do I replace an existing object with a new one and maintain the > list order.. > > This is what I have... > > def setAttribute(self, desc, value): >n = anObject(desc

Re: Python2.5 RC1 vs sgmlop.c

2006-08-17 Thread Robin Becker
Steve Holden wrote: > Robin Becker wrote: ... >> Has anyone got any clue what the problem might be or a fixed version of the >> code? > > I'm guessing this might be to do with the changes that have been made to > enable 64-bit readiness in the code, but I couldn't suggest specifics. > > Sus

Re: modify element of a list.

2006-08-17 Thread Pierre Quentel
Hi, The most simple is to use the index of the element in the list : def setAttribute(self, desc, value): n = anObject(desc, value) for i,o in enumerate(self.Objects): if o.getDescription() == desc: self.Objects[i] = n return self.Objects.append(n) Pierre -- h

Re: The Semicolon Wars as a software industry and human condition

2006-08-17 Thread Ken Tilton
Xah Lee wrote: > > • What Languages to Hate, Xah Lee, 2002 > http://xahlee.org/UnixResource_dir/writ/language_to_hate.html Nonsense. This is technology, not religion. Technologists in fact have a responsibility to identify and use the best tools available. Xah, you are getting soft in your o

Re: Python2.5 RC1 vs sgmlop.c

2006-08-17 Thread Steve Holden
Robin Becker wrote: > I have a segfault problem in Python2.5 RC1 (win32) when using the venerable > extension sgmlop.c. > > In case that was just because our copy was very old I downloaded a later > source > from http://pyxml.cvs.sourceforge.net, but that code (version 1.14 loewis) > still >

Re: Python2.5 RC1 vs sgmlop.c

2006-08-17 Thread Robin Becker
Robin Becker wrote: > I have a segfault problem in Python2.5 RC1 (win32) when using the venerable > extension sgmlop.c. .. > Has anyone got any clue what the problem might be or a fixed version of the > code? I think this is PyObject_NEW mixed with PyMem_DEL, I thought that had already come

Re: List match

2006-08-17 Thread Stargaming
Richie Hindle schrieb: > [Stephen] > >>[...] compare 2 lists and generate a new list that does not copy similar >>entries. An example below >> >>list= ["apple", "banana", "grape"] >>list2=["orange","banana", "pear"] >> >>now I want to compare these lits and generate a third list after >>comparison

modify element of a list.

2006-08-17 Thread KraftDiner
Hi I have a list of Ojbects... I want to change one of the objects in the list for a new object How do I replace an existing object with a new one and maintain the list order.. This is what I have... def setAttribute(self, desc, value): n = anObject(desc, value) for o in self.Objects:

Re: sqlite3 or mysqldb?

2006-08-17 Thread Paul Boddie
John Salerno wrote: > I did a little experimentation with MySQL, and yesterday I was reading > up on SQLite. Since they both use the SQL language, does this mean that > the queries you write will be the same for both modules? They should be, but database system producers tend to enjoy varying the

Python2.5 RC1 vs sgmlop.c

2006-08-17 Thread Robin Becker
I have a segfault problem in Python2.5 RC1 (win32) when using the venerable extension sgmlop.c. In case that was just because our copy was very old I downloaded a later source from http://pyxml.cvs.sourceforge.net, but that code (version 1.14 loewis) still suffers from this problem. The probl

sqlite3 or mysqldb?

2006-08-17 Thread John Salerno
I did a little experimentation with MySQL, and yesterday I was reading up on SQLite. Since they both use the SQL language, does this mean that the queries you write will be the same for both modules? I'm sure there are slight differences for how you connect to DBs, but since they both use the s

Re: The Semicolon Wars as a software industry and human condition

2006-08-17 Thread J�rgen Exner
Iain King wrote: > Xah Lee wrote: >> Of interest: >> >> . The Semicolon Wars, by Brian Hayes. 2006. >> http://www.americanscientist.org/template/AssetDetail/assetid/51982 >> >> in conjunction to this article, i recommend: >> >> . Software Needs Philosophers, by Steve Yegge, 2006 >> http://xahlee.o

Re: The Semicolon Wars as a software industry and human condition

2006-08-17 Thread Iain King
Xah Lee wrote: > Of interest: > > • The Semicolon Wars, by Brian Hayes. 2006. > http://www.americanscientist.org/template/AssetDetail/assetid/51982 > > in conjunction to this article, i recommend: > > • Software Needs Philosophers, by Steve Yegge, 2006 > http://xahlee.org/Periodic_dosage_dir/_p/s

Re: iTunes Search Algorithm/Data Structure?

2006-08-17 Thread Diez B. Roggisch
Bill Mill schrieb: > Hello all, > > What data structure would you use to implement something analogous to > the iTunes search? I imagine that it must be a tree of some sort, but I > can't figure out an easy structure for it. > > Requirements (in case you haven't used it): > > You are given 4 row

1. Re: hide python code ! (enigmadude)

2006-08-17 Thread Ronny Abraham
Actually the reason you want to have one layer of encryption isn't to prevent someone from understanding what you wrote, it's so that if some company decides to "acquire" your code, they can't claim that you had it in the public domain. I think even the most pathetic encryption can serve this purp

Re: List match

2006-08-17 Thread Richard Brodie
"OriginalBrownster" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I know this probably is a very easy thing to do in python, but i wanted > to compare 2 lists and generate a new list that does not copy similar > entries. An example below > > list= ["apple", "banana", "grape"] > l

Re: How to delete a directory tree in FTP

2006-08-17 Thread T
That looks useful. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: The Semicolon Wars as a software industry and human condition

2006-08-17 Thread jmckitrick
What's more of a waste of time: 1. The 30 minutes he took to write his vacuous essay. 2. The 15 seconds it took to skim it and see nothing worth reading. 3. The 30 seconds it took to write this post. Tough call. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >