Re: Optional Static Typing

2004-12-24 Thread Stephen Thorne
On 24 Dec 2004 21:35:24 -0800, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote: > I don't understand why this discussion on optional static typing came > up right at this moment. Because Guido made some notes on it. http://www.artima.com/weblogs/viewpost.jsp?thread=85551 merry christmas. Stephen. --

Re: Optional Static Typing

2004-12-24 Thread Luis M. Gonzalez
I don't understand why this discussion on optional static typing came up right at this moment. As far as I know, it has been discussed many times in the past, and there even was a SIG that simply died... but it seems that it never was something of much interest to python developers (that's my impre

Re: Lambda going out of fashion

2004-12-24 Thread Skip Montanaro
Mike> Perl 6.0 is going to include even more drastic changes. It will Mike> also include a Perl 5.x interpreter, and will have to be switched Mike> to 6.0 mode by a magic cookie of some kind in the source. Possibly Mike> Python 3.0 could do something similar. -1 Things are compl

Re: Lambda going out of fashion

2004-12-24 Thread Terry Reedy
"Andrew Dalke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: >> As far as I know, apply(func, args) is exactly equivalent to >> func(*args). > > After playing around a bit I did find one difference in > the errors they can create. Ok, add 'assuming that func a

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Donn Cave
Quoth [EMAIL PROTECTED] (Alex Martelli): | Donn Cave <[EMAIL PROTECTED]> wrote: ... | > He didn't dwell much on it, but there was some mention of type | > inference, kind of as though that could be taken for granted. | > I guess this would necessarily be much more limited in scope | > than what Has

Re: BASIC vs Python

2004-12-24 Thread has
Andrew Dalke wrote: > /F > > import random, winsound > > Now if it only worked for my mac ... This might help: http://www.stanford.edu/~andyszy/pyper/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating Image Maps

2004-12-24 Thread Aaron
Thanks for the responses guys! The first option you provided sounds great, Steve. I think I'm gonna try it that way. -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE problem :-(

2004-12-24 Thread Daniel Bickett
This is less of a bug and more of an inconvenience, on your part. It happens because IDLE has a tailored shell allowing your cursor to venture beyond the prompt, and across the text that the window consists of (much like a loaded file in a text editor) Thus, the beginning of each line is not limi

ANN: Axon 1.0

2004-12-24 Thread Michael Sparks
Hi, Axon is the core set of modules in Kamaelia[1], and is essentially a set of tools for managing concurrency inside a single thread. Whilst it is a pre-requisite for Kamaelia, it can be used independently as well. Rather than the usual statemachine (or state machine derived) approach it uses

Re: Clearing the screen

2004-12-24 Thread Jeff Epler
I don't know about idle, but the "real" python supports the PYTHONSTARTUP environment variable. PYTHONSTARTUP If this is the name of a readable file, the Python commands in that file are executed before the first prompt is displayed in interactive mode. The file is executed

Re: Clearing the screen

2004-12-24 Thread Ishwor
On 24 Dec 2004 15:33:26 -0800, Lars <[EMAIL PROTECTED]> wrote: > Hi Iswor, > > If I understand you correctly then your program is writing output to a > console/terminal window and you want to clear that window. > I don't know of any library methods for that, but you might just do: well i am not d

Re: feature suggestion

2004-12-24 Thread John Machin
flexibal wrote: > hi there. > > i didnt know if i should post it at python-dev or here, so i'll start > here. i'd like to suggest a new language feature for python that allows > you to explicitly declare a variable. > > as we all know, just doing > v = 5 > declares a new variable named 'v'... Does

Re: Python Interactive Shell - outputting to stdout?

2004-12-24 Thread Avi Berkovich
Hey, I can't make it work, I don't get any data from either stdout nor stderr. If I send lines and then close the stdin pipe, I may get an exception message from several lines up. I tried manually reading from the stdout pipe, but it just blocks and hangs no matter what I send over via the stdin

Re: Lambda going out of fashion

2004-12-24 Thread Benji York
Andrew Dalke wrote: Terry Reedy wrote: As far as I know, apply(func, args) is exactly equivalent to func(*args). After playing around a bit I did find one difference in the errors they can create. def count(): ... yield 1 ... apply(f, count()) Traceback (most recent call last): File "", lin

Re: Clearing the screen

2004-12-24 Thread Lars
Hi Iswor, If I understand you correctly then your program is writing output to a console/terminal window and you want to clear that window. I don't know of any library methods for that, but you might just do: os.system("cls") #for windows or os.system("clear") #for unix Not the most advanc

Re: list Integer indexing dies??

2004-12-24 Thread Mike Meyer
Ishwor <[EMAIL PROTECTED]> writes: > On Fri, 24 Dec 2004 05:44:50 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >> Ishwor <[EMAIL PROTECTED]> writes: >> >> > On 23 Dec 2004 14:28:37 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> > My experience as a learner here is that there should be some >> >

Re: gridbaglayout

2004-12-24 Thread Ishwor
heh? whats this gridbaglayout in Python-list?? Is this what my grandpa calls "christmas fever"?? ;-) On Fri, 24 Dec 2004 12:47:26 -0500, Sells, Fred <[EMAIL PROTECTED]> wrote: > gridbag is a pain. google for tablelayout which is easier (to me) > > -Original Message- > From: Diez B. Rog

IDLE problem :-(

2004-12-24 Thread Ishwor
I don't know if this has been a problem with other people using IDLE but when i press the home key then the cursor jumps to the beginning of the line and not after the prompt. If google prints the right indentation then here how i want the IDLE prompt to work -> |>>> |(r,b,g).__class__ ^ ^

Re: More elegant way to cwd?

2004-12-24 Thread M.E.Farmer
Ignore my last post to much eggnog I guess. I must have parsed it to quickly. M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

staying alive

2004-12-24 Thread rosen georgiev
well, hello i'm trying to write a script that listens for HAL messages (http://www.freedesktop.org/wiki/Software_2fhal) on D-BUS (http://www.freedesktop.org/wiki/Software_2fdbus). the problem i have is to keep the script alive. the way i do it now is with a call to gtk.main() after all the init

Re: More elegant way to cwd?

2004-12-24 Thread M.E.Farmer
Hello, Seems you found os.chdir(), but you missed os.getcwd() ;) M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

Clearing the screen

2004-12-24 Thread Ishwor
Hi i use IDLE to code Python in my machine. What i haven't been able to do is call an in-built function called clear()/cls()/clr() because it mightn't exist. so what i did is coded my own function called cls() as such >>> def cls(): for i in range(1,40): print " "; now that

ioctl() help needed for video4linux

2004-12-24 Thread Kyler Laird
I want to know which input one of my V4L devices is using. This is done using the VIDIOC_G_INPUT ioctl. I'm trying to figure out how to do it in Python. I found the pyv4l. http://pyv4l.sourceforge.net/ It hasn't been updated in awhile. It doesn't know about VIDIOC_G_INPUT. I tried crea

Re: Lambda going out of fashion

2004-12-24 Thread Mike Meyer
Nick Coghlan <[EMAIL PROTECTED]> writes: > jfj wrote: > Python 3.0 will be a case of "OK, let's take the things we learned > were good and keep them, and throw away the things we realised were > bad" > > Undoubtedly, the two languages will co-exist for quite some time. Perl 6.0 is going to includ

Re: Lambda going out of fashion

2004-12-24 Thread Andrew Dalke
Terry Reedy wrote: > As far as I know, apply(func, args) is exactly equivalent to func(*args). After playing around a bit I did find one difference in the errors they can create. >>> def count(): ... yield 1 ... >>> apply(f, count()) Traceback (most recent call last): File "", line 1, in ? T

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread ian
Hey guys, I'm just thankful the answer has been found and hope this helps someone else. To everyone (especially Lenard) that responded to my request for help, thank you!! Merry Christmas everyone!!! God bless Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: list Integer indexing dies??

2004-12-24 Thread Ishwor
On Fri, 24 Dec 2004 05:44:50 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: > Ishwor <[EMAIL PROTECTED]> writes: > > > On 23 Dec 2004 14:28:37 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > My experience as a learner here is that there should be some > > automagics & say like "okay you want to do

Re: Global variables and modules

2004-12-24 Thread John Machin
[EMAIL PROTECTED] wrote: > I have a newby type question on how global variables work between > modules. > > I have a module test2.py that defines a global variable as well as two > functions to operate on that variable. A script test1.py imports the > three names and prints out values of the glob

python-dev Summary for 2004-11-01 through 2004-11-15

2004-12-24 Thread Brett C.
python-dev Summary for 2004-11-01 through 2004-11-15 This is a summary of traffic on the `python-dev mailing list`_ from November 01, 2004 through November 15, 2004. It is intended to inform the wider Python community of on-going developments

Extension with factory

2004-12-24 Thread CarlosP
Hi! I'm writing a C/C++ extension to python. I need to add two python types which will be implemented as C++ classes. One of the classes acts as (besides other functions) a factory for the other. Specifically, one is Package and the other Unit, the createUnit method of Package lets you create Unit

Re: Newbie namespace question

2004-12-24 Thread Alex Martelli
Peter Hansen <[EMAIL PROTECTED]> wrote: > I'm not sure what you think that does, but I don't > think it does it. QOTW +1 !!! Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread Steve Holden
Max M wrote: Lenard Lindstrom wrote: [EMAIL PROTECTED] writes: [sixty or more lines, mostly code ...] Looks good. Lenard Lindstrom Nice quoting So what is this, some kind of competition? If you really though Lenard's quoting was a sin (since I took your remarks to be sardonic), how much more so

More elegant way to cwd?

2004-12-24 Thread Kamilche
Is there a more elegant way to change the working directory of Python to the directory of the currently executing script, and add a folder called 'Shared' to the Python search path? This is what I have. It seems like it could be shorter, somehow. # Switch Python to the current directory import os

Re: Optional Static Typing

2004-12-24 Thread Scott David Daniels
Rahul wrote: 1.def gcd(a,b) expects (int,int) I presume by this syntax you mean something like: def gcd(a, b) expects (int, int): if b > a: a, b = b, a while a > b > 0: a, b = b, a % b return a Here the function is not enforcing type checking. The

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: > Quoth [EMAIL PROTECTED] (Alex Martelli): > ... > | Haskell's a great language, but beware: its static typing is NOT > | optional -- it's rigorous. It can INFER types for you (just like, say, > | boo), that's a different issue. It also allows bounded generic

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread Max M
Lenard Lindstrom wrote: [EMAIL PROTECTED] writes: Hi Lenard, You just beat me to it. Suprise, suprise, I discovered the answer myself this time. I have modified the script to allow the attachment(s) to still be passed as a string. Some error checking is also done to verify the attachment file exis

Re: Global variables and modules

2004-12-24 Thread Alex Martelli
Brian van den Broek <[EMAIL PROTECTED]> wrote: > I'm quite fond of the > > import really_long_module_name as rlmn ... > I don't think the relevant section of Nutshell mentions this idiom. > However, I don't have my copy with me (seasonal travel, and all), so > apologies if my memory leads me

Re: BASIC vs Python

2004-12-24 Thread Alan Gauld
On Fri, 24 Dec 2004 12:30:15 +, Alan Kennedy <[EMAIL PROTECTED]> wrote: > [Alan Gauld] > > I dunno. Here in the UK there was a small home computer called (I > > think) the Oric(*) > I'm afraid your memory fails you ... > > The Oric-1 had a keyboard with *actual* keys, and came in two m

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread Lenard Lindstrom
[EMAIL PROTECTED] writes: > Hi Lenard, > You just beat me to it. > Suprise, suprise, I discovered the answer myself this time. > > I have modified the script to allow the attachment(s) to still be > passed as a string. > Some error checking is also done to verify the attachment file exists. > >

Re: Execute code after death of all child processes

2004-12-24 Thread Terry Reedy
"Markus Franz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I am a little puzzled about your variable declaration and use: > import sys, os, time > texts = ['this is text1', 'this is text 2'] You don't seem to use 'texts', > for current_text in env_sources[0:]: or define 'env_

RE: gridbaglayout

2004-12-24 Thread Sells, Fred
gridbag is a pain. google for tablelayout which is easier (to me) -Original Message- From: Diez B. Roggisch [mailto:[EMAIL PROTECTED] Sent: Monday, December 20, 2004 1:17 PM To: python-list@python.org Subject: Re: gridbaglayout [EMAIL PROTECTED] wrote: > Friends - I have tried to do ab

Re: feature suggestion

2004-12-24 Thread moma
Do not miss the discussion topic/thread: "Optional Static Typing" (from 12/23/2004) The referral article is very interesting, even for a newbie. Introduction of (optional) types will "legitimate" the Python language even more, while it keeps the fast scripting nature unspoilt. flexibal wrote:

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Donn Cave
Quoth [EMAIL PROTECTED] (Alex Martelli): ... | Haskell's a great language, but beware: its static typing is NOT | optional -- it's rigorous. It can INFER types for you (just like, say, | boo), that's a different issue. It also allows bounded genericity at | compile time (like, say, C++'s template

Out of Office AutoReply: Mail Delivery (failure david.bate@slcc.edu)

2004-12-24 Thread David Bate
Title: Out of Office AutoReply: Mail Delivery (failure [EMAIL PROTECTED]) I will be out of the office starting November Dec. 21st  and will return on Jan 5th.  -- http://mail.python.org/mailman/listinfo/python-list

Re: odbc script

2004-12-24 Thread Benji York
Michele Petrazzo wrote: Of course, if you want to help me to make it db-api 2 compatible, you are welcome! Unfortunately I don't have much time to volunteer, but when you embark on the road to DB API 2.0 compliance I have a fairly extensive test suite you can have. -- Benji York -- http://mail.py

Re: Global variables and modules

2004-12-24 Thread Brian van den Broek
Alex Martelli said unto the world upon 2004-12-24 03:23: <[EMAIL PROTECTED]> wrote: If you really must, consider using a container object. The most suitable container object for these tasks is often a module. I.e., code, in test1: import test2 and then refer to test2.glbl throughout. I.e., forg

Re: odbc script

2004-12-24 Thread Michele Petrazzo
Steve Holden wrote: you might want to look at www.egenix.com and think about installing the mxODBC module, which I have used with very good results. regards Steve If you want, I have created realpyodbc, that is a class for create an interface between python and odbc with ctypes's help . For now

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Tim Jarman
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > > P.S.: The ironic thing about all this is that it was > actually something called "Flavor Aid", made by a > company called Jel Sert (http://www.jelsert.com), > and not Kool-Aid at all. What would be even funnier > is if

Re: Windows XP - cron or scheduler for Python?

2004-12-24 Thread Michele Petrazzo
Emilio wrote: I have gone through the pain of trying to use those commands and use other available cron clients for Windows to find they are expensive, or have bugs and are not stable. So I wrote a very simple yet powerful script that handles all the basic functionality of Cron. It has been stable

Re: odbc for solid

2004-12-24 Thread Michele Petrazzo
flupke wrote: Hi, at work we use a solid database and i need to develop an application that accesses it. Problem is the drivers: i only have some dll's lying around and jar. On winsdows i could get by by using ODBC and the dll's to access the solid database but i want to eventually run it on a l

Re: character set gobbledy-gook ascii translation ...

2004-12-24 Thread Jeff Epler
>>> email.Header.decode_header("=?us-ascii?Q?Re=3A=20=5Bosg=2Duser=5D=20Culling=20problem?=") [('Re: [osg-user] Culling problem', 'us-ascii')] >>> email.Header.decode_header("=?gb2312?B?cXVlc3Rpb24gYWJvdXQgbG9hZGluZyBmbHQgbGFyZ2UgdGVycmFpbiA=?=") [('question about loading flt large terrain ', 'gb23

Re: editing XML via DOM

2004-12-24 Thread Uche Ogbuji
jaco wrote: > Hi, > > I'm new to Python and XML but still I want to create something that > includes creating and editing XML using Python. > > Now I'm looking for a little example program that does (some of) this to > set me on my way. > > Is there something like this available or can somebody gi

Re: Optional Static Typing

2004-12-24 Thread Michael Sparks
Rocco Moretti wrote: ... > Is there a group of people for whom static typing truly helps? Yes. Python doesn't at present compile down to a binary executable. (Py2exe don't really count since that's "just" tacking on a VM on the side (he says dimissively regarding something he thinks is cool :) )

Re: FutureWarning

2004-12-24 Thread Peter Hansen
Egor Bolonev wrote: = C:\Documents and Settings\┼уюЁ\My Documents\Scripts\octopus_eye\1\oct_eye_db.py: 213: FutureWarning: hex()/oct() of negative int will return a signed string in P ython 2.4 and up if hex(binascii.crc32(data))[0] == '-': = hex() will return

Re: Optional Static Typing

2004-12-24 Thread Nick Coghlan
Mike Meyer wrote: Which raises what, to me, is the central question. If we have optional static typing, can I get a performance enhancement out of it? If not, why bother? I had some thoughts along the same lines, so I dug up PEP 246 and looked at how it could be enhanced to potentially support com

Re: Global variables and modules

2004-12-24 Thread dkeeney
Thank you to both of you for your assistance. Using the qualified 'test2.glbl' form of the variable name gives the result I need. The concepts of binding and rebinding, as programming concerns, are new to me; I will have to study that further. Thank you again, and Merry Christmas. David -- h

Re: How about "pure virtual methods"?

2004-12-24 Thread Steve Holden
Alex Martelli wrote: [...] Sorry for the toy-ness of the example, but I don't want to post for hundreds of lines. [...] Can we take it this is some kind of early New Year's resolution? happy-christmas-ly y'rs - steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming h

Re: Creating Image Maps

2004-12-24 Thread Steve Holden
Aaron wrote: I know this is a thing used primarily on websites..but since python can do anything ;) I'm trying to make a clickable image map for my wxPython program. Basically, I know how to organize the images into one large image in a panel, but how do I make the individual pieces clickable like

character set gobbledy-gook ascii translation ...

2004-12-24 Thread Darran Edmundson
I'm parsing a file with the mailbox and email modules and come across subject headers like: =?us-ascii?Q?Re=3A=20=5Bosg=2Duser=5D=20Culling=20problem?= and =?gb2312?B?cXVlc3Rpb24gYWJvdXQgbG9hZGluZyBmbHQgbGFyZ2UgdGVycmFpbiA=?= I've looked at the Charset class but can't figure out how to use it

Re: Multiple Inheritance __slots__ problem

2004-12-24 Thread Alex Martelli
Nitin Shukla <[EMAIL PROTECTED]> wrote: > Hello, > > Can anyone tell why am I getting this error and how to work around this > problem. > > >>> class Klass(object): > ... __slots__ = ( 'x' ) > ... > >>> class Klass1(object): > ... __slots__ = ( 'y' ) > ... > >>> class Klass(Klass, Klass1): >

RE: FutureWarning

2004-12-24 Thread Batista, Facundo
Title: RE: FutureWarning [Egor Bolonev] #- = #- C:\Documents and Settings\+уюЁ\My #- Documents\Scripts\octopus_eye\1\oct_eye_db.py: #- 213: FutureWarning: hex()/oct() of negative int will return #- a signed #- string in P #- ython 2.4 and up #-    if hex(binascii.crc32(data

Re: Python and Delphi

2004-12-24 Thread Jarek Zgoda
Kristofer Carlson wrote: I'm curious about the long term trends chart on the TIOBE Programming Community Index chart at http://www.tiobe.com/tpci.htm. It shows the prevalence of Delphi and Python have tracked roughly equivalent usage paths for some years now. Does anyone know why, or is this j

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Alex Martelli
Neal D. Becker <[EMAIL PROTECTED]> wrote: > I've just started learning about Haskell. I suggest looking at this for an > example. > > A good intro: http://www.haskell.org/tutorial Haskell's a great language, but beware: its static typing is NOT optional -- it's rigorous. It can INFER types for

FutureWarning

2004-12-24 Thread Egor Bolonev
= C:\Documents and Settings\┼уюЁ\My Documents\Scripts\octopus_eye\1\oct_eye_db.py: 213: FutureWarning: hex()/oct() of negative int will return a signed string in P ython 2.4 and up if hex(binascii.crc32(data))[0] == '-': = hex() will return numbers like -0xa1?

Re: feature suggestion

2004-12-24 Thread Scott David Daniels
flexibal wrote: hi there. i didnt know if i should post it at python-dev or here, so i'll start here. Good choice. Python-dev is not a location for you to propose work for other people to do for you. BASIC has the "OPTION EXPLICIT" feature that forces you to explicitly declare all variables, and

RE: feature suggestion

2004-12-24 Thread Jimmy Retzlaff
flexibal wrote: ... > as we all know, just doing > v = 5 > declares a new variable named 'v'... but we are people, and we do make > typos... and it's very disturbing to find your program crashing after > two weeks of operation, over a NameError... because a certain branch in > your code, that was p

Re: Optional Static Typing

2004-12-24 Thread Rahul
Hi. Well i am a newbie to python and maybe not qualified enough to make a comment on proposals to changes in python. My previous programming experience has been in Java and C. So maybe you will forgive me if i make any outlandish comments. But anyway here goes: I think instead what should be done

Re: Unicode entries on sys.path

2004-12-24 Thread Just
In article <[EMAIL PROTECTED]>, vincent wehren <[EMAIL PROTECTED]> wrote: > Just wrote: > > In article <[EMAIL PROTECTED]>, > > "Martin v. Lowis" <[EMAIL PROTECTED]> wrote: > > > > > >>>Hm, maybe more a windows question than a python question... > >> > >>The real question here is: why does Pyt

RE: feature suggestion

2004-12-24 Thread Batista, Facundo
Title: RE: feature suggestion [flexibal] #- we do make #- typos... and it's very disturbing to find your program crashing after #- two weeks of operation, over a NameError... because a #- certain branch in #- your code, that was previously never taken, had finally been taken. #- #- i've wr

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Scott David Daniels
Tim Churches wrote: Peter Hansen <[EMAIL PROTECTED]> wrote: I always thought the connotation was more that those who "drank the Kool-Aid" were unthinking drones, following what others told them to do. I thought it was an allusion to "The Electric Kool-Aid Acid test" by Tom Wolfe - see http://en.wi

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Robert Kern
Tim Churches wrote: Peter Hansen <[EMAIL PROTECTED]> wrote: John Roth wrote: "Rocco Moretti" <[EMAIL PROTECTED]> wrote: The question is, should Guido state "TDD is the one true way to program in Python.", or should concessions be made in the language design for those who don't "drink the TDD Kool

feature suggestion

2004-12-24 Thread flexibal
hi there. i didnt know if i should post it at python-dev or here, so i'll start here. i'd like to suggest a new language feature for python that allows you to explicitly declare a variable. as we all know, just doing v = 5 declares a new variable named 'v'... but we are people, and we do make typ

Re: Unicode entries on sys.path

2004-12-24 Thread vincent wehren
Just wrote: In article <[EMAIL PROTECTED]>, "Martin v. Lowis" <[EMAIL PROTECTED]> wrote: Hm, maybe more a windows question than a python question... The real question here is: why does Python not support arbitrary Unicode strings on sys.path? It could, in principle, atleast on Windows NT+ (and al

Re: BASIC vs Python

2004-12-24 Thread Alan Kennedy
[Alan Gauld] > I dunno. Here in the UK there was a small home computer called (I > think) the Oric(*) which had a membrane keyboard, 4K or RAM and > ran Forth.It had a small cult following before dying out. It > looked a bit like the early Sinclair/Timex ZX81 and I think the > developers came from

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Neal D. Becker
I've just started learning about Haskell. I suggest looking at this for an example. A good intro: http://www.haskell.org/tutorial -- http://mail.python.org/mailman/listinfo/python-list

Re: converting octal strings to unicode

2004-12-24 Thread TZOTZIOY
On 23 Dec 2004 18:41:57 -0800, rumours say that [EMAIL PROTECTED] might have written: >I have several ascii files that contain '\ooo' strings which represent >the octal value for a character. I want to convert these files to >unicode, and I came up with the following script. But it seems to me >th

Re: Execute code after death of all child processes

2004-12-24 Thread Mike Meyer
[EMAIL PROTECTED] (Markus Franz) writes: > Hallo! > > > I have a problem with this little script written in Python: > > > import sys, os, time > texts = ['this is text1', 'this is text 2'] > for current_text in env_sources[0:]: > pid = os.fork() > if pid == 0: > time.slee

Multiple Inheritance __slots__ problem

2004-12-24 Thread Nitin Shukla
Hello, Can anyone tell why am I getting this error and how to work around this problem. >>> class Klass(object): ... __slots__ = ( 'x' ) ... >>> class Klass1(object): ... __slots__ = ( 'y' ) ... >>> class Klass(Klass, Klass1): ... __slots__ = ( 'z' ) ... Traceback (most recent call la

Re: Optional Static Typing

2004-12-24 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > <[EMAIL PROTECTED]> wrote in message > This may sound a bit > cynical, but most real uber-programmers have either > Lisp or Smalltalk in their backgrounds, and > frequently both one. Neither of those languages > have static typing, and they simply don't ne

Re: How about "pure virtual methods"?

2004-12-24 Thread Mike Meyer
Noam Raphael <[EMAIL PROTECTED]> writes: >> Noam Raphael <[EMAIL PROTECTED]> writes: > Of course, even in statically typed languages, you can't enforce > an implementation to do what it should (too bad - it would have made > debugging so much easier...) That's what DbC languages are for. You writ

Re: list Integer indexing dies??

2004-12-24 Thread Mike Meyer
Ishwor <[EMAIL PROTECTED]> writes: > On 23 Dec 2004 14:28:37 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > My experience as a learner here is that there should be some > automagics & say like "okay you want to do indexing on integers ( > context dependent); i'll give you the index of 0th positio

Re: Reading and Writing

2004-12-24 Thread Mike Meyer
Sir Galahad the chaste <[EMAIL PROTECTED]> writes: > Hi, > > [EMAIL PROTECTED] wrote: >> How should I: Open a Text file, read from it, modify it, print to >> another .txt? >> For instance: Read a string, sort it, write the sorted string. > > What do you mean by "sorting"? If you want to sort the l

Re: PHP vs. Python

2004-12-24 Thread Duncan Booth
Paul Rubin wrote: > I've never heard of any large sites being done in Python, with or > without scaling. By a large site I mean one that regularly gets 100 > hits/sec or more. There are many sites like that out there. Those > are the ones that need to be concerned about scaling. How exactly wo

Re: list Integer indexing dies??

2004-12-24 Thread Duncan Booth
Antoon Pardon wrote: > Suppose I write a number in octal notation. > > What should 035[0] cough up? Be carefull it should > cough up the same as 29[0]. > given that 035==0035 I say they should both cough up 0 for any positive index of course. -- htt

Execute code after death of all child processes

2004-12-24 Thread Markus Franz
Hallo! I have a problem with this little script written in Python: import sys, os, time texts = ['this is text1', 'this is text 2'] for current_text in env_sources[0:]: pid = os.fork() if pid == 0: time.sleep(2) print current_text

Re: [PIL] is there a downloadable docs for PIL

2004-12-24 Thread Egor Bolonev
On Fri, 24 Dec 2004 10:00:39 +0100, Michel Claveau - abstraction meta-galactique non triviale en fuite perpetuelle. <[EMAIL PROTECTED]> wrote: Is that ? http://www.pythonware.com/products/pil/pil-handbook.pdf yes. thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-24 Thread Alex Martelli
Tim Jarman <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Alan Gauld <[EMAIL PROTECTED]> wrote: > > > I dunno. Here in the UK there was a small home computer called (I > > think) the Oric(*) which had a membrane keyboard, 4K or RAM and > > ran Forth.It had a small cult following

Re: hidding the "console" window + system global shortcut keys

2004-12-24 Thread Nick Coghlan
Consider looking into Cygwin or MSYS if you want Windows access to *nix tools. To hide the console window, use a .pyw extension on your Python scripts and/or run them with pythonw instead of python. For the last, Mark Hammond's win32 extensions will probably be needed, but other than that, I hav

ANNOUNCE: pyIrcServer 0.0.4.0-alpha is out!

2004-12-24 Thread Lethalman
(first, sorry for my poor English) pyIrcServer (or pyIS) is a powerful and very personalizable IRCd. You can use it on several platforms that can run Python (like Linux, Windows, MAC, and others) and set up a very personalizable config. pyIS is runnable as you download it

Re: Unicode entries on sys.path

2004-12-24 Thread Just
In article <[EMAIL PROTECTED]>, "Martin v. Lowis" <[EMAIL PROTECTED]> wrote: > > Hm, maybe more a windows question than a python question... > > The real question here is: why does Python not support arbitrary > Unicode strings on sys.path? It could, in principle, atleast on > Windows NT+ (and a

Re: [PIL] is there a downloadable docs for PIL

2004-12-24 Thread Michel Claveau - abstraction meta-galactique non triviale en fuite perpetuelle.
Is that ? http://www.pythonware.com/products/pil/pil-handbook.pdf -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional Static Typing

2004-12-24 Thread Alex Martelli
John Roth <[EMAIL PROTECTED]> wrote: ... > question: static typing is an answer. What's the question? > (That's a paraphrase.) > > The answer that everyone seems to give is that it > prevents errors and clarifies the program. ... > Most of the kinds of error that static typing is supposed >

Re: Keyword arguments - strange behaviour?

2004-12-24 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > the default params are evaluated at the definition. However, I still > can't give a nice looking solution on how to re-write a function to > have empty mutable values as default arguments: eg. > > def method(a,b,opt1=[],opt2=None,opt3="",opt4={}) > > How could

Re: Optional Static Typing

2004-12-24 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Adding Optional Static Typing to Python looks like a quite complex > thing, but useful too: > http://www.artima.com/weblogs/viewpost.jsp?thread=85551 > > I have just a couple of notes: Guido doesn't read this group; if you want him to read your notes, post them as co

Re: Keyword arguments - strange behaviour?

2004-12-24 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > I'm really looking for a neat way to do the following: > > def method(a,b,opt1=None,opt2=None,opt3="",opt4=None): > if opt1 is None: opt1=[] > if opt2 is None: opt2={} > if opt4 is None: opt4=[] > > Python syntax is normally so neat but this just looks a mess i

Re: Global variables and modules

2004-12-24 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > and here is the test script, test1.py > - > > from test2 import glbl, inc_glbl, get_glbl Think of this as roughly equivalent to: import locl glbl = test2.glbl and so on. That is, after the 'from test2 import', the two name

Dubious Python WAS: Re: Lambda going out of fashion

2004-12-24 Thread Brian van den Broek
Fernando Perez said unto the world upon 2004-12-23 14:42: Alex Martelli wrote: I don't know what it IS about lambda that prompts so much dubious to absurd use, but that's what I observed. I don't know if that plays any role in Guido's current thinking, though -- I have no idea how much "dubious P

Re: String backslash characters

2004-12-24 Thread Leif K-Brooks
PD wrote: Hello, I am new to python, but i am quite curious about the following. suppose you had print '\378' which should not work because \377 is the max. then it displays two characters (an 8 and a heart in my case...). What else does'nt quite make sense is that if this is an octal why is an 8 a