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 d

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

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

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

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 so

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

Re: python nested class

2005-07-08 Thread Daniel Dittmar
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 classes are very different in that they hav

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 o

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

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]

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 t

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

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

Re: urllib2 - basic authentication and the put and delete methods

2005-07-08 Thread deelan
news.corp.adobe.com wrote: (...) > > But despite much searching, I have yet to discover how to then use PUT and > DELETE to copy files / delete files on the server. i believe you have to use httplib for that: examples here:

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

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

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

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 g

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 untru

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: http://www.open

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 o

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

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 kno

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 PyK

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

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

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

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 applicati

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 this initial vibe I'm getting out of Python. However, because I feel programmers of a certain languages bring with them certain vices when moving to other languages, I'd like to have feedback fro

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 sItem.Import("H:\\I

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

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 w

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

2005-07-08 Thread Kay Schluehr
[EMAIL PROTECTED] schrieb: > I've been reading the beloved Paul Graham's "Hackers and Painters". > He claims he developed a web app at light speed using Lisp and lots > of macros. Yes, Paul is a postmodern hero who reininvents himself and his language every day and with every program: "Experien

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

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 a

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 dr

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

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

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 o

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 __init__

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

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 h

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( ('', 17100) ) On windows, connect() returns and I have a broadcast so

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 has

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

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

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 jok

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 shoul

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

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). -- http://mail.python.org/mailman/listinfo/pytho

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

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

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

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 Wi

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 ve

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 som

Re: Options to integrate Python modules into native windows applications

2005-07-08 Thread Philippe C. Martin
Thanks Michel et salutations. Your english is fine. A+ Philippe Do Re Mi chel La Si Do wrote: > 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.

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

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

Re: Snakespell

2005-07-08 Thread [EMAIL PROTECTED]
Tried that. They don't store the .tar.gz file. It becomes a blank page. -- http://mail.python.org/mailman/listinfo/python-list

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 wha

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 g

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

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

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 sittin

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

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 mu

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

Re: Legacy data parsing

2005-07-08 Thread Jeremy Jones
gov wrote: >Hi, > > > >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'r

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 P

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 anyo

Re: f*cking re module

2005-07-08 Thread George Sakkis
"Mike Meyer" <[EMAIL PROTECTED]> wrote: > I only know one compiler that punts after the first error. Even with > lots of cheap computing power, it's still very annoying. > > Come to think of it, Python does this, doesn't it? For some reason, > that doesn't annoy me. Maybe because I don't think of

Re: Use cases for del

2005-07-08 Thread Ron Adam
George Sakkis wrote: > > How about using the right way of comparing with None ? > > x = None > t = time.time() > for i in range(100): > if x is None: > pass > print 'is None:',time.time()-t > > I get: > > None: 0.54952316 > String: 0.498000144958 > is None: 0.450476

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 r

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 w

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 interesti

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 you

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.

Re: qustion about build Python on the Solaris 9

2005-07-08 Thread Trent Mick
[Hu, Bizhong wrote] > My question is that is > anyone know if python can > Be build as 64 bits application on SPARC ??? I don't know of any reason why not. I haven't built for *64-bit* SPARC yet but Python builds fine 32-bit on SPARC and build fine 64-bit on a number of other platforms (linux-x86_

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: Use cases for del

2005-07-08 Thread Ron Adam
George Sakkis wrote: > I get: > > None: 0.54952316 > String: 0.498000144958 > is None: 0.45047684 What do yo get for "name is 'string'" expressions? Or is that a wrong way too? On my system testing "if string is string" is slightly faster than "if True/ if False" expressions. But th

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

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-

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 the

removing list comprehensions in Python 3.0

2005-07-08 Thread Steven Bethard
George Sakkis wrote: > "Steven Bethard" <[EMAIL PROTECTED]> wrote: >> Dict comprehensions were recently rejected: >> http://www.python.org/peps/pep-0274.html >> The reason, of course, is that dict comprehensions don't gain you >> much at all over the dict() constructor plus a generator ex

Re: Legacy data parsing

2005-07-08 Thread Bengt Richter
On 8 Jul 2005 11:31:14 -0700, "gov" <[EMAIL PROTECTED]> 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

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 comp

  1   2   >