Re: Self reordering list in Python

2005-09-15 Thread Kay Schluehr
Laszlo Zsolt Nagy wrote: > Hello, > > Do you know how to implement a really efficient self reordering list in > Python? (List with a maximum length. When an item is processed, it > becomes the first element in the list.) I would like to use this for > caching of rendered images. I wonder why you d

Re: Software bugs aren't inevitable

2005-09-15 Thread Terry Reedy
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] (Aahz) writes: >> While that's true, one of the reasons Guido has historically rejected >> this optimization is because there are plenty of recursive algorithms >> not amenable to tail-call optimization.

Re: encryption with python?

2005-09-15 Thread Robert Kern
[Me:] > Probably the simplest encryption module would be Paul Rubin's p3.py . > It only requires the standard library. > > http://www.nightsong.com/phr/crypto/p3.py [Ed Hotchkiss wrote:] > Awesome. I just started Python today so I'd have no idea ... how good is > this encryption compared to PGP?

Re: Self reordering list in Python

2005-09-15 Thread Jules Dubois
On Thursday 15 September 2005 07:14, Laszlo Zsolt Nagy <[EMAIL PROTECTED]> (<[EMAIL PROTECTED]>) wrote: > Do you know how to implement a really efficient self reordering list in > Python? Yes. > (List with a maximum length. When an item is processed, it > becomes the first element in the list.)

Re: Looking for a database. Sugestions?

2005-09-15 Thread Jeff Shell
If it's embedded, is there any reason why it should be SQL? A solid alternative could me MetaKit, which has Python bindings: http://www.equi4.com/metakit/python.html """ Buzzwords - Metakit is an embeddable database which runs on Unix, Windows, Macintosh, and other platforms. It lets you build ap

Re: encryption with python?

2005-09-15 Thread Ed Hotchkiss
  Awesome. I just started Python today so I'd have no idea ... how good is this encryption compared to PGP? Any info on using this file? Didn't see any on this guys site ...   On 9/16/05, Robert Kern <[EMAIL PROTECTED]> wrote: Ed Hotchkiss wrote:> Gmail was just an example, I just wanted to learn t

Re: Looking for a database. Sugestions?

2005-09-15 Thread Ed Hotchkiss
Is this for running an SQL database, then using a separate python module to access the database?   On 15 Sep 2005 21:31:27 -0700, gsteff <[EMAIL PROTECTED]> wrote: SQLite rocks, its definitely the way to go.  Its binary is around 250K,but it supports more of the SQL standard than MySQL.  It CAN be

Re: Looking for a database. Sugestions?

2005-09-15 Thread gsteff
SQLite rocks, its definitely the way to go. Its binary is around 250K, but it supports more of the SQL standard than MySQL. It CAN be thread safe, but you have to compile it with a threadsafe macro enabled.. check out www.sqlite.org for more info. The windows binaries apparently are compiled wit

RE: [Python-Dev] python optimization

2005-09-15 Thread Raymond Hettinger
[Neal Becker] > >>I don't know to what extent these kind of optimizations are available to > >>cpython. For example, are constant calculations removed from loops? [Brett Cannon] > > If you mean ``2+3``, then yes. [Greg Ewing] > Actually, no. Constant folding *could* be done, but it currently i

How to clear screen in Python interactive shell mode?

2005-09-15 Thread A. L.
In Python interactive mode, is there some function acting like 'clear' command in bash? Could somebody here give some advice? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: My First Python Script

2005-09-15 Thread Robert Kern
Ed Hotchkiss wrote: > But then I still get the error with the len(x) statement .. hmm That's because integers don't have a length. But if you follow James' advice, you don't need to calculate lengths of anything. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high

Re: encryption with python?

2005-09-15 Thread Robert Kern
Ed Hotchkiss wrote: > What's the best module for encryption with python, anyone out there > using python and encryption together? It depends on what your needs are. What do you need to accomplish? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves

Re: Sorting Unix mailboxes

2005-09-15 Thread Gregory K. Johnson
On Tue, Sep 13, 2005 at 09:23:35AM -0700, [EMAIL PROTECTED] wrote: > I'm writing a program in python to sort the mail in standard Unix > email boxes. In my "prof of concept" example I am coping a letter to a > second mailbox if the letter was send from a particular email > address. [...] > Also, I

Re: [Python-Dev] python optimization

2005-09-15 Thread Greg Ewing
Brett Cannon wrote: >>I don't know to what extent these kind of optimizations are available to >>cpython. For example, are constant calculations removed from loops? > > If you mean ``2+3``, then yes. Actually, no. Constant folding *could* be done, but it currently isn't: >>> def f(): ... re

Re: My First Python Script

2005-09-15 Thread Ed Hotchkiss
But then I still get the error with the len(x) statement .. hmm     On 9/15/05, James Stroud <[EMAIL PROTECTED]> wrote: Try the % operator with strings.For instance: "%03.d" % 5py> "%03.d" % 5 '005'This operator, from what I have experienced, has the same properties as theunix printf. In python, I

Re: My First Python Script

2005-09-15 Thread James Stroud
Try the % operator with strings. For instance: "%03.d" % 5 py> "%03.d" % 5 '005' This operator, from what I have experienced, has the same properties as the unix printf. In python, I think its called "string formatting". James On Thursday 15 September 2005 20:33, Ed Hotchkiss wrote: > So I ha

My First Python Script

2005-09-15 Thread Ed Hotchkiss
So I have a  script, first part of a script that I am making to determine each possible combination of IP addresses that are out there.   This part is just to get the end of the IP (the last 3 digits). So, they are from 0 - 255. I just want to print 0 - 255, HOWEVER   If the number is only say ...

encryption with python?

2005-09-15 Thread Ed Hotchkiss
What's the best module for encryption with python, anyone out there using python and encryption together?-- edward hotchkiss -- http://mail.python.org/mailman/listinfo/python-list

Re: Postgres PL/Python

2005-09-15 Thread Jorge Godoy
Mike Meyer <[EMAIL PROTECTED]> writes: > Whether or not you use stored procedures is almost religious in > nature. Google for "stored procedures", and you'll find opinions > ranging from "never use them at all" to "use them whenever you > possibly can." Also there's the problem of performance. I

Re: Postgres PL/Python

2005-09-15 Thread Stuart Bishop
Ksenia Marasanova wrote: > I wonder if anyone on this list is using Python as Postgres > procedural language. I can't find a place for it i my mind. How would > a typical MVC web application benefit from it (besides performance)? > I understand from the docs that Postgres 7.4 has PL/PythonU - >

Re: No newline using printf

2005-09-15 Thread Peter Hansen
Johnny Lee wrote: > Roy Smith wrote: > >>For closer control over output, use the write() function. You want >>something like: >> >>import sys >>for i in range(3): >> sys.stdout.write (str(i)) > > > here is the output of my machine: > > >>> import sys > >>> for i in range(3): > ... sys

Re: No newline using printf

2005-09-15 Thread Johnny Lee
Roy Smith wrote: > > For closer control over output, use the write() function. You want > something like: > > import sys > for i in range(3): >sys.stdout.write (str(i)) here is the output of my machine: >>> import sys >>> for i in range(3): ... sys.stdout.write(str(i)) ... 012>>>

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread Robert Kern
A. L. wrote: > Thanks. But some problems remain. > > I have known using Image.tostring/fromstring and > numarray.tostring/fromstring can do the job. But when confronting > multi-spectral images, e.g., RGB color images, I don't know how to do > it. Could you give some advices on that? What's not w

RFC 1521 and missing binary Content-Transfer-Encoding in email module

2005-09-15 Thread Andy Leszczynski
Why email/Encoders.py is missing binary encoding. It should be there according to RFC 1521: encoding := "Content-Transfer-Encoding" ":" mechanism mechanism := "7bit" ; case-insensitive / "quoted-printable" / "base64" / "8bit"

Re: Accessing shared library file...

2005-09-15 Thread Peter Hansen
Ernesto wrote: > The .dll file is a shared library file that is associated with a > programming interface for a semi-conductor chip. The chip drivers come > in two different flavors: One is a .dll (for Windows) and the other is > a shared library file for Linux. The name of the Linux file is > "

Re: read stdout/stderr without blocking

2005-09-15 Thread Peter Hansen
Donn Cave wrote: > Peter Hansen <[EMAIL PROTECTED]> wrote: >>Jacek Pop³awski wrote: >>>My tests showed, that it will block. >> >>Not if you use non-blocking sockets, as I believe you are expected to >>when using select(). > > On the contrary, you need non-blocking sockets only if > you don't use

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread A. L.
Thanks. But some problems remain. I have known using Image.tostring/fromstring and numarray.tostring/fromstring can do the job. But when confronting multi-spectral images, e.g., RGB color images, I don't know how to do it. Could you give some advices on that? You wrote "In [14]: img = Image.fromb

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread Grant Edwards
On 2005-09-15, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) >> >> I get an OverflowError: long int too large to convert to int > You could sort-of fake it like this, > > def unsigned(val): > return struct.unpack(

Re: Software bugs aren't inevitable

2005-09-15 Thread Paul Rubin
François Pinard <[EMAIL PROTECTED]> writes: > This being said, for one, I always found _insane_ presenting recursion > to new programmers using such examples, which are both very easily, > and much better written non-recursively. It does not help beginners > at taking recursion any seriously. I d

Re: "optimizing out" getattr

2005-09-15 Thread jepler
If you are including C extensions, why not crib 2.5's implementation of operator.attrgetter? It looks like it is fairly modular. http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/operator.c Jeff pgpRT2RI9BoLZ.pgp Description: PGP signature -- http://mail.python.org/mailman/

Re: Software bugs aren't inevitable

2005-09-15 Thread Mike Meyer
François Pinard <[EMAIL PROTECTED]> writes: > This being said, for one, I always found _insane_ presenting recursion > to new programmers using such examples, which are both very easily, > and much better written non-recursively. It does not help beginners > at taking recursion any seriously. Thi

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread Grant Edwards
On 2005-09-15, Terry Reedy <[EMAIL PROTECTED]> wrote: >>I give up, how do I make this not fail under 2.4? >> >> fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) >> >> I get an OverflowError: long int too large to convert to int >> >> ioctl() is expecting a 32-bit intege

Re: Postgres PL/Python

2005-09-15 Thread Mike Meyer
Ksenia Marasanova <[EMAIL PROTECTED]> writes: > I wonder if anyone on this list is using Python as Postgres > procedural language. I can't find a place for it i my mind. How would > a typical MVC web application benefit from it (besides performance)? Your typical MVC web application hasn't got t

Re: Software bugs aren't inevitable

2005-09-15 Thread François Pinard
[Jerzy Karczmarczuk] > Steven D'Aprano recommends iteration over recursion: > > For instance, try these two simple functions for the nth number in > > the Fibonacci sequence: > > def fibr(n): > > "Recursive version of Fibonacci sequence." > > if n == 0: return 0 > > elif n == 1: re

Program crafting IP packets using Scapy

2005-09-15 Thread laksh
hi there i just used scapy and this http://packetstorm.linuxsecurity.com/papers/general/blackmagic.txt tutorial to write a program which can send DNS requets in an IP and get the response all this is done in PYTHON ANY ONE if can do the same :-)) im ready to pay them if they can give a better

Re: Python CSV writer confusion.

2005-09-15 Thread William Park
googleboy <[EMAIL PROTECTED]> wrote: > Hi. I am trying to write out a csv file with | instead of comma, > because I have a field that may have many commas in it. I read in a > csv file, sort it, and want to write it out again. CSV can handle comma within the field. -- William Park <[EMAIL PRO

Re: Software bugs aren't inevitable

2005-09-15 Thread Mike Meyer
[EMAIL PROTECTED] (Aahz) writes: > In article <[EMAIL PROTECTED]>, > Paul Rubin wrote: >>Every serious FP language implementation optimizes tail calls and thus >>using recursion instead of iteration doesn't cost any stack space and >>it probably generates the exact same

Re: Sorting Unix mailboxes

2005-09-15 Thread William Park
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm writing a program in python to sort the mail in standard Unix > email boxes. In my "prof of concept" example I am coping a letter to a > second mailbox if the letter was send from a particular email > address. When I read the destination mailbox wi

Re: Python Search Engine app

2005-09-15 Thread asmlinkage
Will McGugan wrote: > > Wasn't Google's first search engine actualy written in Python? I would'nt be surprised if they actually used python to do some prototyping of their algorithms but I cannot imagine the search engine actually being written in python. Search engines consist of many sub-syste

Re: No newline using printf

2005-09-15 Thread Gustavo Picon
On Thu, 2005-09-15 at 17:37 -0700, Samuel wrote: > Hello, > > I have been searching for an answer for almost two hours now and have > not found an answer. I want this code: > > for i in range(3): > print i # or whatever > > To produce this output: > 012 > > How can I print a word without ap

Re: No newline using printf

2005-09-15 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Samuel" <[EMAIL PROTECTED]> wrote: > How can I print a word without appending a newline character? Appending > a "," to the print statement only substitutes the newline for a space, > which is not what I am looking for. For closer control over output, use the wr

Re: IDE, widget library

2005-09-15 Thread asmlinkage
Jorge Godoy wrote: > Too bad that Eclipse is such a mammoth with regards to system resources... I > also like it, but I feel Emacs is much lighter and gives me the same things I > have with Eclipse... I know what you mean ! I am an avid emacs user but when I am writing an enterprise application

Re: No newline using printf

2005-09-15 Thread Erik Max Francis
Samuel wrote: > How can I print a word without appending a newline character? Appending > a "," to the print statement only substitutes the newline for a space, > which is not what I am looking for. Use sys.stdout.write directly. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.co

No newline using printf

2005-09-15 Thread Samuel
Hello, I have been searching for an answer for almost two hours now and have not found an answer. I want this code: for i in range(3): print i # or whatever To produce this output: 012 How can I print a word without appending a newline character? Appending a "," to the print statement only

Re: brain cramp: emulating cgi.FieldStorage

2005-09-15 Thread Mike Meyer
"Chris Curvey" <[EMAIL PROTECTED]> writes: > I can't be the first person to want to do this, but I also can't seem > to find a solution. (Perhaps my Google skills are poor today.) How > can I emulate cgi.FieldStorage() for my unit tests so that I don't have > to put a web server in the way? > >

Re: Software bugs aren't inevitable

2005-09-15 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > >Every serious FP language implementation optimizes tail calls and thus >using recursion instead of iteration doesn't cost any stack space and >it probably generates the exact same machine code. While that's true, one

Re: Looking for a database. Sugestions?

2005-09-15 Thread Paul McGuire
SQLite is very easy to get started with. I loaded up a 9 Mb file of process data and the performance was pretty good after I indexed on the join columns (increased db file size to 15Mb). Supports transactions, cursors, typed data. I *think* it is thread-safe, but I'm not positive. But it's grea

Re: Creating Pie Chart from Python

2005-09-15 Thread Giovanni Dall'Olio
PyChart? -- http://mail.python.org/mailman/listinfo/python-list

Re: "optimizing out" getattr

2005-09-15 Thread Daishi Harada
Peter Otten wrote: > No, you can just sit back and wait -- for Python 2.5: Thanks for the tip; Although for my current use I can't target 2.5, I hadn't even noticed the attr/itemgetter additions to operator in 2.4, so I appreciate the pointer for future reference. d > $ cat attr_tuple25.py > impo

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread paulp
Here is where my ignorance shows. What is a "double hop" issue? Paul "Pat [MSFT]" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Set the site to be Basic Authentication and login as you. I suspect that > the .exe is either running as IWAM/IUSER (i.e. GUEST) or you are running > i

Re: Python Search Engine app

2005-09-15 Thread Jim
I am finding this discussion illuminating. Can I ask: does it possibly make sense to use a dB? For an application of mine, I had been looking at putting the text into PostGres, and using their OpenFTS, at //http://openfts.sourceforge.net/ (there is a Python module to talk to OpenFTS, although it

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread chrisperkins99
Grant Edwards wrote: > I give up, how do I make this not fail under 2.4? > > fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) > > I get an OverflowError: long int too large to convert to int > > ioctl() is expecting a 32-bit integer value, and 0xc0047a80 has > the high-

Re: Software bugs aren't inevitable

2005-09-15 Thread Steven D'Aprano
On Thu, 15 Sep 2005 11:38:57 +0200, Jerzy Karczmarczuk wrote: >> Yes, the maximum recursion depth in Python is an artificial limit. But >> that artificial limit is built into Python specifically to protect you >> from running into a real recursion limit based on the hardware and >> architecture of

Re: Software bugs aren't inevitable

2005-09-15 Thread Steven D'Aprano
On Wed, 14 Sep 2005 23:44:18 -0400, Terry Reedy wrote: >> Yes. There are lots of algorithms that could be done, and they all have >> their pros and cons. Biset's formula, for example, is mathematically >> correct, but for large enough n, the "mere implementation detail" that >> floats have a finit

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread Terry Reedy
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I give up, how do I make this not fail under 2.4? > > > fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) > > I get an OverflowError: long int too large to convert to int > > ioctl() is expecti

Re: Accessing shared library file...

2005-09-15 Thread Ernesto
The .dll file is a shared library file that is associated with a programming interface for a semi-conductor chip. The chip drivers come in two different flavors: One is a .dll (for Windows) and the other is a shared library file for Linux. The name of the Linux file is "nameofFile.so.0.4.5" The

2.3 -> 2.4: long int too large to convert to int

2005-09-15 Thread Grant Edwards
I give up, how do I make this not fail under 2.4? fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00)) I get an OverflowError: long int too large to convert to int ioctl() is expecting a 32-bit integer value, and 0xc0047a80 has the high-order bit set. I'm assuming Pytho

Re: Accessing shared library file...

2005-09-15 Thread Larry Bates
You need to tell us what library file (.dll) are you accessing on Windows. The interface to whatever the .dll is used for will most likely be completely different on Linux. -Larry Bates Ernesto wrote: > I'm in the process of moving a Python application from Windows to > Linux. This means that

Postgres PL/Python

2005-09-15 Thread Ksenia Marasanova
Hi, I wonder if anyone on this list is using Python as Postgres procedural language. I can't find a place for it i my mind. How would a typical MVC web application benefit from it (besides performance)? I understand from the docs that Postgres 7.4 has PL/PythonU - unlimited functionality. It sou

Re: Property and "fset" in Python 2.4

2005-09-15 Thread Michael Hoffman
Rob Pawsner wrote: > Before I clog up the digest with details and code snippets, does this > sound familiar to anyone? It's almost always best to post details and code snippets. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread Pat [MSFT]
Set the site to be Basic Authentication and login as you. I suspect that the .exe is either running as IWAM/IUSER (i.e. GUEST) or you are running into a double hop issue. Pat "paulp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > > I'm working on a CGI program tha

Looking for a database. Sugestions?

2005-09-15 Thread ionel
I'm looking for a thread-safe database. Preferably an embedded, sql database. What are the best choices in terms of speed ? -- ionel. -- http://mail.python.org/mailman/listinfo/python-list

Re: working with VERY large 'float' and 'complex' types

2005-09-15 Thread Paul Rubin
Mikael Olofsson <[EMAIL PROTECTED]> writes: > > print 'z = %.5fE%d' % (10.**c, m) > > Nice approach. We should never forget that we do have mathematical > skills beside the computers. But, shouldn't you switch c and m in the > last row? Yeah, doh. c=characteristic, m=mantissa. -- http://mai

Re: Example of signaling and creating a python daemon

2005-09-15 Thread McBooCzech
--snip-- > I have no experience daemonizing a script so this help would be much > appreciated. I have found a couple of scripts googling on creating a > deemon but not work in this way. > > Regards, > David Hi, maybe this two link can help: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread Roger Upole
You need to adjust your privileges before you call LogonUser. hth Roger "paulp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > > I'm working on a CGI program that will run under MS IIS 5.0 and will > browse folders on three other machines, building HTML page

Re: IDE, widget library

2005-09-15 Thread Alessandro Bottoni
Thomas Jollans wrote: > I a looking for a python IDE for gnu/linux that : > - has decent sytax highlighting (based on scintilla would be neat) > - has basic name completition, at least for system-wide modules > - has an integrated debugger > - is open source, or at least free of charge There are

Re: IDE, widget library

2005-09-15 Thread Chris Lambacher
PyGTK works beatifully on Win32. If you want anything more than the generic GTK widgets on win32 you are going to have to jump through some hoops or not be successful. I tend to hate the GTK file chooser so I am using win32all to get the Native windows one. There is no print dialog and win32all

Accessing shared library file...

2005-09-15 Thread Ernesto
I'm in the process of moving a Python application from Windows to Linux. This means that the drivers for windows ".dll" now must be Linux drivers "shared library file" (.so I think). With Windows, I used: ctypes ("from ctypes import windll") Then "_dll = windll.NAME" I'm not sure how to includ

CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread paulp
Greetings, I'm working on a CGI program that will run under MS IIS 5.0 and will browse folders on three other machines, building HTML pages that will provide links to these folders. Essentially, the CGI will connect to each machine in turn, doing the FindFirst/FindNext process based on the curren

Re: MySQLdb UPDATE does nothing

2005-09-15 Thread Steve Horsley
Rowdy wrote: >> A similar question was asked back in July, someone posted this: > > > If it's any help, using > > cursor.execute("set autocommit = 1") > > before doing anything else works nicely unless you actually need > transactions. > Or, as I found out yesterday, cursor.execute('comm

Re: Software bugs aren't inevitable

2005-09-15 Thread Terry Reedy
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Are you saying that the recursion done by "serious" languages is a fake? > That it is actually implemented behind the scenes by iteration? Although easy to confuse, we should separate expressive syntax, whether recu

Looking for a database. Sugestions?

2005-09-15 Thread ionel
I'm looking for a thread-safe database. Preferably an embedded, sql database. What are the best choices in terms of speed ? -- ionel. -- http://mail.python.org/mailman/listinfo/python-list

Re: HELP!! Accessing other machines with an IIS CGI script

2005-09-15 Thread little emma
Thanks for the info. I'm going to repost this in comp.lang.python as well as in a couple of MS IIS groups with some additional information (code snippets and results). Paul "Roger Upole" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Without knowing what operation fails, it's kind

Re: Create and display an email

2005-09-15 Thread Adam Endicott
Thanks for the MAPI suggestion. I did a bit more googling, and combined a few things, along with some trial and error to come up with something that works. Here it is for posterity: import win32com.client olMailItem = 0x0 obj = win32com.client.Dispatch("Outlook.App

Re: p2exe using wine/cxoffice

2005-09-15 Thread Jorge Godoy
James Stroud <[EMAIL PROTECTED]> writes: > "better". The only reason I want this functionality is to make my software > available to windoze users--despite their unfortunate ignorance, they are > people too. That's what I always say. +1 QOTW... -- Jorge Godoy <[EMAIL PROTECTED]> -- http

Re: IDE, widget library

2005-09-15 Thread Jorge Godoy
Thomas Jollans <[EMAIL PROTECTED]> writes: > does usage of QT 3 in windows require any registration with trolltech or is > that just fibs i heard ? If you're using the GPL version, you must comply with GPL... If you're using the commercial version, then you must comply with Trolltech's license.

Re: "optimizing out" getattr

2005-09-15 Thread Kent Johnson
Peter Otten wrote: > Daishi Harada wrote: > > >>I'd like to get the 'get2' function below to >>perform like the 'get1' function (I've included >>timeit.py results). > > > >>labels = ('a', 'b') >>def get1(x): >>return (x.a, x.b) >>def mkget(attrs): >>def getter(x): >>return tu

Re: IDE, widget library

2005-09-15 Thread Jorge Godoy
[EMAIL PROTECTED] writes: > I like to use Eclipse with the Pydev plugin which is quite good and is > cross-platform. > > eclipse - http://www.eclipse.org/ > pydev - http://pydev.sourceforge.net/ Too bad that Eclipse is such a mammoth with regards to system resources... I also like it, but I fee

Re: IDE, widget library

2005-09-15 Thread Jorge Godoy
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Not true, there exists a qt free edition port for windows. And I've had close > to no troubles rolling out apps developed under linux. I have the same experience. Only more complex apps (using databases, for example) gave me some trouble since the

Re: Django Vs Rails

2005-09-15 Thread Jorge Godoy
Jacob Smullyan <[EMAIL PROTECTED]> writes: > Granted. Also, if the tables share structure, another option would be > to simplify their description with inheritance. It would be great if relationships could be mapped this way too. Something like ... =

Re: global interpreter lock

2005-09-15 Thread Michael Sparks
Michele Simionato wrote: > It looks like I am reinventing Twisted and/or Kamaelia. If it's /fun/ , is that a problem ? ;) (Interesting implementation BTW :) FWIW, I've about a year ago it wasn't clear if we would be able to release our stuff, so as part of a presentation I included a minimalisti

Re: Creating Pie Chart from Python

2005-09-15 Thread Ken Seehart
Thierry Lam wrote: > Let's say I have the following data: > > 500 objects: > -100 are red > -300 are blue > -the rest are green > > Is there some python package which can represen the above information > in a pie chart? > > Thanks > Thierry > What is the user interface context? Is it a web pa

Re: p2exe using wine/cxoffice

2005-09-15 Thread James Stroud
I think the motivation is to ween people off of M$ products altogether, to get them used to working an a unix environment and to the idea of using open alternatives rather than thinking that commercial software is somehow "better". The only reason I want this functionality is to make my software

Re: IDE, widget library

2005-09-15 Thread John Moore
Thomas Jollans wrote: >With that I come to the second question: >What cross-platform GUI libraries are there ? cross-platform meaning >functional and free on (at least) X11 and Win32 >PyQT obviously doesn't count because qt3 is not free on windows. >Tk is ugly. (how well) is Tile supported with p

Re: IDE, widget library

2005-09-15 Thread Thomas Jollans
Diez B. Roggisch wrote: > Thomas Jollans wrote: >> PyQT obviously doesn't count because qt3 is not free on windows. > > > Not true, there exists a qt free edition port for windows. And I've had > close to no troubles rolling out apps developed under linux. > does usage of QT 3 in windows requir

Re: IDE, widget library

2005-09-15 Thread Diez B. Roggisch
Thomas Jollans wrote: > I guess questions like this come all the time here ... well: > > I a looking for a python IDE for gnu/linux that : > - has decent sytax highlighting (based on scintilla would be neat) > - has basic name completition, at least for system-wide modules > - has an integrated de

Re: Django Vs Rails

2005-09-15 Thread Jacob Smullyan
On 2005-09-15, Jorge Godoy <[EMAIL PROTECTED]> wrote: > I just wonder when it becomes bad having to declare everything. For example, > we have databases with 600 tables. [snip] > Having the introspection is great in this case (even though it is boring > having to declare all those classes and te

Re: Software bugs aren't inevitable

2005-09-15 Thread phil hunt
On Thu, 15 Sep 2005 21:56:06 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >Are you saying that the recursion done by "serious" languages is a fake? >That it is actually implemented behind the scenes by iteration? > >It seems to me that if recursion and iteration produce "the exact same >mach

Re: IDE, widget library

2005-09-15 Thread asmlinkage
I like to use Eclipse with the Pydev plugin which is quite good and is cross-platform. eclipse - http://www.eclipse.org/ pydev - http://pydev.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

IDE, widget library

2005-09-15 Thread Thomas Jollans
I guess questions like this come all the time here ... well: I a looking for a python IDE for gnu/linux that : - has decent sytax highlighting (based on scintilla would be neat) - has basic name completition, at least for system-wide modules - has an integrated debugger - is open source, or at lea

Re: Django Vs Rails

2005-09-15 Thread Jorge Godoy
Jacob Smullyan <[EMAIL PROTECTED]> writes: > I have mixed feelings about automagical schema introspection. PyDO > supports it, and will probably do so increasingly robustly if people > use it. But part of me feels that "explicit is better than implicit" > may win out over DRY here, because the O

Re: [Python-Dev] python optimization

2005-09-15 Thread Brett Cannon
On 9/15/05, Neal Becker <[EMAIL PROTECTED]> wrote: > I use cpython. I'm accustomed (from c++/gcc) to a style of coding that is > highly readable, making the assumption that the compiler will do good > things to optimize the code despite the style in which it's written. For > example, I assume con

Re: Django Vs Rails

2005-09-15 Thread Jacob Smullyan
On 2005-09-15, Jonathan Ellis <[EMAIL PROTECTED]> wrote: > James wrote: >> I actually like the framework to reflect on my database. I am more of a >> visual person. I have tools for all my favorite databases that allow me >> to get a glance of ER diagrams and I would rather develop my data >> model

Re: Oh Yes, They Are [was: Re: Software bugs aren't inevitable]

2005-09-15 Thread Paddy
Surely, (don't call me Shirley), one of the goals pf Python is to make the Programmer more productive. It is obvious that we can tolerate some bugs in programs, but, after reading the article, I thought that we might have a change to here from 'the other side'. I get the fealing that the proponents

Re: Tkinter add_cascade option_add

2005-09-15 Thread Bob Greschke
OK. I give. Here's the whole reason I'm trying to do this. At the top of the program: -- # Fonts: a constant nagging problem System = sys.platform[:3].lower() ScreenWidth = Root.winfo_screenwidth() if System == "win": if ScreenWidth <= 1024: Root.option_add(

Re: List of integers & L.I.S.

2005-09-15 Thread antonmuhin
I hope nobody have posted similar solution (it's tested, but I didn't submit it to contest): from bisect import bisect_right as find def supernumbers(ls): indices = [0]*len(ls) for i, e in enumerate(ls): indices[e - 1] = i result = [None]*len(ls) borders = [] for i in indices:

/usr/lib/python2.3/site-packages/_mysql.so: undefined symbol

2005-09-15 Thread francescomoi
Hello. Python 2.3.4 (#1, Feb 2 2005, 12:11:53) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 MySQL-python-1.2.0 I'm trying to execute this script: -- #!/usr/bin/python import MySQLdb conn = MySQLdb.connect (host = "localhost", user = "root", passwd = "", db = "test

Re: defining __repr__

2005-09-15 Thread Gerrit Holl
sven wrote: > i'd like to define __repr__ in a class to return the standardrepr > a la "<__main__.A instance at 0x015B3DA0>" > plus additional information. > how would i have to do that? > how to get the standardrepr after i've defined __repr__? >>> object.__repr__(4) '' Gerrit. -- Temperature

Re: Britney Spears nude

2005-09-15 Thread Ian Osgood
Jeremy Jones wrote: > Will McGugan wrote: > > >Tim Peters wrote: > > > > > >>[john basha] > >> > >> > >> > >>>send me the britney nude photos > >>> > >>> > >>Because they're a new feature, you'll have to wait for Python 2.5 to > >>be released. > >> > >> > > > >She has just spawned a child process.

Re: Example of signaling and creating a python daemon

2005-09-15 Thread David Pratt
Hi jepler! This is a nice example. I will study it so I can better see what each part is doing. I may have a couple of questions once I have done this because I have not yet daemonized a process and I want to be sure I understand before I attempt to run anything I create. Many thanks. David

  1   2   >