ANN: Pybots -- Python Community Buildbots

2006-08-17 Thread Grig Gheorghiu
The idea behind the Pybots project (short for Python Community Buildbots) is to allow people to run automated tests for their Python projects, while using Python binaries built from the very latest source code from the Python subversion repository. The idea originated from Glyph, of Twisted fame.

Re: Adding a char inside path string

2006-08-17 Thread Anthra Norell
Hitesh, You might want to try this: tricky_path_name = '\\serverName\\C:\\exe files\\example.exe -u ABC -g DEF' import SE Editor = SE.SE ('C:=C$: exe -=execlip here') edited_path_name = Editor (tricky_path_name) print edited_path_name# See what it did \serverName\C$:\exe

Re: Help with async xmlrpc design

2006-08-17 Thread Amit Khemka
On 8/17/06, David Hirschfield [EMAIL PROTECTED] wrote: I have an xmlrpc client/server system that works fine, but I want to improve performance on the client side. Right now the system operates like this: client makes request from server (by calling server.request() via xml-rpc) server

drawingarea problem

2006-08-17 Thread Rafał Janas
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? Thanks Rafal -- http://mail.python.org/mailman/listinfo/python-list

Re: PySequence_SetItem

2006-08-17 Thread Fredrik Lundh
John Machin wrote: Are you suggesting a rework of the manual instead of inserting a X in the offending py_DECREF? are you suggesting slowing things down just because of a bug in the documentation ? you cannot return an uninitialized list object to Python anyway, so there's no need to add

Re: PySequence_SetItem

2006-08-17 Thread Fredrik Lundh
Jack Diederich wrote: It is handy for functions that take a mutable list as an argument. an *existing*, and properly *initialized*, mutable sequence. PyList_New doesn't give you such an object. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: PySequence_SetItem

2006-08-17 Thread Fredrik Lundh
Jack Diederich wrote: For avoidance of doubt: the change is to use Py_XDECREF, yes/no? Yes. not necessarily: the bug is that you're using an uninitialized object in a context that expects an initialized object. might be a better idea to raise a SystemError exception. /F --

Re: Adding a char inside path string

2006-08-17 Thread Tim Williams
On 17/08/06, Sybren Stuvel [EMAIL PROTECTED] wrote: Dennis Lee Bieber enlightened us with: What happens when you get a pathname that looks like: \\who\cares\common.exe\program.exe Is that possible on Windows? At one point, I named a directory www.something.com and then it wouldn't

Looking For mp3 ID Tag Module

2006-08-17 Thread Tim Daneliuk
I have DAGS and generally nosed around the net but cannot quite find what I need. I am looking for a platform-independent Python module that would permit me to write mp3 ID tags conformant to the latest spects. I am currently calling 'mp3info' from my Python script, but that program is limited

wxPython GUI update with data from a MySQL database

2006-08-17 Thread Alina Ghergu
Hi there, I'm currently developing a GUI for a network monitor. I have to plot data taken from a MySQL database. For GUI I use wxPython, for plotting Matplotlib. The plotting has to be realtime, so I have to query the database periodically. I don't have enough experience in programming and I

Re: trouble understanding inheritance...

2006-08-17 Thread Steven D'Aprano
On Wed, 16 Aug 2006 12:53:12 -0700, KraftDiner wrote: Well how does one select which class baseClass really is when you contruct the object? What am I missing? a = typeA() b = typeB() c = baseClass(a) a = typeA() b = typeB() You're done. Stop there. I can see that this might

Re: wxPython GUI update with data from a MySQL database

2006-08-17 Thread Krzysztof Stachlewski
Alina Ghergu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have to query the database periodically. I don't have enough experience in programming and I would need some advice about the best approach in this matter. I tried to solve it using wx.Timer but from time to time

Re: PySequence_SetItem

2006-08-17 Thread John Machin
Fredrik Lundh wrote: John Machin wrote: Are you suggesting a rework of the manual instead of inserting a X in the offending py_DECREF? are you suggesting slowing things down just because of a bug in the documentation ? Not explicitly; not intentionally. you cannot return an

Re: hide python code !

2006-08-17 Thread Steven D'Aprano
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 determined thief will eventually steal your

Re: Looking For mp3 ID Tag Module

2006-08-17 Thread Iñigo Serna
Hi Tim, try mutagen. http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen Regards, Iñigo On 8/17/06, Tim Daneliuk [EMAIL PROTECTED] wrote: I have DAGS and generally nosed around the net but cannot quite find what I need. I am looking for a platform-independent Python module that

Re: wxPython GUI update with data from a MySQL database

2006-08-17 Thread Alina Ghergu
Krzysztof Stachlewski wrote: Alina Ghergu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have to query the database periodically. I don't have enough experience in programming and I would need some advice about the best approach in this matter. I tried to solve it

Re: hide python code !

2006-08-17 Thread Paul Boddie
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 in producing it. There are other

Re: Curried class methods?

2006-08-17 Thread Antoon Pardon
On 2006-08-17, Scott Lamb [EMAIL PROTECTED] 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

[廣告]徵人~兼職工作全職收入(可在家工作)

2006-08-17 Thread
Part-time job Full-time income 美商高科技生化公司加州百大企業來台拓展亞太市場 誠徵兼職人員,每日2~3小時,月入1萬~3萬 若你對網路工作有興趣,請至下列網站留下資料 請詳閱網站的內容並填寫履歷 索取電子書~便會有輔導員與你聯絡 98.to/專兼職工作 若你不是認真的請勿填寫,我們會經過篩選 請不要浪費你填寫履歷及我們觀看履歷的時間 -- 夫兵者不祥之器物或惡之故有道者不處君子居則貴左用兵則貴右兵者不祥之器非君子 之器不得已而用之恬淡為上勝而不美而美之者是樂殺人夫樂殺人者則不可得志於天下

Re: PySequence_SetItem

2006-08-17 Thread Fredrik Lundh
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 documentation has never been formally binding; if the documentation doesn't match the code,

Re: Compiling wxPython app for Windows; Single EXE

2006-08-17 Thread ajaksu
GHUM wrote: and with py2exe: Changes in 0.6.1: * py2exe can now bundle binary extensions and dlls into the library-archive or the executable itself. This allows to finally build real single-file executables. The bundled dlls and pyds are loaded at runtime by some

Re: MySQLdb installation error

2006-08-17 Thread hiaips
What I'm getting at is that it looks like one of these arch flags needs to be removed, as a previous poster said. I remember having a similar issue with an arch flag when installing some Python module (don't remember whether it was MySQLdb or not), and I fixed it by installing the Universal SDK

PythonCard question

2006-08-17 Thread DarkBlue
Is it possible to create pythoncard textField components dynamically during run time ? Something on the lines of pseudo code : def make_textfield(length,topleftposx,topleftposy): doit self.make_textfield(120,20,20) Thanks for any ideas. --

Read Picasa metadata using Python?

2006-08-17 Thread Thomas W
I know this is slightly off-topic, but since Python is hot at Google and several key members from the python community works there, I was hoping to get some help on this subject. I want to create a small app that reads my Picasa-metadata related to a specified image and uploads my image and

Re: OT: p-gal website

2006-08-17 Thread ajaksu
John Bokma wrote: ajaksu [EMAIL PROTECTED] wrote: Don't :) Even Firefox developers will tell you to avoid this. Develop for standards compliant browsers (including Firefox) by testing against the standards. Neither your HTML or CSS pass validation, both due to minor, easy-to-fix

Re: PythonCard question

2006-08-17 Thread [EMAIL PROTECTED]
DarkBlue wrote: Is it possible to create pythoncard textField components dynamically during run time ? Something on the lines of pseudo code : def make_textfield(length,topleftposx,topleftposy): doit self.make_textfield(120,20,20) Thanks for any ideas. The noresource.py sample

Re: Python form Unix to Windows

2006-08-17 Thread Harry George
Simon Forman [EMAIL PROTECTED] writes: [snip] Simplest way: Run the app in windows, see what breaks (probably less than you might think), fix it. I have written large apps that required less than a dozen, or no, changes to move between windows and *nix. YMMV Peace, ~Simon I agree

Re: wxPython Grid Question

2006-08-17 Thread ajaksu
Jordan wrote: Hey Peoples, I'm wonderg if there is a way to make a subclass of wx.grid.Grid in which the coloumn labels for the grid appear on the bottom of the grid instead of the top. Hi Jordan :) Not quite what you want, but I'm about to try faking labels in a grid. The reason is that I

The Semicolon Wars as a software industry and human condition

2006-08-17 Thread Xah Lee
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/software_phil.html • What

List match

2006-08-17 Thread OriginalBrownster
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 want to compare these lits and generate a third list

Re: List match

2006-08-17 Thread Richie Hindle
[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 list3 would be [apple,

iTunes Search Algorithm/Data Structure?

2006-08-17 Thread Bill Mill
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 rows in a list view: [[alpha, beta],

2.4.3, unittest and socket logging

2006-08-17 Thread Chris Curvey
Hi all, I just upgraded to 2.4.3 (from 2.4.1) on Windows. Now each time I run my unit tests, they always throw this error at the end of the test run: Error in atexit._run_exitfuncs: Traceback (most recent call last): File c:\python24\lib\atexit.py, line 24, in _run_exitfuncs func(*targs,

RELEASED Python 2.5 (release candidate 1)

2006-08-17 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the first RELEASE CANDIDATE of Python 2.5. This is not yet the final release - it is not suitable for production use. It is being released to solicit feedback and hopefully expose bugs, as well as allowing

Re: List match

2006-08-17 Thread [EMAIL PROTECTED]
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 want to compare these

Re: List match

2006-08-17 Thread [EMAIL PROTECTED]
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 want to compare these

py2exe and COM problem

2006-08-17 Thread Naytie
I seem to have a problem with a generated .exe file made with py2exe. I wrote a python program that creates tables in a Word document and adjusts the size of the tables and then inputs text into each cell using COM. Everything works well and I do not get errors using Boa constructor. However when

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

2006-08-17 Thread DJ Stunks
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

Re: Read Picasa metadata using Python?

2006-08-17 Thread jay graves
Thomas W wrote: Anyway, if there are any other app allready reading Picasa metadata with Flickr-support that you know of that would save me alot of work/hassle. Still, Picasa is great, but I would really like access to my own metadata outside Picasa and I want to use python to do it. I've

Re: Printing n elements per line in a list

2006-08-17 Thread Neil Cerutti
On 2006-08-15, unexpected [EMAIL PROTECTED] wrote: If have a list from 1 to 100, what's the easiest, most elegant way to print them out, so that there are only n elements per line. So if n=5, the printed list would look like: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 etc. My search through

Re: Adding a char inside path string

2006-08-17 Thread Grant Edwards
On 2006-08-17, Sybren Stuvel [EMAIL PROTECTED] wrote: Dennis Lee Bieber enlightened us with: What happens when you get a pathname that looks like: \\who\cares\common.exe\program.exe Is that possible on Windows? Sure. Why wouldn't it be? At one point, I named a directory

Re: wxmsw26uh_vc.dll not found when using wxAgg backend

2006-08-17 Thread ajaksu
Hi Sam, Sam wrote: I've installed matplotlib recently because I want to add graphing functionality to a GUI that i'm making. Have you considered wxmpl? I'm leaning towards using it, Painless matplotlib embedding in wxPython sounds good (and it even works). More information and downloads at

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

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: 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]

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

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 rows in a

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

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

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

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

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

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: 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 list3 would be [apple,

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 in

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 suffers

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 old

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 --

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. Suspect all

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, value)

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: 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: 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:

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

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

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

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

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/ --

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 bitten

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 strings and

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: 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 documentation has

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 determined thief will

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

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 ] =

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

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: 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 for

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, data ):

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 in

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 Building, its

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 path-to/somefile.ext

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, data ):

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.

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

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'

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 there

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: 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):

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: 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 you

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 to

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 to

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 send the HTTP POST

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: 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 you

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

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

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

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

  1   2   >