Re: Burrows-Wheeler (BWT) Algorithm in Python

2005-11-03 Thread DENG
thanks very much Michael i'll try your implementation, i hope i can improve it after i understand all the theory:) cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-03 Thread Antoon Pardon
Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>: > On Thu, 03 Nov 2005 14:13:13 +, Antoon Pardon wrote: > >> Fine, we have the code: >> >> b.a += 2 >> >> We found the class variable, because there is no instance variable, >> then why is the class variable not incremented by two n

Re: Class Variable Access and Assignment

2005-11-03 Thread Graham
Once again, many thanks, your explainations are very detailed and i think i'm in full understanding of the what/when/why of it all. And with further introspection i can see why its done this way from a language processing point of view rather than programming one. I also now realize that . is ther

Re: Class Variable Access and Assignment

2005-11-03 Thread Antoon Pardon
Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>: > Antoon Pardon <[EMAIL PROTECTED]> writes: > >> Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>: >> > Antoon Pardon <[EMAIL PROTECTED]> writes: >> > >> > ... >> > >> >> Fine, we have the code: >> >> >> >> b.a += 2 >> >> >> >> W

Re: I need Motivation

2005-11-03 Thread [EMAIL PROTECTED]
Martin P. Hellwig wrote: > [EMAIL PROTECTED] wrote: > > I m not a python Expert or anythin > > i need help, i m losin my motivation to continue with python > > can anyone inspire me again.??? > > Ooh that is easy, start learning other programming languages, you'll go > back continuing with python

Re: I need Motivation

2005-11-03 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: > I m not a python Expert or anythin > i need help, i m losin my motivation to continue with python > can anyone inspire me again.??? Ooh that is easy, start learning other programming languages, you'll go back continuing with python very soon after that! ;-) -- mph --

Re: I need Motivation

2005-11-03 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I m not a python Expert or anythin > i need help, i m losin my motivation to continue with python > can anyone inspire me again.??? Why continue then ? -- http://mail.python.org/mailman/listinfo/python-list

Re: reading internet data to generate random numbers.

2005-11-03 Thread venk
hotbits hotbits hotbits! http://www.fourmilab.ch/hotbits/ based on quantum mechanics check it out! -- http://mail.python.org/mailman/listinfo/python-list

Re: I need Motivation

2005-11-03 Thread Alex Martelli
[EMAIL PROTECTED] wrote: > I m not a python Expert or anythin > i need help, i m losin my motivation to continue with python > can anyone inspire me again.??? Not without knowing more about your motivations for starting Python in the first place... Alex -- http://mail.python.org/mailman/listi

Re: Anomaly in creating class methods

2005-11-03 Thread Alex Martelli
venk <[EMAIL PROTECTED]> wrote: > Cool, > i got it now... accessing thru attribute reference always > returns a bound or unbound method... so, D.f is an unbound method Right. Specifically, accessing through a (newstyle) class or instance always calls the __get__ method of a descriptor [

Re: /usr/lib/python2.4/posixfile.py error

2005-11-03 Thread Martin v. Löwis
Chris wrote: > Wonder if anyone can help me? I very much doubt that, with as little information you gave us. > I am trying to run a perl script but I keep getting this error: > > /usr/lib/python2.4/posixfile.py:59: DeprecationWarning: The posixfile > module is obsolete and will disappear in the

I need Motivation

2005-11-03 Thread [EMAIL PROTECTED]
I m not a python Expert or anythin i need help, i m losin my motivation to continue with python can anyone inspire me again.??? -- * Posted with NewsLeecher v3.0 Beta 7 * http://www.newsleecher.com/?usenet -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Anyone Help me on this

2005-11-03 Thread [EMAIL PROTECTED]
Thx Alex. -- * Posted with NewsLeecher v3.0 Beta 7 * http://www.newsleecher.com/?usenet -- http://mail.python.org/mailman/listinfo/python-list

/usr/lib/python2.4/posixfile.py error

2005-11-03 Thread Chris
Hi, Wonder if anyone can help me? I am trying to run a perl script but I keep getting this error: /usr/lib/python2.4/posixfile.py:59: DeprecationWarning: The posixfile module is obsolete and will disappear in the future DeprecationWarning) I am running Ubuntu Hoary 5.10. I'll try the same

Re: Burrows-Wheeler (BWT) Algorithm in Python

2005-11-03 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Michael J. Fromberger: > > I can send you a Python implementation I wrote, if you like; but if > > you're interested in better understanding how the transform works, > > I would recommend you try writing your own implementation. > > I'

Re: Anomaly in creating class methods

2005-11-03 Thread venk
Cool, i got it now... accessing thru attribute reference always returns a bound or unbound method... so, D.f is an unbound method whereas i want the "function" of the unbound method... ok, this example and the nice explanations definitively thought me about function, bound method (for

Re: Can Anyone Help me on this

2005-11-03 Thread Alex Martelli
[EMAIL PROTECTED] wrote: > Thanks Guys, Wow, i didnt knew that there was alist reverse function. > thx. also. i need a good documentation of the os and sys modules as > well as builtin functions of python. > > the standard python documentation doesnt work for me. can u recommend > something? I

Re: Anomaly in creating class methods

2005-11-03 Thread Alex Martelli
venk <[EMAIL PROTECTED]> wrote: > Hi, > given below is my interaction with the interpreter In one case, i > have created the class method using the "famous idiom"... and in the > other, i have tried to create it outside the class definition... why > isn't the latter working ? (of course, the

Re: Learning multiple languages (question for general discussion)

2005-11-03 Thread Alex Martelli
Magnus Lycka <[EMAIL PROTECTED]> wrote: > John Salerno wrote: > > LOL. As weird as it sounds, that's what I *don't* want to happen with > > C#! I've spent a lot of time with it, and I love it, but I don't want > > Python to take over! :) > > Then it might be better to keep away from Python. It *

Re: installing PygreSQL and psychopg2 modules (a newbie question)

2005-11-03 Thread Steve Holden
Zlatko Matić wrote: > Hello. > I was trying to install PygreSQL and psychopg2 in order to use python as > front-end for PostgreSQL, on WIndows XP. > When I tried to install by calling setup.py from command prompt ("setup.py > install"), in both cases I had the same error: > > "error: Python was

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Steve Holden
Magnus Lycka wrote: > Stuart Turner wrote: > >>Hi Everyone, >> >>I'm working hard trying to get Python 'accepted' in the organisation I work >>for. I'm making some good in-roads. One chap sent me the text below on >>his views of Python. I wondered if anyone from the group could give me >>some a

Re: Can Anyone Help me on this

2005-11-03 Thread [EMAIL PROTECTED]
Thanks Guys, Wow, i didnt knew that there was alist reverse function. thx. also. i need a good documentation of the os and sys modules as well as builtin functions of python. the standard python documentation doesnt work for me. can u recommend something? -- * Posted with NewsLeecher v3.0 Beta

Re: when and how do you use Self?

2005-11-03 Thread Alex Martelli
Tieche Bruce A MSgt USMTM/AFD <[EMAIL PROTECTED]> wrote: ... > I am new to python, > Could someone explain (in English) how and when to use self? A class's methods use 'self' to refer to the object (instance of the class) they're being called on; mostly, they access (get or set) attributes on s

Re: Class Variable Access and Assignment

2005-11-03 Thread Steve Holden
Antoon Pardon wrote: > Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>: [...] >>It is all according to how things have been in Python for a long time. > > Unsane behaviour for a long time is still unsane behaviour. > As your continued contributions on this newsgroup so adequately demons

Re: Class Variable Access and Assignment

2005-11-03 Thread Steve Holden
Graham wrote: > Thanks to all of you for your reply's i had no idea it would get this > sort of response, > i've read through most of the posts and it seems that its a active > topic. > > My question remains however, i suppose i'm not familiar with how this > functions in > other languages, but wh

Re: Class Variable Access and Assignment

2005-11-03 Thread Steve Holden
Antoon Pardon wrote: > Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>: > >>Antoon Pardon <[EMAIL PROTECTED]> writes: >> >>... >> >> >No matter wat the OO model is, I don't think the following code >exhibits sane behaviour: > >class A: > a = 1 > >b = A() >

Re: Cheapest pocket device to code python on

2005-11-03 Thread Devan L
[EMAIL PROTECTED] wrote: > What is the cheapest/affordable pocket device that I can code python > on? I think the closest I have seen is pocketpc from this page: > > http://www.murkworks.com/Research/Python/PocketPCPython/Overview I would not recommend trying to code on a handheld device. Small s

Re: random number generator

2005-11-03 Thread avnit
import random print random.randint(1,20) #prints random integer from 1 to 20 -- http://mail.python.org/mailman/listinfo/python-list

Re: OT - Re: Microsoft Hatred FAQ

2005-11-03 Thread Steve Holden
Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>>There is a difference between what is *illegal* and what constitutes >>>a *crime*. >> >>Why thank you, you've really made my day. That's the funniest thing I've >>heard in months. Please, do tell, which brand of corn flakes was i

Cheapest pocket device to code python on

2005-11-03 Thread theboringdays
What is the cheapest/affordable pocket device that I can code python on? I think the closest I have seen is pocketpc from this page: http://www.murkworks.com/Research/Python/PocketPCPython/Overview -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-03 Thread Mike Meyer
"Graham" <[EMAIL PROTECTED]> writes: > Many thanks your explaination cleared up many of the questions I had. > I know think i can understand the purpose, regardless of my opinion, i > do however think that one should be able to assign the value in the > same way it is accessed. That's not true in

Re: Class Variable Access and Assignment

2005-11-03 Thread Steven D'Aprano
Graham wrote: > Many thanks your explaination cleared up many of the questions I had. > I know think i can understand the purpose, regardless of my opinion, i > do however think that one should be able to assign the value in the > same way it is accessed. You mean, like this? # access the value

Re: How can I package a python script and modules into a single script?

2005-11-03 Thread Alex Martelli
Noah <[EMAIL PROTECTED]> wrote: > This is interesting, but requires two separate files -- the ZIP file > and the boot script. No, it doesn't. > This is because zipimport can only import from file paths. It can import from a file, and the file (like all zipfiles) can have a prefix. That prefix

Re: putting an Icon in "My Computer"

2005-11-03 Thread kurganme
yaipa wrote: > All, > > I've been asked by my boss to put an Icon in WinXP's "My Computer" for > a utility we use around the shop. My tool of choice is of course > Python and therefore what I am using to attempt my given task. I have > no trouble putting Icons in the WinXP Toolbar using Python,

Re: Not Equal to Each Other?

2005-11-03 Thread Bengt Richter
On 3 Nov 2005 17:01:08 -0800, [EMAIL PROTECTED] wrote: >Another question: I am writing a sudoku solving program. The >'solving' part of is just multiple iterations. It will take random >numbers and keep switching it all around until a set of logic >statements has been met (ie; all numbers in a

Re: Python's website does a great disservice to the language

2005-11-03 Thread The Eternal Squire
Well, I admit the remark was off the cuff because I was thinking of conventional waterfall development cycles in the aerospace industry in that context someone who wasn't there during an entire development cycle is not even a junior member, but is rather a recruit under training to begin actua

Re: Not Equal to Each Other?

2005-11-03 Thread ale . of . ginger
For the not cellboard[0] in cellboard[1:8] (I knew about ranges/slicing using a colon, can't believe I didn't think of that!) line, will I have to write that out for each number? So the line: not cellboard in ((cellboard[1:8]) and (cellboard[9] and cellboard[18] and cellboard[27] and cellboard[

reading a config file

2005-11-03 Thread s99999999s2003
hi i used ConfigParser to read a config file. I need the config file to have identical sections. ie : [server] blah = "some server" [destination] blah = "some destination" [end] end= '' [server] blah = "some other server" [destination] blah = "some other destination" [end] end='' and i need to c

Re: Class Variable Access and Assignment

2005-11-03 Thread Bengt Richter
On 3 Nov 2005 12:20:35 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>: >> Antoon Pardon <[EMAIL PROTECTED]> writes: >> >>> Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>: >>> >>> >> There are two possible fixes, either by prohib

Re: How can I package a python script and modules into a single script?

2005-11-03 Thread Noah
This is interesting, but requires two separate files -- the ZIP file and the boot script. This is because zipimport can only import from file paths. It can't import from a string or an IOString (as far as I can tell). If only they would let you import from an already open file. Damn! Squeeze is 99

Re: Not Equal to Each Other?

2005-11-03 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > Rather than writing > > cellboard[0] is not* (cellboard[1] and cellboard[2] and cellboard[3] > and cellboard[4] ... cellboard[8]) > cellboard[1] is not (cellboard[0] and cellboard[2] and cellboard[3] and > cellboard[4] ... cellboard[8]) Urgh... the fastest way

Re: Python's website does a great disservice to the language

2005-11-03 Thread Alex Martelli
Rocco Moretti <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > The Eternal Squire <[EMAIL PROTECTED]> wrote: > >... > > > >>2) Consider what he really wants for a supervisor of software > >>engineers. Ideally such a person should be a software engineer with > >>at least 3 times the ex

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > But when we talk about organisation(and convincing sometimes not on > merit sake), banner name helps. I was once in organisation where The > MS/Intel/IBM combination is a sure thing because even if there is > anything went wrong, it wouldn't be the re

Re: putting an Icon in "My Computer"

2005-11-03 Thread Ivan Shevanski
On 11/3/05, Ivan Shevanski <[EMAIL PROTECTED]> wrote: On 3 Nov 2005 18:28:49 -0800, Brett Hoerner < [EMAIL PROTECTED]> wrote: > I've been asked by my boss to put an Icon in WinXP's "My Computer" for> a utility we use around the shop.  My tool of choice is of course > Python and therefore what

Re: putting an Icon in "My Computer"

2005-11-03 Thread Ivan Shevanski
On 3 Nov 2005 18:28:49 -0800, Brett Hoerner <[EMAIL PROTECTED]> wrote: > I've been asked by my boss to put an Icon in WinXP's "My Computer" for> a utility we use around the shop.  My tool of choice is of course > Python and therefore what I am using to attempt my given task.  I have> no trouble pu

Re: How can I package a python script and modules into a single script?

2005-11-03 Thread Brett Hoerner
Would PythonEggs be close? It's basically a zip format with all the Python files inside, it would maintain the structure and not be a single script file, but would be a single .egg file... the end user would just run the script and all would be installed, essentially. http://peak.telecommunity.co

Re: putting an Icon in "My Computer"

2005-11-03 Thread Peter Hansen
yaipa wrote: > I've been asked by my boss to put an Icon in WinXP's "My Computer" for > a utility we use around the shop. My tool of choice is of course > Python and therefore what I am using to attempt my given task. I have > no trouble putting Icons in the WinXP Toolbar using Python, but have >

Re: putting an Icon in "My Computer"

2005-11-03 Thread Brett Hoerner
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for > a utility we use around the shop. My tool of choice is of course > Python and therefore what I am using to attempt my given task. I have > no trouble putting Icons in the WinXP Toolbar using Python, but have > totally fail

Re: reading internet data to generate random numbers.

2005-11-03 Thread Peter Hansen
Steven D'Aprano wrote: > On Thu, 03 Nov 2005 16:40:43 -0500, Peter Hansen wrote: >>Steven D'Aprano wrote: >> >>>On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote: >>> I've never heard of anybody using the data as source of entropy. >>> >>>Me neither, but the original poster did ask

putting an Icon in "My Computer"

2005-11-03 Thread yaipa
All, I've been asked by my boss to put an Icon in WinXP's "My Computer" for a utility we use around the shop. My tool of choice is of course Python and therefore what I am using to attempt my given task. I have no trouble putting Icons in the WinXP Toolbar using Python, but have totally failed t

Re: Class Variable Access and Assignment

2005-11-03 Thread Graham
Many thanks your explaination cleared up many of the questions I had. I know think i can understand the purpose, regardless of my opinion, i do however think that one should be able to assign the value in the same way it is accessed. Given your previous example: > class Counter(object): > "A

Re: Not Equal to Each Other?

2005-11-03 Thread Stephen Thorne
On 3 Nov 2005 17:01:08 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > the above so that all the data in one row is not equal to each other, > is there something I can write to make it simpler? For example, > (cellboard[0] is not cellboard[1] is not ... cellboard[8]) only worked > for the nu

Re: when and how do you use Self?

2005-11-03 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Thu, 03 Nov 2005 20:19:03 +0100, bruno at modulix wrote: > > >>Steven D'Aprano wrote: >> >>>On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote: >>> >>> >>> Tieche Bruce A MSgt USMTM/AFD wrote: >I am new to python, > > > >Cou

Re: How can I package a python script and modules into a single script?

2005-11-03 Thread Noah
Bingo! That is what I was thinking of. http://effbot.org/zone/squeeze.htm It turns out that it doesn't quite do what I want because the resulting script is tightly coupled to the version of Python used to build the package. It compiles the PYC byte-code into the package. It's neat and I may be

Re: How can I package a python script and modules into a single script?

2005-11-03 Thread Noah
Freeze also packages the python interpreter into a binary. I need a cross platform solution that just packages the scripts. I expect the user to already have python installed. Yours, Noah -- http://mail.python.org/mailman/listinfo/python-list

Re: ADT for restricted set of values

2005-11-03 Thread Graham Fawcett
Ben Finney wrote: > Howdy all, > > I'd like to have an Abstract Data Type for a scalar value that is > restricted to a small set of values. Like an Enum, I suppose. > > What I would like is to be able to use simple 'str' values in most of > the code, but where the values are actually used in a sema

Not Equal to Each Other?

2005-11-03 Thread ale . of . ginger
Another question: I am writing a sudoku solving program. The 'solving' part of is just multiple iterations. It will take random numbers and keep switching it all around until a set of logic statements has been met (ie; all numbers in a row are not equal to each other) ... that's where my questio

ADT for restricted set of values

2005-11-03 Thread Ben Finney
Howdy all, I'd like to have an Abstract Data Type for a scalar value that is restricted to a small set of values. Like an Enum, I suppose. What I would like is to be able to use simple 'str' values in most of the code, but where the values are actually used in a semantically meaningful context, h

Pythonwin - Word automation - Removing watermark not working

2005-11-03 Thread Gregory Piñero
I thought I'd take a shot and see if anyone knows the answer to this?  I've been stuck for a while now on this. Would anyone happen to know why this my function removewatermark() in this code isn't working?  I copied it from a Word macro I recorded and it did work when I recorded the macro.  When

Re: Learning multiple languages (question for general discussion)

2005-11-03 Thread Kent Johnson
John Salerno wrote: > I thought it might be interesting to get some opinions on when you know > when you're "done" learning a language. I've been learning C# for a few > months (albeit not intensively) and I feel I have a good grasp of the > language in general. Never? When you move on? You ca

Re: Learning multiple languages (question for general discussion)

2005-11-03 Thread Jeremy Greenwald
I would say that learning a few languages is necessary to realizing what type of things different languages excel at. For instance I didn't understand why java would never allocate objects on the stack until I read about using object pointers in C++ to lower compilation dependecies. This helped m

Re: OT - Re: Microsoft Hatred FAQ

2005-11-03 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > There is a difference between what is *illegal* and what constitutes > > a *crime*. > > Why thank you, you've really made my day. That's the funniest thing I've > heard in months. Please, do tell, which brand of corn flakes was it that > you got your

Re: OT - Re: Microsoft Hatred FAQ

2005-11-03 Thread Tim Daneliuk
Steven D'Aprano wrote: > On Thu, 03 Nov 2005 14:56:44 -0500, Tim Daneliuk wrote: > > >>There is a difference between what is *illegal* and what constitutes >>a *crime*. > > > Why thank you, you've really made my day. That's the funniest thing I've > heard in months. Please, do tell, which bran

RE: Python Framework that works with IIS/SQL Server?

2005-11-03 Thread Robert Brewer
[EMAIL PROTECTED] wrote: > I'd like to find a web framework that works with IIS and SQL Server on > Windows(I know-but I didn't make that decision). Anyhow, I've > looked at Turbogears, Django, subway and didn't see any evidence > that anyone had made these work in that configuration. > Any sugges

ImportError with packages

2005-11-03 Thread mr19
I'm running into import problems trying to create a package that is similiar in layout to the one in the docs described here: http://www.boost.org/libs/python/doc/tutorial/doc/html/python/techniques.html#python.creating_packages So my package layout is as follows: xyzzy/ __init__.py

UART parity setting as "mark" or "space" (using Pyserial???)

2005-11-03 Thread Petr Jakes
Hi, I am trying to set-up communication to the coin change-giver from my Linux box using the Python code. The change giver uses MDB (Multi Drop Bus) serial protocol to communicate with the master. MDB protocol is the 9bit serial protocol: (TX, RX lines only) 9600bps, 9bits, No Parity, 1 Start, 1 S

Python Framework that works with IIS/SQL Server?

2005-11-03 Thread randall_burns
I'd like to find a web framework that works with IIS and SQL Server on Windows(I know-but I didn't make that decision). Anyhow, I've looked at Turbogears, Django, subway and didn't see any evidence that anyone had made these work in that configuration. Any suggestions? -- http://mail.python.org/m

Re: when and how do you use Self?

2005-11-03 Thread Bruno Desthuilliers
Jeffrey Schwab a écrit : > bruno at modulix wrote: > >> Steven D'Aprano wrote: >> >>> On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote: >>> Tieche Bruce A MSgt USMTM/AFD wrote: > I am new to python, > > Could someone explain (in English) how and when to use self? >>

Re: reading internet data to generate random numbers.

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 16:40:43 -0500, Peter Hansen wrote: > Steven D'Aprano wrote: >> On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote: >>> >>>I've never heard of anybody using the data as source of >>>entropy. >> >> Me neither, but the original poster did ask how to read every nth byte >>

Re: python, mssql and unicode

2005-11-03 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello, > > I am using pymssql (http://pymssql.sourceforge.net/) to insert data > from a web-frontend (encoded in utf-8) into fields of type nvarchar of > an MS-SQL Server 2000. > > The problem is, ms-sql server uses ucs-2 and not utf-8. I have looked > around a bit but

Re: when and how do you use Self?

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 20:19:03 +0100, bruno at modulix wrote: > Steven D'Aprano wrote: >> On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote: >> >> >>>Tieche Bruce A MSgt USMTM/AFD wrote: >>> I am new to python, Could someone explain (in English) how and when to use

Re: Class Variable Access and Assignment

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 10:01:04 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> Then you don't approve of inheritance? That's fine, it is your choice, but >> as far as I know, all OO languages include inheritance. > > Some OO languages only implement inheritance for method

Re: Can Anyone Help me on this

2005-11-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > i m trying to reverse the order in which the > strings are stored in list > > then pop it into another list > > what m i doin worng?? > > here's the code: > > list1 = [] > list2 = [] > list1.extend('123456789') How about this instead (Python 2.4 or later): list2 = l

Re: How to read all files in a directory

2005-11-03 Thread Larry Bates
Not tested: import glob import os path=r'C:\datafiles\' for fileName in glob.glob(os.path.join(path,'*.DAT')): dataFile=open(fileName, 'r').readlines() . . Continue yur code here . -Larry Bates hungbichvo wrote: > Dear All, > > My python application is small. It reads data from

Re: reading internet data to generate random numbers.

2005-11-03 Thread Peter Hansen
Steven D'Aprano wrote: > On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote: >> >>I've never heard of anybody using the data as source of >>entropy. > > Me neither, but the original poster did ask how to read every nth byte > of "the Internet stream", so I assumed he had something like that

Re: reading internet data to generate random numbers.

2005-11-03 Thread Grant Edwards
On 2005-11-03, Peter Hansen <[EMAIL PROTECTED]> wrote: >>>I've never heard of anybody using the data as source of >>>entropy. >> >> Me neither, but the original poster did ask how to read every >> nth byte of "the Internet stream", so I assumed he had >> something like that in mind. > > And to

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Stuart Turner
Thanks to Everyone for replying - it has given me much food for thought. - Stuart Stuart Turner wrote: > Hi Everyone, > > I'm working hard trying to get Python 'accepted' in the organisation I > work > for. I'm making some good in-roads. One chap sent me the text below on > his views of Pyth

Re: computer programming

2005-11-03 Thread Ben Finney
Brandon K <[EMAIL PROTECTED]> wrote: > what is .tk? Turkmenistan? or is it just some arbitrary suffix. The country top-level domains are the ISO 3166 two-letter country codes. http://dmoz.com/Science/Reference/Standards/Individual_Standards/ISO_3166/> -- \"Nothing in life is so

Re: Class Variable Access and Assignment

2005-11-03 Thread Mike Meyer
"Graham" <[EMAIL PROTECTED]> writes: > I just seems to me that . shouldn't defer to the class > variable if > an instance variable of the same name does not exists, it should, at > least how i > understand it raise an exception. > > Is my thinking way off here? Yes. This behavior is how you get in

Re: Class Variable Access and Assignment

2005-11-03 Thread Graham
Thanks to all of you for your reply's i had no idea it would get this sort of response, i've read through most of the posts and it seems that its a active topic. My question remains however, i suppose i'm not familiar with how this functions in other languages, but what is the common way of referr

Re: Contest snub?

2005-11-03 Thread Matt
Updated: http://www.apress.com/promo/fractal/result.html -- http://mail.python.org/mailman/listinfo/python-list

Re: NTFS reparse points

2005-11-03 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, Stanislaw Findeisen <[EMAIL PROTECTED]> wrote: ... > However I can't see FILE_ATTRIBUTE_REPARSE_POINT turned on in any file / > directory shortcuts I create. In fact the only attribute set in > shortcuts created using Windows Explorer is FILE_ATTRIBUTE_ARCHIVE. (

Re: Burrows-Wheeler (BWT) Algorithm in Python

2005-11-03 Thread bearophileHUGS
Michael J. Fromberger: > I can send you > a Python implementation I wrote, if you like; but if you're interested > in better understanding how the transform works, I would recommend you > try writing your own implementation. I'd like to see it, if you want you can put it somewhere or send it direc

Re: OT - Re: Microsoft Hatred FAQ

2005-11-03 Thread Tim Daneliuk
Steven D'Aprano wrote: > On Thu, 03 Nov 2005 04:34:20 -0500, Tim Daneliuk wrote: > > > >>A) I don't much care if people wander off topic from time to time - >>that's what filters are for. But as a matter of general courtesy >>is it too much to ask that the subject line be so marked? >

Re: Running autogenerated code in another python instance

2005-11-03 Thread Tom Anderson
On Thu, 3 Nov 2005, Paul Cochrane wrote: > On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote: > >> On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> >> wrote: >> >>> I've got an application that I'm writing that autogenerates python >>> code which I then execute wi

Re: when and how do you use Self?

2005-11-03 Thread Jeffrey Schwab
bruno at modulix wrote: > Steven D'Aprano wrote: > >>On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote: >> >> >> >>>Tieche Bruce A MSgt USMTM/AFD wrote: >>> >>> I am new to python, Could someone explain (in English) how and when to use self? >>> >>>Don't use se

Re: Can Anyone Help me on this

2005-11-03 Thread jmdeschamps
... list2=list1[:] ... Yes, naturally, where was my head ?-)) -- http://mail.python.org/mailman/listinfo/python-list

Re: when and how do you use Self?

2005-11-03 Thread Jorge Godoy
bruno at modulix <[EMAIL PROTECTED]> writes: > >>Don't use self. Use other. > > > > > > Are you serious? > > Are you seriously wondering if I am serious ? Hmmm... I hope there's no deadlock in this loop... -- Jorge Godoy <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo

Re: Python's website does a great disservice to the language

2005-11-03 Thread The Eternal Squire
And me, I'm a 15 to 20 year veteran, I started *very* young I think Alex has it right. Too many of us elders are like he says.. I try not to be, to the point where I accepted a promotion from my captain (wife) from chief engineer of the family to executive officer (as in, I am now my daughter

Re: Can Anyone Help me on this

2005-11-03 Thread Mike Meyer
[EMAIL PROTECTED] writes: > If what you want is a reversed copy, you could just append list1 > elements to list2, and use the reverse function such as ... for i in list1: > ... list2.append(i) > ... Don't do this by ahnd - let python do it for you: list2 = list(list1) or list2 = lis

Re: when and how do you use Self?

2005-11-03 Thread bruno at modulix
Steven D'Aprano wrote: > On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote: > > >>Tieche Bruce A MSgt USMTM/AFD wrote: >> >>>I am new to python, >>> >>> >>> >>>Could someone explain (in English) how and when to use self? >>> >> >>Don't use self. Use other. > > > Are you serious? Are

Re: Anomaly in creating class methods

2005-11-03 Thread Bengt Richter
On 3 Nov 2005 03:19:22 -0800, "venk" <[EMAIL PROTECTED]> wrote: >Hi, > given below is my interaction with the interpreter In one case, i >have created the class method using the "famous idiom"... and in the >other, i have tried to create it outside the class definition... why >isn't the latter

Re: __slots__ and class attributes

2005-11-03 Thread Steven Bethard
Ewald R. de Wit wrote: > I'm running into a something unexpected for a new-style class > that has both a class attribute and __slots__ defined. If the > name of the class attribute also exists in __slots__, Python > throws an AttributeError. Is this by design (if so, why)? > > class A( object ):

Re: Can Anyone Help me on this

2005-11-03 Thread David Wahler
[EMAIL PROTECTED] wrote: > If what you want is a reversed copy, you could just append list1 > elements to list2, and use the reverse function such as > >>> ... > >>> for i in list1: > ... list2.append(i) > ... > >>> list2.reverse() > >>> list1 > ['1', '2', '3', '4', '5', '6', '7', '8', '9'] > >>>

Re: Can Anyone Help me on this

2005-11-03 Thread Cyril Bazin
Here is an example of copying then reversing a list: >>> l1 = [1,2,"C"] >>> l2 = l1[:] >>> l2.reverse() >>> l2 ['C', 2, 1] -- http://mail.python.org/mailman/listinfo/python-list

Re: Filepath string manipulation help

2005-11-03 Thread Steve Holden
mjakowlew wrote: > I got the "IE Fix" working, here's the code: > > > path = r'c:\here\there\files\file.ext' > > i=len(path) > j=0 > size=len(path) > > while i: > i=i-1 > if path[i]== '\\': > j=i+1 > break > > filename = path[j:size] > print "FILENAME:

Re: Web automation (was: Pressing a Webpage Button)

2005-11-03 Thread [EMAIL PROTECTED]
Twill or Pamie looks good, if your looking for a solution using Python. If you are looking for Cross- browser solution for testing there is also selenium that does that. The have some code for use in Python. There is also WATIR in RUBY and SAMIE in PERL It depends on your enviroment and needs.

Re: Web automation (was: Pressing a Webpage Button)

2005-11-03 Thread [EMAIL PROTECTED]
Twill or Pamie looks good, if your looking for a solution using Python. If you are looking for Cross- browser solution for testing there is also selenium that does that. The have some code for use in Python. There is also WATIR in RUBY and SAMIE in PERL It depends on your enviroment and needs.

Re: Class Variable Access and Assignment

2005-11-03 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: >> What would you expect to get if you wrote b.a = b.a + 2? > I would expect a result consistent with the fact that both times > b.a would refer to the same object. Except they *don't*. This happens in any language that resolves references at run time. Cha

Re: random number generator

2005-11-03 Thread Fredrik Lundh
> How to generate a random number in Python. Is there any build in > function I can call? >>> import random >>> help(random) also see: http://docs.python.org/lib/module-random.html -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >