Re: Conditionally implementing __iter__ in new style classes

2005-07-08 Thread Bengt Richter
On Thu, 07 Jul 2005 22:04:31 +0200, Thomas Heller [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Bengt Richter) writes: On Thu, 07 Jul 2005 09:51:42 +0200, Thomas Heller [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Bengt Richter) writes: On Wed, 06 Jul 2005 17:57:42 +0200, Thomas Heller [EMAIL

python nested class

2005-07-08 Thread Vedanta Barooah
greetings in a python nested class is it possible to change the value of the parent class's variable without actually creating an instance of the parent class, consider this code: class mother: x=0 def __init__(self): self.x=1 def show(self):

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-08 Thread Christopher Subich
Ron Adam wrote: Christopher Subich wrote: As others have mentioned, this looks too much like a list comprehension to be elegant, which also rules out () and {}... but I really do like the infix syntax. Why would it rule out ()? Generator expressions. Mind you, Py3k might want to

Re: Use cases for del

2005-07-08 Thread Ron Adam
Steven D'Aprano wrote: Ron Adam wrote: def count_records(record_obj, start=0, end=len(record_obj)): That would work really well, except that it doesn't work at all. Yep, and I have to stop trying to post on too little sleep. Ok, how about... ? def count_records(record_obj, start=0,

mail sending using telnet in python

2005-07-08 Thread praba kar
Dear All, Normally we can send mail using telnet in linux. In the following way [~user]telnet Ipaddress 25 mail from: [EMAIL PROTECTED] 250 o.k(response of from commandline) rcpt to: [EMAIL PROTECTED] 250 o.k(response of from commandline) data 354 go ahead(response of from commandline) Hello

Re: Options to integrate Python modules into native windows applications

2005-07-08 Thread Do Re Mi chel La Si Do
Hi ! I use, intensively, Python, via COM PyWin32, from Paradox (Object-Pal), VBScript, Excel, Word, Internet-explorer, AutoIt, etc. It is simple, powerful and extensible dynamically. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: python nested class

2005-07-08 Thread Roland Heiber
Vedanta Barooah wrote: o = mother() o.show() y=mother.child() y.increase(20) # this should print 20 o.show() .. is it possible somehow ??? Hi, this should do what you want: --- test.py class mother: x=0 def __init__(self): mother.x=1 def

Re: (Win32 API) callback to Python, threading hiccups

2005-07-08 Thread Gregory Bond
Tim Roberts wrote: PyGILState_STATE gil = PyGILState_Ensure(); result = PyEval_CallObject(my_callback, arglist); PyGILState_Release(gil); Py_DECREF(arglist); Py_DECREF(result); If someone else holds a reference to arglist, then the

Re: Calculating average time

2005-07-08 Thread Peter Tillotson
have a look at the timeit module aswell GregM wrote: Hi, I'm hoping that someone can point me in the right direction with this. What I would like to do is calculate the average time it takes to load a page. I've been searching the net and reading lots but I haven't found anything that helps

Re: python nested class

2005-07-08 Thread bruno modulix
Roland Heiber wrote: Vedanta Barooah wrote: o = mother() o.show() y=mother.child() y.increase(20) # this should print 20 o.show() .. is it possible somehow ??? Hi, this should do what you want: --- test.py class mother: x=0 def __init__(self):

Re: mail sending using telnet in python

2005-07-08 Thread Max M
praba kar wrote: Dear All, Normally we can send mail using telnet in linux. In the following way Is it possible to run same thing same manner in python? If possible kindly help me with specimen code. Actually I gone through telnetlib module documentation but I cann't get solution

Re: mail sending using telnet in python

2005-07-08 Thread Jorgen Grahn
On Fri, 8 Jul 2005 07:49:25 +0100 (BST), praba kar [EMAIL PROTECTED] wrote: Dear All, Normally we can send mail using telnet in linux. In the following way [~user]telnet Ipaddress 25 mail from: [EMAIL PROTECTED] 250 o.k(response of from commandline) ... That is sometimes a very useful

Re: Pattern question

2005-07-08 Thread bruno modulix
cantabile wrote: Hi, I'm trying to write a small installer for a server. But this program should be able to run in the future under heterogenous environments and os (at least linux/windows). I mean, the install will be done either in text mode or curses or gtk or tk, either in debian or

Re: PyX, matplotlib, 3D LaTeX

2005-07-08 Thread Francisco Borges
Robert Kern wrote: Matthias R. wrote: Unfortunately matplotlib is only a 2D-plotting library. Do you know another one with 3D-capabilities as well? There's PyX. Sorry, PyX can't do 3D plots. --- I like PyX, use it a lot and would suggest it as a

Re: mail sending using telnet in python

2005-07-08 Thread Piet van Oostrum
praba kar [EMAIL PROTECTED] (PK) wrote: PK Normally we can send mail using PK telnet in linux. In the following way PK [~user]telnet Ipaddress 25 In fact you are using SMTP through the telnet program. So in Python use the smtplib module. -- Piet van Oostrum [EMAIL PROTECTED] URL:

Re: PyX, matplotlib, 3D LaTeX

2005-07-08 Thread Francisco Borges
Francisco Borges wrote: 1. it takes more lines of code (than what I fell is needed) to do it; 2. it (still) lacks easy ways to do frequent things (like filling) Sorry, I just realised the piece of nonsense I just wrote... PyX does fill objects very easily, what it does take lot's of work to

Re: Pattern question

2005-07-08 Thread cantabile
bruno modulix a écrit : You may want to have a look at the Factory pattern... # outrageously oversimplified dummy exemple class Gui(object): def __init__(self, installer): self.installer = installer class PosixGui(Gui): pass class Win32Gui(Gui): pass class

Re: Scipy - Latex Annotations in plots

2005-07-08 Thread Brian Elmegaard
Matthias R. [EMAIL PROTECTED] writes: Unfortunately matplotlib is only a 2D-plotting library. Do you know another one with 3D-capabilities as well? That would be very nice, You can quite easily write a function that produces metapost code. Featpost is the best 3d-lib for that, afaik. The

Re: f*cking re module

2005-07-08 Thread paron
That is so handy!! Thanks! Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: f*cking re module

2005-07-08 Thread François Pinard
[Mike Meyer] Steven D'Aprano [EMAIL PROTECTED] writes: Is there any possible sequence of bytes that will not be a valid Perl expression or operator? Perl has lots of syntax, and good warning facilities, it is not so bad. [...] TECO, where guessing what your name did as a command sequence

Query

2005-07-08 Thread Girish
Hi, Can we control keyboard and mouse actions using python scripts in Linux environment? plz do reply. Regards Girish -- http://mail.python.org/mailman/listinfo/python-list

Re: Use cases for del

2005-07-08 Thread George Sakkis
Ron Adam [EMAIL PROTECTED] wrote: Here's something interesting: import time x = None t = time.time() for i in range(100): if x==None: pass print 'None:',time.time()-t x = 'to-end' t = time.time() for i in range(100): if x=='to-end': pass print

Re: Query

2005-07-08 Thread Jeff Epler
python-xlib includes an implementation of the xtest extension, which is enabled on most users' X servers, and can be used to send arbitrary keyboard or mouse events. jeff pgpo7pqhBafPe.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Module Exposure

2005-07-08 Thread Thomas Lotze
Jacob Page wrote: better-named, Just a quick remark, without even having looked at it yet: the name is not really descriptive and runs a chance of misleading people. The example I'm thinking of is using zope.interface in the same project: it's customary to name interfaces ISomething. --

Obj.'s writing self-regeneration script ?

2005-07-08 Thread Bas Michielsen
Hello, Is there a good/standard way of having (composite) objects write a Python script which will regenerate the very same object ? This problem arises when I construct, for example, a ComputationalProblem object, possibly through an object editor GUI, importing data structures from external

Re: pickle alternative

2005-07-08 Thread TZOTZIOY
On 4 Jul 2005 19:45:07 -0700, rumours say that [EMAIL PROTECTED] might have written: Time and space efficiency, and security do not have to be mutually exclusive features of a serializer. Python does not provide, in the standard library, a serializer which can work safely with

Re: Ann: The first PyWeek Python Game Programming Competition

2005-07-08 Thread Lee Harr
See the competition timetable (including competition dates in various timezones), rules, sign-up (commencing 6th August) at: http://www.mechanicalcat.net/tech/PyWeek Sounds like fun. One thing. From the website ... Clip Art note: more links welcome How about:

Trainee Developer / Consultant Vacancy at ReportLab, London

2005-07-08 Thread John J. Lee
Vacancy at ReportLab, London ReportLab develop enterprise reporting and document generation solutions using cutting-edge Python technology, and have a growing business with an excellent blue chip customer base. You may also know us from our open source PDF and graphics library... We have a job

Re: Polling, Fifos, and Linux

2005-07-08 Thread Andreas Kostyrka
On Thu, Jul 07, 2005 at 10:21:19PM -0700, Jacob Page wrote: Jeremy Moles wrote: This is my first time working with some of the more lower-level python stuff. I was wondering if someone could tell me what I'm doing wrong with my simple test here? Basically, what I need is an easy way

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-08 Thread Guy Lateur
Yes! I finally got it to work. I've written a VBscript which I'll call from python. It uses Outlook.Redemption's SafeMailItem. No need to use IMAP or whatever services. Only weird thing is it doesn't put the msg in the Inbox, as I intended, but in the Drafts folder. Well, never mind that, it's

Snakespell

2005-07-08 Thread [EMAIL PROTECTED]
I used to use Snakespell from scriptfoundry to do spellchecking on my website (www.peterbe.com/search?q=pyton) but now that I've moved server and wiped the old machine I forgot to take with me the Snakespell code. www.scriptfoundry.com where it used to live seems to have expired. Does anybody

Re: Windows Cmd.exe Window

2005-07-08 Thread Peter Herndon
Giles, you keep mentioning syntax errors as the (/a) cause of the problem. I suggest you avoid such problems, so that the import sethook approach, et al. will actually work. The easiest thing to do is to run PyChecker on your script prior to executing it. PyChecker will catch your syntax errors

[ANN] pkpgcounter v1.55 is out

2005-07-08 Thread Jerome Alet
Hi there, I'm pleased to announce the immediate availability of pkpgcounter v1.55 pkpgcounter is a 100% Python written, GNU GPLed, Page Description Language (PDL) parser. pkpgcounter's goal is to compute and display the number of pages needed to print documents. pkpgcounter was part of the

Re: Options to integrate Python modules into native windows applications

2005-07-08 Thread Philippe C. Martin
Hi, Thanks for your answers, has anyone also used .net for Python ? Regards, Philipe Philippe C. Martin wrote: Hi, I am looking for the pros and cons as to how to integrate a Python module into a Windows native application. So far I have looked at 1) coding the C wrapper myself

Re: Obj.'s writing self-regeneration script ?

2005-07-08 Thread Jerome Alet
Hi, Le Fri, 08 Jul 2005 15:16:21 +0200, Bas Michielsen a écrit : Is there a good/standard way of having (composite) objects write a Python script which will regenerate the very same object ? I've done something like this for the ReportLab toolkit. Last time I checked, this was still part of

ANN: python-constraint 1.0

2005-07-08 Thread Gustavo Niemeyer
Overview **python-constraint** [1]_ is a Python module offering solvers for Constraint Solving Problems (CSPs) over finite domains in simple and pure Python. CSP is class of problems which may be represented in terms of variables (`a`, `b`, ...), domains (`a in [1, 2, 3]`, ...),

Re: Obj.'s writing self-regeneration script ?

2005-07-08 Thread Bas Michielsen
Jerome Alet wrote: Hi, Le Fri, 08 Jul 2005 15:16:21 +0200, Bas Michielsen a écrit : Is there a good/standard way of having (composite) objects write a Python script which will regenerate the very same object ? I've done something like this for the ReportLab toolkit. Last time I

psycopg simplest problem

2005-07-08 Thread Glauco
I'm rebuilding my old library i've done some year ago using python and postgres. My problem is to do a middle layer over pycopg for eliminate type casting problem in postgres in all direction. i've resolved this doing a C extension in python and manipulating only string and int in my

Learning Python - IM Wiki

2005-07-08 Thread Jorge Louis De Castro
Hello, I am a Java Developer that has been learning Python by doing simple things. I am loving thisinitial vibeI'mgetting outof Python. However, because I feel programmers ofa certainlanguagesbring with them certain vices when moving to other languages, I'd like to have feedback from

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-08 Thread Guy Lateur
python version: import win32com.client myOL = win32com.client.Dispatch(Outlook.Application) myNS = myOL.GetNamespace(MAPI) sItem = win32com.client.Dispatch(Redemption.SafeMailItem) myDestBox = myNS.GetDefaultFolder(6) oItem = myDestBox.Items.Add(0) sItem.Item = oItem

Re: psycopg simplest problem

2005-07-08 Thread Gerhard Haering
On Fri, Jul 08, 2005 at 04:23:50PM +0200, Glauco wrote: [...] My problem is to do a middle layer over pycopg for eliminate type casting problem in postgres in all direction. i've resolved this doing a C extension in python and manipulating only string and int in my application. this is

Re: f*cking re module

2005-07-08 Thread Rocco Moretti
François Pinard wrote: I once worked with a PL/I compiler (on a big IBM mainframe), which was trying to be helpful by spitting pages of: Error SUCH AND SUCH, assuming that THIS AND THIS was meant. and continuing compilation nevertheless. It was a common joke to say that PL/I would

[PythonWin] how to stop execution in interactive window?

2005-07-08 Thread siggy2
Hi All, (sorry for my bad english) I wrote a __tiny__ and __stupid__ recursive script directly into pythonwin interactive window with a time.sleep(1) and a print before each recursion... I should have taken a closer look at the ending condition (never satisfied!), anyway I was quite confident

Python Windows Install Problem (Error #2755)

2005-07-08 Thread Carl, Andrew
Title: Python Windows Install Problem (Error #2755) Please find attached a PDF file (removed due to size) containing (2) print-screen images of an error (Code # 2755) occuring during attempted installation of python for windows, version 2.4.1 (on PC using MS2000). Any help would be

Re: import Help Needed - Newbie

2005-07-08 Thread Dan
On 7/7/2005 5:50 PM, GregM wrote: A search on google for odbchelper resulted in: http://linux.duke.edu/~mstenner/free-docs/diveintopython-3.9-1/py/odbchelper.py I think this will help you. Greg. That is the previous example which worked for me fine. I have this code on a network drive

Re: Use cases for del

2005-07-08 Thread Scott David Daniels
Ron Adam wrote: Here's something interesting: import time x = None t = time.time() for i in range(100): if x==None: pass print 'None:',time.time()-t x = 'to-end' t = time.time() for i in range(100): if x=='to-end': pass print

Re: psycopg simplest problem

2005-07-08 Thread Glauco
Gerhard Haering wrote: On Fri, Jul 08, 2005 at 04:23:50PM +0200, Glauco wrote: [...] My problem is to do a middle layer over pycopg for eliminate type casting problem in postgres in all direction. i've resolved this doing a C extension in python and manipulating only string and int in my

Re: f*cking re module

2005-07-08 Thread Kay Schluehr
jwaixs schrieb: arg... I've lost 1.5 hours of my precious time to try letting re work correcty. 1.5 hours are not enough for understanding regular expressions. But to be honest: I never had the patience to learn them accurately and I guess I will never do so as well as I don't ever learn sed or

Re: Pattern question

2005-07-08 Thread Scott David Daniels
cantabile wrote: bruno modulix a écrit : You may want to have a look at the Factory pattern... ... demo of class Factory ... Taking advantage of Python's dynamic nature, you could simply: # similarly outrageously oversimplified dummy example class Gui(object): def

Re: [PythonWin] how to stop execution in interactive window?

2005-07-08 Thread F. GEIGER
Right-click on the Pythonwin icon in the tray and select Break into running code. HTH Franz GEIGER [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi All, (sorry for my bad english) I wrote a __tiny__ and __stupid__ recursive script directly into pythonwin interactive

Re: Options to integrate Python modules into native windows applications

2005-07-08 Thread Do Re Mi chel La Si Do
Re Hi ! I had only test (little) Python for .Net ; OK, it's run. It is possible to make winform from Python. And I had try to use Python for .Net from my COM-server, and from VBscript. OK also. Plus, I had try to call my Python-server-COM, from C# : OK it's run. C# can use Python. And, I

socket code

2005-07-08 Thread ronpro
Hello, I'm trying to create a broadcast socket in some portable code (windows XP mandrake linux). When I run the following lines through idle: import socket s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM ) s.connect( ('broadcast', 17100) ) On windows, connect() returns and I have a

Re: Use cases for del

2005-07-08 Thread Daniel Dittmar
Scott David Daniels wrote: Testing for None should be an is-test (not just for speed). In older pythons the == result wasn't necessarily same as is-test. This made sense to me after figuring out NULL in database stuff. NULL in SQL databases has nothing to do with Python None. I'm quite sure

Re: PyX, matplotlib, 3D LaTeX

2005-07-08 Thread Fernando Perez
Francisco Borges wrote: I like PyX, use it a lot and would suggest it as a beter plotting library than the ones at Scipy (for as long as you don't need on-screen plotting). FWIW, the plotting support in scipy is essentially unmaintained and abandoned, since the advent of matplotlib. It

Re: socket code

2005-07-08 Thread Grant Edwards
On 2005-07-08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I'm trying to create a broadcast socket in some portable code (windows XP mandrake linux). When I run the following lines through idle: import socket s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM ) s.connect(

file handling in a server (.py) file using xmlrpc

2005-07-08 Thread uwb
I've got a call to glob in a .py file sitting in an apache cgi-bin directory which refuses to work while the exact same code works from a python console session. I'm guessing that in order to read or write files from any sort of a script file sitting in the cgi-bin directory on a server,

Compiler error recovery [was: Re: f*cking re module]

2005-07-08 Thread François Pinard
[Rocco Moretti] François Pinard wrote: I once worked with a PL/I compiler (on a big IBM mainframe), which was trying to be helpful by spitting pages of: Error SUCH AND SUCH, assuming that THIS AND THIS was meant. and continuing compilation nevertheless. It was a common joke to say

Re: Modules for inclusion in standard library?

2005-07-08 Thread Gregory Piñero
Has anyone recommended ftputil? Either add that to the library or make the existing ftp module more high level would be my suggestion. http://www.sschwarzer.net/python/python_software.html -Greg On 7 Jul 2005 05:38:28 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 1. LDAP module should

Re: f*cking re module

2005-07-08 Thread Mike Meyer
Rocco Moretti [EMAIL PROTECTED] writes: François Pinard wrote: If your program had only minor errors, there was likely a good chance that the compiler might guess correctly, and your program would compile to what you wanted in the first place. If not, by continuing on, the compiler can flag

Re: file handling in a server (.py) file using xmlrpc

2005-07-08 Thread Jeremy Jones
uwb wrote: I've got a call to glob in a .py file sitting in an apache cgi-bin directory which refuses to work while the exact same code works from a python console session. I'm guessing that in order to read or write files from any sort of a script file sitting in the cgi-bin directory on a

Re: VC++ linking problem

2005-07-08 Thread Miki Tebeka
Hello J, I will put a hold on compiling the latest version until I really have to. I will probably switch to VC 7 before that. You can use the (free) MinGW compiler (www.mingw.org). It can build extension that link to Python 2.4. Just use distutils setup.py and run 'python setup.py build_ext

Re: Use cases for del

2005-07-08 Thread Roy Smith
Daniel Dittmar [EMAIL PROTECTED] wrote: In a SQL database, NULL = NULL will always return NULL, which is prety much the same as FALSE. Except for NOT, AS NOT NULL is NULL. SQL's NULL is very much akin to the IEEE NaN (not quite, but close). --

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-08 Thread Steven Bethard
Christopher Subich wrote: Ron Adam wrote: I think the association of (lambda) to [list_comp] is a nice distinction. Maybe a {dictionary_comp} would make it a complete set. ;-) Yeah, dictionary comprehensions would be an interesting feature. :) Syntax might be a bit unwieldy, though, and

[ANNOUNCE] pysudoku 0.1

2005-07-08 Thread Glenn Hutchings
Announcing PySuDoku version 0.1, yet another Sudoku program written in Python. But this one has features that I don't see in any of the others: * Cute interactive solving mode via Tkinter. * Puzzle generation option, for making your own puzzles. * Nicely packaged for installation via

Having trouble importing against PP2E files

2005-07-08 Thread Charles Krug
List: I'm trying to use the example files from Programming Python, 2nd Ed. I've copied them into c:\Python24\Examples\PP2E. Launching any of the examples programs by themselves seems to work spiffily. Using regedit, I appended c:\Python24\Examples\PP2E to Pythonpath from the immediate window,

Re: Snakespell

2005-07-08 Thread Skip Montanaro
peter I used to use Snakespell from scriptfoundry to do spellchecking peter on my website (www.peterbe.com/search?q=pyton) but now that I've peter moved server and wiped the old machine I forgot to take with me peter the Snakespell code. peter www.scriptfoundry.com where it

Re: Learning Python - IM Wiki

2005-07-08 Thread Miki Tebeka
Hello Jorge, Is there some sort of a Wiki where I could post the code and have advice on what, how and where to improve? Or should I post the code it here? You can always get help here, the Python community is *very* helpful. If you prefer a Wiki, try www.wikispaces.org for free Wiki

Re: Seeking IDE

2005-07-08 Thread Nick Vargish
Jags [EMAIL PROTECTED] writes: If you don't like that, you could use any of the following editors: EditPlus, TextPad, UltraEdit, WingIDE, Komodo (from ActiveState) or jEdit. All these are Windows based. Komodo is available for Linux and Windows, and ActiveState will be releasing a version

can't start new thread

2005-07-08 Thread jdonnell
I'm at a loss on this one. I have a multithreaded script that gets 'thread.error: can't start new thread' errors seemingly randomly. I just got it right after starting the script when it was trying to create the 5th thread. Usually the script will run for a while before throwing this error, but

Re: Learning Python - IM Wiki

2005-07-08 Thread gene tani
The python tutor good for this http://mail.python.org/mailman/listinfo/tutor Miki Tebeka wrote: Hello Jorge, Is there some sort of a Wiki where I could post the code and have advice on what, how and where to improve? Or should I post the code it here? You can always get help

Re: distutils is able to handle...

2005-07-08 Thread François Pinard
[George Sakkis] I would suggest SCons (http://www.scons.org/), a modern make/automake/autoconf replacement that uses python for its configuration files instead of yet another cryptic half-baked mini-language or XML. Python might not be the most legible way to describe what a Makefile has to

Re: Polling, Fifos, and Linux

2005-07-08 Thread Donn Cave
In article [EMAIL PROTECTED], Andreas Kostyrka [EMAIL PROTECTED] wrote: On Thu, Jul 07, 2005 at 10:21:19PM -0700, Jacob Page wrote: Jeremy Moles wrote: This is my first time working with some of the more lower-level python stuff. I was wondering if someone could tell me what I'm doing

pygtk does ... ?

2005-07-08 Thread Thomas Bartkus
I am experimenting (flailing around?) with glade and python. Both under MS Windows and Linux. I understand why I want to import gtk It gives me access to the critical gui program loop gtk.main() and main_quit() I am also very grateful for import gtk.glade This lets me open my xml format

Re: Lisp development with macros faster than Python development?..

2005-07-08 Thread Kirk Job Sluder
Kay Schluehr [EMAIL PROTECTED] writes: This might be a great self experience for some great hackers but just annoying for others who used to work with modular standard librarys and think that the border of the language and an application should be somehow fixed to enable those. In what way

FORTRAN like formatting

2005-07-08 Thread Einstein, Daniel R
Title: FORTRAN like formatting Hi, Sorry for this, but I need to write ASCII from my Python to be read by FORTRAN and the formatting is very important. Is there any way of doing anything like: write(*,'(3( ,1pe20.12))') (variable) In other words, I want three columns 20 spaces long,

Re: Python Module Exposure

2005-07-08 Thread Jacob Page
Thomas Lotze wrote: Jacob Page wrote: better-named, Just a quick remark, without even having looked at it yet: the name is not really descriptive and runs a chance of misleading people. The example I'm thinking of is using zope.interface in the same project: it's customary to name

Re: file handling in a server (.py) file using xmlrpc

2005-07-08 Thread uwb
Jeremy Jones wrote: uwb wrote: I've got a call to glob in a .py file sitting in an apache cgi-bin directory which refuses to work while the exact same code works from a python console session. I'm guessing that in order to read or write files from any sort of a script file sitting in the

Re: FORTRAN like formatting

2005-07-08 Thread Cyril BAZIN
Hello, I don't anderstand very well Fortran syntax, but want you say something like that: def toTable(n1, n2, n3): return %20s%20s%20s%tuple([%.12f%x for x in [n1, n2, n3]]) Example: import math toTable(math.pi, 10, 8.2323) ' 3.141592653590 10. 8.2323'

Legacy data parsing

2005-07-08 Thread gov
Hi, I've just started to learn programming and was told this was a good place to ask questions :) Where I work, we receive large quantities of data which is currently all printed on large, obsolete, dot matrix printers. This is a problem because the replacement parts will not be available for

Re: file handling in a server (.py) file using xmlrpc

2005-07-08 Thread Jeremy Jones
uwb wrote: Jeremy Jones wrote: uwb wrote: I've got a call to glob in a .py file sitting in an apache cgi-bin directory which refuses to work while the exact same code works from a python console session. I'm guessing that in order to read or write files from any sort of a script file

Re: Legacy data parsing

2005-07-08 Thread Jeremy Jones
gov wrote: Hi, snip If anyone could give me suggestions as to methods in sorting this type of data, it would be appreciated. Maybe it's overkill, but I'd *highly* recommend David Mertz's excellent book Text Processing in Python: http://gnosis.cx/TPiP/ Don't know what all you're

Re: Legacy data parsing

2005-07-08 Thread Miki Tebeka
Hello gov, Here's an example of the raw text that I have to work with: ADDRESS INFORMATION/RENSEIGNEMENTS SUR L'ADRESSE: FOR/POUR AL/LA: 20 CORR TYP: A1B 2C3 P:3 CHNGD/CHANG LANG: E CONS/REGR: ### MRS XXX X XXX ###

Defending Python

2005-07-08 Thread Charlie Calvert
I perhaps rather foolishly wrote two article that mentioned Python as a good alternative language to more popular tools such as C# or Java. I encountered more resistance than I had expected. If someone who really knows a lot about Python would like to go over to the CodeFez website and defend

qustion about build Python on the Solaris 9

2005-07-08 Thread Hu, Bizhong
Greeting to All: I am trying to build python-2.4.1 on the sun solairs 9 on SPARC hardware as a 64 bits application. I have all the compiler switch setup and python build is completed. But when the makefile try to Run python setup.py command, It coredumped. My question is that is

Re: Having trouble importing against PP2E files

2005-07-08 Thread Elmo Mäntynen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Charles Krug wrote: List: I'm trying to use the example files from Programming Python, 2nd Ed. I've copied them into c:\Python24\Examples\PP2E. Launching any of the examples programs by themselves seems to work spiffily. Using regedit, I

Re: Legacy data parsing

2005-07-08 Thread Christopher Subich
gov wrote: Hi, I've just started to learn programming and was told this was a good place to ask questions :) Where I work, we receive large quantities of data which is currently all printed on large, obsolete, dot matrix printers. This is a problem because the replacement parts will not

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-08 Thread George Sakkis
Steven Bethard [EMAIL PROTECTED] wrote: Christopher Subich wrote: Ron Adam wrote: I think the association of (lambda) to [list_comp] is a nice distinction. Maybe a {dictionary_comp} would make it a complete set. ;-) Yeah, dictionary comprehensions would be an interesting feature. :)

Re: file handling in a server (.py) file using xmlrpc

2005-07-08 Thread uwb
Jeremy Jones wrote: The script executes, no error messages, but the glob call turns up nothing while the identical call running from a console does in fact turn up files names as expected. Wild guess, but I'm thinking your webserver process doesn't have permissions to look in your

Re: Legacy data parsing

2005-07-08 Thread Thomas Bartkus
gov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I've just started to learn programming and was told this was a good place to ask questions :) Where I work, we receive large quantities of data which is currently all printed on large, obsolete, dot matrix printers. This is

Re: Options to integrate Python modules into native windows applications

2005-07-08 Thread Do Re Mi chel La Si Do
Hi ! Your english is fine. Ce n'est pas mon anglais. Babelfish m'a beaucoup aidé. @-salutations -- Michel Claveau mél : http://cerbermail.com/?6J1TthIa8B sites : http://mclaveau.com http://bergoiata.org http://ponx.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Legacy data parsing

2005-07-08 Thread [EMAIL PROTECTED]
Where I work, we receive large quantities of data which is currently all printed on large, obsolete, dot matrix printers. This is a problem because the replacement parts will not be available for much longer. So I'm trying to create a program which will capture the fixed width text file

Re: python nested class

2005-07-08 Thread George Sakkis
Daniel Dittmar [EMAIL PROTECTED] wrote: Vedanta Barooah wrote: in a python nested class is it possible to change the value of the parent class's variable without actually creating an instance of the parent class Python nested classs are like *static* Java nested classes. Non-static Java

pylize 1.2b released

2005-07-08 Thread Christopher Arndt
pylize 1.2b relased More than three years after the last release I finally pulled myself together and am now happy to announce a maintenance release for pylize that also brings some new features. From time to time I have been receiving questions and comments from users, which indicated that

Re: removing list comprehensions in Python 3.0

2005-07-08 Thread Kay Schluehr
Steven Bethard schrieb: I think the jury's still out on this one: * Alex Martelli expects list comprehensions to be removed. [1] * Robert Kern wants list comprehensions removed. [2] * Raymond Hettinger encourages continued use of list comprehensions [3] * Jeremy Bowers thinks list

embedding a new method

2005-07-08 Thread J
Hi everyone, I am fairly new to python (3rd day), but i am fairly keen on replacing javascript. I want to externalize some of the mehtod in my App, an allow user to imp char* lBuffer = def handler(color):\n print 12 PyObject* lCode = Py_CompileString(lBuffer,

Re: embedding a new method

2005-07-08 Thread J
If your are reading this, I am sorry but I forgot to finish the first paragraph :(. I am trying to externalize some methods of a C++ object using python. User will be able to implement the function via the GUI and I then would like to add it to an instance... So the class consits of both

Re: psycopg simplest problem

2005-07-08 Thread Gerhard Häring
Glauco wrote: [...] Gerhard thank you very much, this example explain me some idea, but anyway don't resolve the core question. In you example when dateVal is a None or textVal is none. argument x must be DateTime, not None. so i must manipulate for the empty string or None cases No, you

Re: calling python procedures from tcl using tclpython

2005-07-08 Thread Jeff Hobbs
chand wrote: can anyone help me how to provide the info about the python file procedure in the tcl script which uses tclpython i.e., is there a way to import that .py file procedure in the tcl script currently I have wriiten this tcl code which is not working package require tclpython set

Re: Legacy data parsing

2005-07-08 Thread Jorgen Grahn
On Fri, 8 Jul 2005 15:03:45 -0500, Thomas Bartkus [EMAIL PROTECTED] wrote: gov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I've just started to learn programming and was told this was a good place to ask questions :) Where I work, we receive large quantities of data which

Re: removing list comprehensions in Python 3.0

2005-07-08 Thread Leif K-Brooks
Kay Schluehr wrote: Well, I want to offer a more radical proposal: why not free squared braces from the burden of representing lists at all? It should be sufficient to write list() list() So then what would the expression list('foo') mean? Would it be equivalent to ['foo'] (if so, how

  1   2   >