Re: notification for cd insertion

2004-12-04 Thread Fredrik Lundh
Qiangning Hong <[EMAIL PROTECTED]> wrote: >I want one of my function to execute when a cdrom is inserted. How can I >achieve that? > > Further more, I want to do different things depend on the inserted disc type: > if it is a normal > cd-rom, read from it; if it is a recordable cd, write data

Re: notification for cd insertion

2004-12-04 Thread Joe Raul
"Qiangning Hong" <[EMAIL PROTECTED]> news:[EMAIL PROTECTED] > Qiangning Hong wrote: > > I want one of my function to execute when a cdrom is inserted. How can > > I achieve that? > > > > Further more, I want to do different things depend on the inserted disc > > type: if it is a normal cd-ro

Re: [Python-Help] (fwd)

2004-12-04 Thread Joe Raul
"Alfred Canoy" <[EMAIL PROTECTED]> news:[EMAIL PROTECTED] > Hello, > > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical

Re: notification for cd insertion

2004-12-04 Thread Qiangning Hong
Qiangning Hong wrote: I want one of my function to execute when a cdrom is inserted. How can I achieve that? Further more, I want to do different things depend on the inserted disc type: if it is a normal cd-rom, read from it; if it is a recordable cd, write data on it. So, how can I get the

notification for cd insertion

2004-12-04 Thread Qiangning Hong
I want one of my function to execute when a cdrom is inserted. How can I achieve that? Further more, I want to do different things depend on the inserted disc type: if it is a normal cd-rom, read from it; if it is a recordable cd, write data on it. So, how can I get the inserted disc type inf

Re: long number multiplication

2004-12-04 Thread Nick Coghlan
I.V. Aprameya Rao wrote: hi i have been wondering, how does python store its very long integers and perform aritmetic on it. i needed to implement this myself and was thinking of storing the digits of an integer in a list. however this would be very slow for operations like division etc. so if

Re: long number multiplication

2004-12-04 Thread Terry Reedy
"I.V. Aprameya Rao" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i have been wondering, how does python store its very long integers and > perform aritmetic on it. The only real documention for stuff like this, other than random posts on c.l.p., is the source code itself. It i

Re: Delphi/Kylix and Python

2004-12-04 Thread Tim Roberts
"John Tiedeman" <[EMAIL PROTECTED]> wrote: > > Translating to Kylix might be quite easy. There have been articles >about writing code so that it will run on either by sensing whether Windows >or Linux and automatically using the appropriate directives. > My problem with both Delphi and Ky

Re: [Python-Help] (fwd)

2004-12-04 Thread Paul Rubin
"Alfred Canoy" <[EMAIL PROTECTED]> writes: > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of num

RE: [Python-Help] (fwd)

2004-12-04 Thread Robert Brewer
Alfred Canoy wrote: > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of numbers > c.. Finds

Re: [Python-Help] (fwd)

2004-12-04 Thread Alfred Canoy
Hello, I'm just new to programming and would like to ask for help.. Build a module that contains three functions that do the following: a.. Compute the average of a list of numbers b.. Finds the statistical median value of a list of numbers c.. Finds the mode of a list of numbers Can

Re: pre-PEP generic objects

2004-12-04 Thread Ian Bicking
Steven Bethard wrote: Ian Bicking wrote: class bunch(object): def __init__(self, **kw): for name, value in kw.items(): # IMPORTANT! This is subclass friendly: updating __dict__ # is not! setattr(self, name, value) Good point about being subclass fri

long number multiplication

2004-12-04 Thread I.V. Aprameya Rao
hi i have been wondering, how does python store its very long integers and perform aritmetic on it. i needed to implement this myself and was thinking of storing the digits of an integer in a list. however this would be very slow for operations like division etc. so if anyone can point me to

Re: Quixote+Nevow+LivePage

2004-12-04 Thread Jp Calderone
On Sat, 04 Dec 2004 20:05:59 -0700, Dave Brueck <[EMAIL PROTECTED]> wrote: >Jp Calderone wrote: > > On 3 Dec 2004 22:02:51 -0800, Mir Nazim <[EMAIL PROTECTED]> wrote: > >>Q1) Is it possibe to use "Nevow + LivePage + Quixote" together in a > >>web app. Live Page is really important for me as I am no

Re: Quixote+Nevow+LivePage

2004-12-04 Thread Dave Brueck
Jp Calderone wrote: On 3 Dec 2004 22:02:51 -0800, Mir Nazim <[EMAIL PROTECTED]> wrote: Q1) Is it possibe to use "Nevow + LivePage + Quixote" together in a web app. Live Page is really important for me as I am not into content oriented web apps. Q2) Is is nessary that LivePage only with Twisted or c

Re: How is Python designed?

2004-12-04 Thread Robert
Sorry for my interrupting the discussion : ). I am a graduate student in a chinese university, and i am very interested in the Yuan language. I'd like to join in the development of Yuan and do some work for this language. BTW, i like this word, "Yuan" : ) I have 3 or 4 years experience in C++, a

Re: some pointers for a newbie

2004-12-04 Thread Jon Mercer
On the matter of IDEs, I've found that Eclipse (http://www.eclipse.org) is amazing, although I suspect that it takes a bit of learning to get used to it and I'm nowhere near making full use of all it can do. It has a really useful plugin in the shape of PyDev. I strongly recommend having a play, al

Re: HTTP response code

2004-12-04 Thread Ian Bicking
Jonas Galvez wrote: Hi list, here's a question about urllib. Is it possible to simply retrieve the HTTP responde code for a given URL? I don't want to download the body of the HTTP message. I simply want to check the response code, like, if it is 200, 301 etc. Something like: if urllib.urlopen(

Please help here: python <==> COM

2004-12-04 Thread mep
Hi,all I'm scripting flashget (A download management tool, http://www.amazesoft.com/) using python win32 extension, opening a downloading dialog. The following pythong code NOT work: CODE BEGIN #!/usr/bin/env python # -*- coding: cp936 -*- import win32com.client flashget = win32co

Re: Help with modules/packages.

2004-12-04 Thread Nick Coghlan
Christopher J. Bottaro wrote: Hello, I want to be able to say stuff like "import CJB.ClassA" and "import CJB.ClassB" then say "c = CJB.ClassA()" or "c = CJB.ClassB()". CJB will be a directory containing files "ClassA.py" and "ClassB.py". Now that I think about it, that can't work b

Re: [Python-Dev] PEP: __source__ proposal

2004-12-04 Thread Nick Coghlan
John Roth wrote: I don't see enough here to make a very intelligent comment, so I'll risk it and make what might be a rather uninformed comment. This was a misdirected reply on my part - the rest of the discussion can be found in the python-dev archives on python.org or gmane. I think your commen

Re: some pointers for a newbie

2004-12-04 Thread Roy Smith
John Evans <[EMAIL PROTECTED]> wrote: > So what i ask is, for someone who wants to dip his toe in the pond and > runs a powerbook with os x what tools, resources should I look into as > being the most useful? I'm also running OSX on a PowerBook, so I guess we're kindred spirits. To a large ext

Re: assymetry between a == b and a.__eq__(b)

2004-12-04 Thread Nick Coghlan
Peter Otten wrote: Tim Peters wrote: See the Python (language, not library) reference manual, section 3.3.8 ("Coercion rules"), bullet point starting with: Exception to the previous item: if the left operand is an instance of a built-in type or a new-style class, and the right operand is

some pointers for a newbie

2004-12-04 Thread John Evans
Hi, I have decided to play around with python, for the simple reason there appears nothing better to do at 2am on a sunday morning ;) Anyway I am familiar with languages similar to PHP, javaa script, and also languages which have similarities on the surface to python such as Lingo (macromedia D

problem solving help

2004-12-04 Thread Alfred Canoy
Dear Sir/Madam, Hello! I'm just new to programming and would like to ask for help.. Can you please give me clue how I should start solving the following problem below? Write a program that allows you to do the following five operations: Prompt the user to input a list of numbe

Programming help

2004-12-04 Thread Alfred Canoy
Dear Sir/Madam, Hello! I'm just new to programming and would like to ask for help.. Can you please give me clue how I should start solving the following problem below? -Build a module that contains three functions that do the following: Compute the average of a list of number

Re: Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Dave Benjamin
In article <[EMAIL PROTECTED]>, Jimmy Retzlaff wrote: > Dave Benjamin wrote: >> I looked around for recordings of Guido, but couldn't find any. Does >> anyone know of any streamable audio (or video) interviews or speeches >> featuring Guido, the bots, or any other interesting people in the > Python

Re: Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Dave Benjamin
In article <[EMAIL PROTECTED]>, Fredrik Lundh wrote: > Dave Benjamin wrote: > >> I looked around for recordings of Guido, but couldn't find any. > > http://www.python.org/~guido/guido.au I found a few--slightly longer--video interviews here today: http://technetcast.ddj.com/tnc_catalog.html?item

Article on updates to gnosis.xml.objectify

2004-12-04 Thread David Mertz, Ph.D.
Python/XML users might be interested in: http://www-106.ibm.com/developerworks/xml/library/x-matters39.html Title: Get the most out of gnosis.xml.objectify Subtitle: Use utility functions for enhanced object behavior Abstract: The XML binding gnosis.xml.objectify was designed, in many way

Re: Pythonic use of CSV module to skip headers?

2004-12-04 Thread Skip Montanaro
>> I don't find the couple extra lines of code in my original example >> all that cumbersome to type though. Michael> If you started about half of the programs you write with those Michael> extra lines, you might . I'm a strong believer in Michael> OnceAndOnlyOnce. You're rig

Re: xml.sax in Python 2.3.4

2004-12-04 Thread Uche Ogbuji
Gustaf Liljegren <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > After a long break with Python I'm trying to get started again. I need > to do some SAX processing, but it seems things have changed, and I can't > find any docs describing how to make things work *today*. The SA

Re: Importing class from file in package

2004-12-04 Thread Peter Hansen
Florian Lindner wrote: I've two files in my package. In the first file I want to inport a class which is declared in the second file. How can do that without stating the absolute path to the file, just the relative one? Assuming you mean by "package" that you have a folder named, say, "mypkg" and

Re: How is Python designed?

2004-12-04 Thread Limin Fu
Hi, Probably you didn't understand well what I meant or maybe I didn't express clearly what I meant. So I think I need to spend more words to make it clear. First, there is no abstract syntax tree generated for the whole program, except for arithmetic expression(even for this, it is slightly diff

Re: about python advanced/new features documentation

2004-12-04 Thread Kent Johnson
Kl wrote: Hi, python is really easy to learn in my opinion. There are loads of tutorials/books on the web talking about the most common python features. The problem comes when they add something new to the language or you want to use advanced features. Since python is still evolving its difficult t

Importing class from file in package

2004-12-04 Thread Florian Lindner
Hello, I've two files in my package. In the first file I want to inport a class which is declared in the second file. How can do that without stating the absolute path to the file, just the relative one? Thanks, Florian -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with modules/packages.

2004-12-04 Thread M.E.Farmer
"Christopher J. Bottaro" <[EMAIL PROTECTED]> wrote in message Hello Christopher, You probably know this but I will mention it here for completeness, if you want to be able to make a dir a package you also need to add an __init__.py in the folder you wish to import from. The __init__.py makes t

about python advanced/new features documentation

2004-12-04 Thread Kl
Hi, python is really easy to learn in my opinion. There are loads of tutorials/books on the web talking about the most common python features. The problem comes when they add something new to the language or you want to use advanced features. Since python is still evolving its difficult to find goo

Re: pythonwin broke

2004-12-04 Thread Jean Brouwers
One more test, but after selecting "Modules Doc" from the start menu. The small pydoc window shows up, "Python documentation server ..." etc. Clicking the X button results in a "pythonw.exe Application Error" with the message: The instruction at "0x..." referenced memory at "0x0..014". Th

Re: PyQt on a Server

2004-12-04 Thread Bob Parnes
On 03 Dec 2004 11:15:26 -0500, Jerry Sievers <[EMAIL PROTECTED]> wrote: > Bob Parnes <[EMAIL PROTECTED]> writes: >> my /etc/ld.so.conf file already has that lib in it. So something else is >> happening, but it clearly has nothing to do with python. > > Have you run ldconfig (probably /sbin/ldconfi

Re: [Python-Dev] PEP: __source__ proposal

2004-12-04 Thread John Roth
"Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Stelios Xanthakis wrote: It appears that there are the 'module people' who find this feature irrelevant. Indeed. If we are interested in distributing modules and increasing the number of people who use python programs,then

Re: pythonwin broke

2004-12-04 Thread Jean Brouwers
I'm not sure what Pythonwin is. The Python start menu shows "Python (command line)" and "IDLE (Python GUI)" plus docs, etc. Your experiment with IDLE works just fine. Both windows closed on clickin X. This is Windows XP SP2 with Python 2.3.4 from the Python.org site. /Jean Brouwers In art

Re: Quixote+Nevow+LivePage

2004-12-04 Thread Carlos Ribeiro
On Sat, 04 Dec 2004 16:17:06 GMT, Jp Calderone <[EMAIL PROTECTED]> wrote: > I haven't used LivePage myself, but someone in the know tells me > that LivePage requires an extra, non-HTTP connection to operate, so > will pretty much only work with Twisted. The basic technique is to use a "persisten

Re: Quixote+Nevow+LivePage

2004-12-04 Thread Carlos Ribeiro
On Sat, 04 Dec 2004 17:46:02 GMT, Jp Calderone <[EMAIL PROTECTED]> wrote: > On Sat, 4 Dec 2004 15:40:44 -0200, Carlos Ribeiro <[EMAIL PROTECTED]> wrote: > > > >On Sat, 04 Dec 2004 16:17:06 GMT, Jp Calderone <[EMAIL PROTECTED]> wrote: > > > I haven't used LivePage myself, but someone in the know

Re: HTTP response code

2004-12-04 Thread Carlos Ribeiro
On Fri, 3 Dec 2004 17:28:43 -0200, Jonas Galvez <[EMAIL PROTECTED]> wrote: > Hi list, here's a question about urllib. Is it possible to simply > retrieve the HTTP responde code for a given URL? I don't want to > download the body of the HTTP message. I simply want to check the > response code, like

Re: Refactoring a generator function

2004-12-04 Thread max
Kent Johnson <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Here is a simple function that scans through an input file and > groups the lines of the file into sections. Sections start with > 'Name:' and end with a blank line. The function yields sections > as they are found. > > def make

Re: Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Carlos Ribeiro
On Sat, 4 Dec 2004 18:04:36 +0100, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Dave Benjamin wrote: > > > I looked around for recordings of Guido, but couldn't find any. Does anyone > > know of any streamable audio (or video) interviews or speeches featuring > > Guido, the bots > > a bot-owned hor

Re: Quixote+Nevow+LivePage

2004-12-04 Thread Jp Calderone
On Sat, 4 Dec 2004 15:40:44 -0200, Carlos Ribeiro <[EMAIL PROTECTED]> wrote: >On Sat, 04 Dec 2004 16:17:06 GMT, Jp Calderone <[EMAIL PROTECTED]> wrote: > > I haven't used LivePage myself, but someone in the know tells me > > that LivePage requires an extra, non-HTTP connection to operate, so > >

Re: assymetry between a == b and a.__eq__(b)

2004-12-04 Thread Peter Otten
Tim Peters wrote: > See the Python (language, not library) reference manual, section 3.3.8 > ("Coercion rules"), bullet point starting with: > > Exception to the previous item: if the left operand is an > instance of a built-in type or a new-style class, and the right > operand is an

Re: os.listdir("\\\\delta\\public")

2004-12-04 Thread Ishwor
On Sat, 04 Dec 2004 11:40:15 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: > As Michael points out, there's no reason to think that should > have worked. You can't do a directory of a computer, only > a drive on the computer, and likewise you can't do a directory > of a computer on a network, on

Opening a file in Python using windows.

2004-12-04 Thread Ishwor
On 3 Dec 2004 08:38:37 -0800, ed <[EMAIL PROTECTED]> wrote: > I do have permission toa ccess the file as that file is careted and read my > me. > I have read/write access to that location. regards That shouldn't be really hard. :) okay imagine you have a file called test.txt in C:\Python24\ now

Re: Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Fredrik Lundh
Dave Benjamin wrote: > I looked around for recordings of Guido, but couldn't find any. Does anyone > know of any streamable audio (or video) interviews or speeches featuring > Guido, the bots a bot-owned horse is featured on this DVD: http://www.discshop.se/LIVE/shop/ds_produkt.php?lang=&id=3972

Re: assymetry between a == b and a.__eq__(b)

2004-12-04 Thread Tim Peters
[Mel Wilson] > :) Seems to: > > > Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> class Eq(object): > ... def __eq__(self, other): > ... return True > ... > >>> class Neq(Eq

Re: Refactoring a generator function

2004-12-04 Thread Steven Bethard
Kent Johnson wrote: Here is a simple function that scans through an input file and groups the lines of the file into sections. Sections start with 'Name:' and end with a blank line. The function yields sections as they are found. def makeSections(f): currSection = [] for line in f:

Re: os.listdir("\\\\delta\\public")

2004-12-04 Thread Peter Hansen
Egor Bolonev wrote: import os print os.listdir("delta") outputs Traceback (most recent call last): File "C:\Documents and Settings\Егор\My Documents\Scripts\test.py", line 4, in ? print os.listdir("delta") WindowsError: [Errno 53] : 'delta/*.*' so how to get list of delta's shares

Re: Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Peter Hansen
Dave Benjamin wrote: Ever since I heard Paul Graham's OSCON speech as audio, I've been somewhat interested in hearing what all these voices of computer culture sound like, and what they talk about. I enjoyed a few of Larry Wall's speeches as well as Tim O'Reilly's, here: http://technetcast.ddj.com/

os.listdir("\\\\delta\\public")

2004-12-04 Thread Ishwor
hi check your seperator variable in the os module. :) for example >>> import os >>> os.sep '\\' Now what you do is :- >> os.listdir("D:" + os.sep + "any_other_folder_name" + os.sep); :) Have a look at the error below which is same as yours. The seperator variable is put after the drive name and n

Re: Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Fredrik Lundh
Dave Benjamin wrote: > I looked around for recordings of Guido, but couldn't find any. http://www.python.org/~guido/guido.au -- http://mail.python.org/mailman/listinfo/python-list

Re: Quixote+Nevow+LivePage

2004-12-04 Thread Jp Calderone
On 3 Dec 2004 22:02:51 -0800, Mir Nazim <[EMAIL PROTECTED]> wrote: >Hi > > I am a PHP developer and in trying to get a better tool for developing > web apps, I have been strugling with zope for past few months and > still could not get anything useful work up and going. I really felt > that "Z" sh

Atlanta Area Pythonistas

2004-12-04 Thread Jeremy Jones
We will be having an informal gathering of Atlanta-area Pythonistas on Thursday, December 9 at 7:30PM at the Caribou at N. Druid Hills and LaVista. Anyone interested (even if you can't come), please email me (zanesdad at bellsouth dot net) so I can know how many people to expect (or, how many

Re: using cmd.exe as a telnet client

2004-12-04 Thread Jp Calderone
On Sat, 4 Dec 2004 03:31:12 -0800 (PST), Eyal Lotem <[EMAIL PROTECTED]> wrote: > > You simple have to run PyInvoke's server.py on the > server, and then in the client, you can Pythonically > control anything on the server: > > client = pyinvoke.connect(('some_server', some_port)) > client.modules

Re: Help with modules/packages.

2004-12-04 Thread Steve Holden
Christopher J. Bottaro wrote: Hello, I want to be able to say stuff like "import CJB.ClassA" and "import CJB.ClassB" then say "c = CJB.ClassA()" or "c = CJB.ClassB()". CJB will be a directory containing files "ClassA.py" and "ClassB.py". Now that I think about it, that can't work b

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-04 Thread Gustavo Córdova Avila
Thomas Heller wrote: Gerrit <[EMAIL PROTECTED]> writes: Cameron Laird wrote: Subject: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2) What is the frequency of the weekly Python-URL? (-; According to the name, about 1.6 µHz. Thomas NOW you've done it!! Made me s

Re: os.listdir("\\\\delta\\public")

2004-12-04 Thread Michael Hoffman
Egor Bolonev wrote: print os.listdir("delta") WindowsError: [Errno 53] : 'delta/*.*' so how to get list of delta's shares? I'm sure someone will post the answer shortly, but you shouldn't expect that to work. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Cor

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-04 Thread chriskreuzer
David Fraser wrote: > Rocco Moretti wrote: > > I'm sorry I'm not able to give a direct URL, but it seems they've > > switched over to a horrendously long, stateful URL system which doesn't > > lend itself to direct linkage. > > Doesn't seem stateful to me, just has different thread / message id

Re: Import Semantics, or 'What's the scope of an import?', and class attribute instantiation

2004-12-04 Thread Diez B. Roggisch
Hi, > I'm having some trouble with understanding python's importing behaviour > in my application. I'm using psyco to optimise part of my code, but I'm > not sure whether it inherits throughout the rest of my application (read > this as for any imported module) if I import in in a 'higher-level' >

Refactoring a generator function

2004-12-04 Thread Kent Johnson
Here is a simple function that scans through an input file and groups the lines of the file into sections. Sections start with 'Name:' and end with a blank line. The function yields sections as they are found. def makeSections(f): currSection = [] for line in f: line = line.strip

Error in previous post - Import behaviour

2004-12-04 Thread Andrew James
All, The example given in the previous e-mail I sent was wrong (and makes the question look stupid). In the attribute instantiation example, the __main__ declaration should read: > if __name__ == 'main': > y = myY() I meant it to show that even if I never instantiate X, its attributes still

Re: Pythonic use of CSV module to skip headers?

2004-12-04 Thread Michael Hoffman
Skip Montanaro wrote: I'm not sure what the use of TABs as delimiters has to do with the OP's problem. Not much. :) I just happen to use tabs more often than commas, so my subclass defaults to You can create a subclass of DictReader that plucks the first line out as a set of titles: class Sma

Re: Pythonic use of CSV module to skip headers?

2004-12-04 Thread Skip Montanaro
>> Assuming the header line has descriptive titles, I prefer the >> DictReader class. Unfortunately, it requires you to specify the >> titles in its constructor. My usual idiom is the following: Michael> I deal so much with tab-delimited CSV files that I found it Michael> us

Import Semantics, or 'What's the scope of an import?', and class attribute instantiation

2004-12-04 Thread Andrew James
All, I'm having some trouble with understanding python's importing behaviour in my application. I'm using psyco to optimise part of my code, but I'm not sure whether it inherits throughout the rest of my application (read this as for any imported module) if I import in in a 'higher-level' module. F

Re: Bug in py32win manual for file_locking for Python 2.4

2004-12-04 Thread Nick Coghlan
Pekka Niiranen wrote: However, using highbits=0x7fff # equals hex(sys.maxint) gives no errors, but does locking work if highbits are not exactly 0x? Try using highbits=-0x7fff as your mask. That should set the MSB without tripping over the sys.maxint limit. Cheers, Nick. -- http:/

Re: assymetry between a == b and a.__eq__(b)

2004-12-04 Thread Mel Wilson
In article <[EMAIL PROTECTED]>, Steven Bethard <[EMAIL PROTECTED]> wrote: >Mel Wilson wrote: >> In article <[EMAIL PROTECTED]>, >> Steven Bethard <[EMAIL PROTECTED]> wrote: >> >>>I believe what Peter Otten was pointing out is that calling __eq__ is >>>not the same as using ==, presumably because th

Bug in py32win manual for file_locking for Python 2.4

2004-12-04 Thread Pekka Niiranen
Hi, I tried to lock file in w2k using example directly from pyWin32 manual: #-- >>> import pywintypes >>> ov=pywintypes.OVERLAPPED() #used to indicate starting region to lock >>> highbits=0x >>> file="c:wilma.txt" >>> import win32file >>> import win32security >>> import win3

Re: python-mode question

2004-12-04 Thread Skip Montanaro
Thomas> When I edit a Python script with XEmacs, then hit C-c C-c, the Thomas> script is executed, the output is shown in a *Python Output* Thomas> buffer, and the cursor is moved into this buffer. Thomas> How can I change the behaviour so that the cursor stays where it Thomas

Re: help needed

2004-12-04 Thread Nick Coghlan
In response to your first message, I offered some ideas on how to get more useful responses, along with a couple of general techniques for finding the problem yourself. Reposting almost exactly the same message 8 or so hours later wasn't a suggestion featured in either category. Cheers, Nick.

Re: How is Python designed?

2004-12-04 Thread Diez B. Roggisch
Hi, > The basic idea of this technique is to create a class > to represent each type of script phrase(that's the > term I used in the program, it's just a piece of code > for particular task such assignment,logical/loop > control,function call, whatever). In the phase of > compiling, phrase instan

os.listdir("\\\\delta\\public")

2004-12-04 Thread Egor Bolonev
import os print os.listdir("delta\\public") outputs ['Bases', 'Docs', 'Drivers', 'Soft', '\xc7\xe0\xec\xe5\xed\xe0 \xd1\xe5\xf2\xe5\xe2\xee\xec\xf3 \xce\xea\xf0\xf3\xe6\xe5\xed\xe8\xfe', 'Games'] and import os print os.listdir("delta") outputs Traceback (most recent call last): File "C:

Re: [Python-Dev] PEP: __source__ proposal

2004-12-04 Thread Nick Coghlan
Stelios Xanthakis wrote: It appears that there are the 'module people' who find this feature irrelevant. Indeed. If we are interested in distributing modules and increasing the number of people who use python programs,then __source__ is redundant. OTOH, programming python is easy and fun and I thi

help needed

2004-12-04 Thread the_proud_family
HELP ME PLEASE!! I can't get the ball to go up right side and then I need it to turn around and keep turning until velocity=0 I have been at it for the past 2 weeks now i give up and call for help. Please if anyone can gide me through i will be so grateful!! I have pasted my code below fro

Re: Need help on program!!!

2004-12-04 Thread Miklós P
"Dan Perl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > I'm not sure what you mean by "benignity" here, but I think I agree with > you. Sympathy for TAs is not really my reason for how I feel towards I meant that I think the real (or long term) interest of the OP is to *learn

Re: Pythonic use of CSV module to skip headers?

2004-12-04 Thread Nick Coghlan
Michael Hoffman wrote: I deal so much with tab-delimited CSV files that I found it useful to create a subclass of csv.DictReader to deal with this, so I can just write: for row in tabdelim.DictReader(file(filename)): ... I think this is a lot easier than trying to remember this cumbersome id

Re: PyQT Licensing and plugins/scripting

2004-12-04 Thread Phil Thompson
On Saturday 04 December 2004 10:30 am, Michael Sparks wrote: > On Fri, 3 Dec 2004, Phil Thompson wrote: > ... > > > The key is access to the Qt API. If your applications gives the users > > access to the API then those users are developers and need their own > > licenses. On the other hand if the A

Re: using cmd.exe as a telnet client

2004-12-04 Thread Eyal Lotem
I think I have a much simpler solution for you guys.. Assuming you can run arbitrary code on the proprietary server. I wrote PyInvoke, and I use it as a much-easier-to-use replacement for telnet control of computers. It does require installing Python on the target server though. You simple have

Re: Pythonic use of CSV module to skip headers?

2004-12-04 Thread Michael Hoffman
Skip Montanaro wrote: Assuming the header line has descriptive titles, I prefer the DictReader class. Unfortunately, it requires you to specify the titles in its constructor. My usual idiom is the following: I deal so much with tab-delimited CSV files that I found it useful to create a subclass

ANN: PyTables 0.9.1 is out

2004-12-04 Thread Francesc Altet
Announcing PyTables 0.9.1 - This release is mainly a maintenance version. In it, some bugs has been fixed and a few improvements has been made. One important thing is that chunk sizes in EArrays has been re-tuned to get much better performance and compression rations. Besid

RE: Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Jimmy Retzlaff
Dave Benjamin wrote: > I looked around for recordings of Guido, but couldn't find any. Does > anyone know of any streamable audio (or video) interviews or speeches > featuring Guido, the bots, or any other interesting people in the Python > community? There's a video with a few folks in it at: ht

Re: How is Python designed?

2004-12-04 Thread Limin Fu
> If you want cutting-edge, mind twisting stuff, look > into > Psyco extension (Armin Rigo, 1.3 just announced > here) > Stackless extension (Christian Tismer) > PyPy (new interpreter written in Python, several > people, has EU funding) That would be interesting. However I am designing and impleme

Re: Newby Q: nested classes, access of upper method

2004-12-04 Thread Gregor Horvath
Hello Nick, thank you, your answer really helped me.. -- Greg Nick Coghlan wrote: Gregor Horvath wrote: Hello, class A(self): def A1(): pass class B(self): def B1(): # #*** How can I access A1 here *** #***

Re: pre-PEP generic objects

2004-12-04 Thread Steven Bethard
Istvan Albert wrote: but what are you saying? that a man cannot exaggerate and fudge the facts in order to embellish his argument? :-) Heh heh. Yeah, something like that. ;) Steve -- http://mail.python.org/mailman/listinfo/python-list

Audio interviews of Guido or other Python advocates?

2004-12-04 Thread Dave Benjamin
Ever since I heard Paul Graham's OSCON speech as audio, I've been somewhat interested in hearing what all these voices of computer culture sound like, and what they talk about. I enjoyed a few of Larry Wall's speeches as well as Tim O'Reilly's, here: http://technetcast.ddj.com/ I looked around for

Re: Newby Q: nested classes, access of upper method

2004-12-04 Thread Nick Coghlan
Gregor Horvath wrote: Hello, class A(self): def A1(): pass class B(self): def B1(): # #*** How can I access A1 here *** # self.A1() # doesnet work because self references to B self.

Re: PyQT Licensing and plugins/scripting

2004-12-04 Thread Michael Sparks
On Fri, 3 Dec 2004, Phil Thompson wrote: ... > The key is access to the Qt API. If your applications gives the users access > to the API then those users are developers and need their own licenses. On > the other hand if the API is sufficiently removed from the Qt API then you > shouldn't have a pr

Re: Python2.4: building '_socket' extension fails with `INET_ADDRSTRLEN' undeclared

2004-12-04 Thread Michael Ströder
Martin v. Löwis wrote: Michael Ströder wrote: I'm trying to build Python2.4 on a rather old Debian machine. I only have a shell account there. That's why I'm very limited in my actions. Building _socket fails (see below) although I tried to use configure --disable-ipv6 Any clue? Hard to say, sinc

Re: Help me asap!!

2004-12-04 Thread Nick Coghlan
the_proud_family wrote: HELP ME PLEASE!! I can't get the ball to go up right side and then I need it to turn around and keep turning until velocity=0 I have been at it for the past 2 weeks now i give up and call for help. Please if anyone can gide me through i will be so grateful!! I have pasted

Re: Replace string except inside quotes?

2004-12-04 Thread M.E.Farmer
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote in message > The source for the tokenize module covers all these bases. > Raymond Hettinger # tokenize text replace import keyword, os, sys, traceback import string, cStringIO import token, tokenize #