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

2005-11-03 Thread Thomas Heller
"Noah" <[EMAIL PROTECTED]> writes: > I would like to package my main script and all the > modules it imports into a single script that will > run just as the collection would. It should not > need to package standard Python lib modules -- just > my local modules. This is not the same question > th

pythonic

2005-11-03 Thread infidel
http://dictionary.reference.com/search?q=pythonic http://thesaurus.reference.com/search?r=2&q=pythonic -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Alex Martelli
Stuart Turner <[EMAIL PROTECTED]> wrote: ... > "Python is a scripting language like Perl, awk, tcl, Java etc... it is > not quite a fully developed OO language, but does support some OO that Perl > doesn't. To be clear, these scripting languages have their place in our > environment, but they

Re: OT - Re: Microsoft Hatred FAQ

2005-11-03 Thread Arthur
On Thu, 03 Nov 2005 23:25:45 +1100, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Accounting software comes to mind. But just because Microsoft >did not, or was unable to, illegally squelch competition in one market >does not excuse them for doing so in another. Just as a factual matter, while Mic

Re: Class Variable Access and Assignment

2005-11-03 Thread Stefan Arentz
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 > >> > >> We found the class variable, because there is no instance variable, > >>

Re: Class Variable Access and Assignment

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 13:01:40 +, Antoon Pardon wrote: >> Seems perfectly sane to me. >> >> 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. class RedList(list): colour = "re

Re: Filepath string manipulation help

2005-11-03 Thread qwweeeit
Hi mjakowlew, to get file basename in Linux I use simply: filepath.split('/')[-1] But in Windows, being the dir separator '\', you get into trouble if the dir or file name begins with one of the "escape sequences": \a ASCII Bell(BEL) \x07 \b ASCII Backspace (BS) \x08 \f

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > How about, Google use python extensively ? This I believe is a very > strong argument for any concern about python. I must admit to feeling very good when I read this kind of comment (it IS nice to see one's employer held up as a good example -- and,

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Alex Martelli
Roy Smith <[EMAIL PROTECTED]> wrote: > > because they do not come with the full range of libraries e.g GDI > > libraries. > > No language has libraries for everything you might ever possibly want to > do. Python has a wide range of libraries for many common tasks, but my no > means all. Still,

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

2005-11-03 Thread Alex Martelli
Noah <[EMAIL PROTECTED]> wrote: > I would like to package my main script and all the > modules it imports into a single script that will > run just as the collection would. It should not > need to package standard Python lib modules -- just > my local modules. This is not the same question > that

Re: when and how do you use Self?

2005-11-03 Thread Chris Cioffi
As a point of style: the 'other' identifier should only be used in Zen Metaclass programming as an implicit reference to the calling object or as a list of references to all other instances of the class. Context will make it both clear and obvious which use case is desired. On 03/11/05, bruno at

Re: Class Variable Access and Assignment

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 14:27:48 +0100, Sybren Stuvel wrote: > Antoon Pardon enlightened us with: >> I would expect a result consistent with the fact that both times b.a >> would refer to the same object. > > "b.a" is just a name, not a pointer to a spot in memory. Getting the > value associated with

Re: Python and MySQL

2005-11-03 Thread Gerhard Häring
Thomas Bartkus wrote: > [some posters having the idea that MySQLdb works without a C extension] > Okay - I neglected to look at the [site-packages] directory itself. Here I > do find [_mysql.pyd] full of binary code. A MySQLdb related file that > doesn't seem to have a corresponding file with Pyt

Re: Class Variable Access and Assignment

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 13:35:35 +, Antoon Pardon wrote: > Suppose I have code like this: > > for i in xrange(1,11): > b.a = b.a + i > > Now the b.a on the right hand side refers to A.a the first time through > the loop but not the next times. I don't think it is sane that which > object i

Re: Class Variable Access and Assignment

2005-11-03 Thread Steven D'Aprano
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 now? Because b.a += 2 expands to b.a = b.a + 2. Why would you want b.

Re: OT - Re: Microsoft Hatred FAQ

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 13:29:26 +0100, Jerzy Karczmarczuk wrote: > Now, tell me: is the polluting of a newsgroup with off-topic postings, > a crime, Not in any nation that values personal freedom over petty laws controlling people's behaviour for no good purpose. -- Steven. -- http://mail.pytho

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread [EMAIL PROTECTED]
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 reason for scrutiny comparing with say using a machine w

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: > > ... > >> 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 now? > > B

Re: Most efficient way of storing 1024*1024 bits

2005-11-03 Thread Tom Anderson
On Wed, 2 Nov 2005, Dan Bishop wrote: Tor Erik Sønvisen wrote: I need a time and space efficient way of storing up to 6 million bits. The most space-efficient way of storing bits is to use the bitwise operators on an array of bytes: Actually, no, it's to xor all the bits together and store

python, mssql and unicode

2005-11-03 Thread riek
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 found no suitable solution to this proble

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

2005-11-03 Thread Rocco Moretti
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 experience of the most junior member. Such a > > > I li

Re: Class Variable Access and Assignment

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 15:13:52 +0100, Eric Nieuwland wrote: > Stefan Arentz wrote: >> It is really simple. When you say b.a then the instance variable 'a' >> is looked up first. If it does not exist then a class variable lookup >> is done. > > This mixing of class and instance variable might be the

Re: when and how do you use Self?

2005-11-03 Thread bruno at modulix
Chris Cioffi wrote: as a point of style, top-posting is a Bad Thing(tm) (fixed) > > On 03/11/05, bruno at modulix <[EMAIL PROTECTED]> 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

Re: weakrefs to functions for observer pattern

2005-11-03 Thread Alex Martelli
Michael Schneider <[EMAIL PROTECTED]> wrote: ... > Thank you, I mis-read the docs. > > The mistake I made was having was using a weak reference as a key in > the dictionary. Rather than using a weakref.WeakKeyDictionary , I guess? > Weak references will be very useful for me. > > I really

Re: Python and MySQL

2005-11-03 Thread Magnus Lycka
Thomas Bartkus wrote: > But heck! Now I'm looking at the /usr/lib/python2.3/site-packages on a > Mandrake Linux box. No [_mysql.] pyd here! Fewer files overall and while > there are other file extensions, everything seems to have a corresponding > [.py]. I suspect you might find _mysql.so there.

Re: reading internet data to generate random numbers.

2005-11-03 Thread Grant Edwards
On 2005-11-03, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >>>I think that the timing of certain network events is one of the >>>Linux kernel's entropy sources. >> >> BSD as well. The key word is "one". While network events don't make a >> good source of random data, proplery combining such source

Re: How to print random strings

2005-11-03 Thread nak
[EMAIL PROTECTED] wrote: > Im at the end of chapter 3 of "Python Programming For The Absolute > Beginner, Michael Dawson " and he asks to make a fortune program that > displays a fortune each time its ran, and to have 5 unique fortunes. > > Whats confusing is that, he never discussed how to do this

Re: reading internet data to generate random numbers.

2005-11-03 Thread Grant Edwards
On 2005-11-03, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> I've never heard of anybody using the data as source of >> entropy. All the entropy gathering I've read about used the >> timing of network events, not the user-data associated with >> those events. > > Me neither, but the original post

Re: Getting a function name from string

2005-11-03 Thread Mike Meyer
[EMAIL PROTECTED] (Bengt Richter) writes: >>For a lot of uses, it'd be better to build the dictionary by hand >>rather than relying on one of the tools that turns a namespace into a >>dictionary. > IMO it would be nice if name lookup were as cleanly > controllable and defined as attribute/method lo

Re: when and how do you use Self?

2005-11-03 Thread Dan Sommers
On Thu, 3 Nov 2005 10:48:28 -0500, Chris Cioffi <[EMAIL PROTECTED]> wrote: > As a point of style: the 'other' identifier should only be used in > Zen Metaclass programming as an implicit reference to the calling > object or as a list of references to all other instances of the class. > Context wi

PyDev 0.9.8.4 released

2005-11-03 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python Development Enviroment for Eclipse) version 0.9.8.4 has been released. Check the homepage (http://pydev.sourceforge.net/) for more details. Details for Release: 0.9.8.4 Major highlights: * The license was changed to EPL. It can

Re: NTFS reparse points

2005-11-03 Thread Roel Schroeven
Stanislaw Findeisen wrote: > I want to create a reparse point on NTFS (any). > > Here > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/reparse_points.asp) > I read: "reparse points are used to implement NTFS file system links". > Here > (http://msdn.microsoft.com/libra

declaring Hex in python

2005-11-03 Thread PythonAnimal
I want to use some old C code such as #define GEN_STREAMTYPE_NULL 0x51 I need to send this to a server, but it must be declared as a unsigned four byte constant. I can not just send a string. I love python, but am looking for information where I can declare this and then send it

Re: Class Variable Access and Assignment

2005-11-03 Thread Eric Nieuwland
Steven D'Aprano wrote: > On Thu, 03 Nov 2005 15:13:52 +0100, Eric Nieuwland wrote: >> 2 When an instance of the class is created, what effectively happens >> is >> that a shallow copy of the class object is made. >> Simple values and object references are copied. > > No. > > py> class Parrot:

Re: Class Variable Access and Assignment

2005-11-03 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Magnus Lycka <[EMAIL PROTECTED]> wrote: ... > On the other hand: > > >>> class C: > ... a = [1] > ... > >>> b=C() > >>> b.a += [2] > >>> b.a > [1, 2] > >>> C.a > [1, 2] > > I can understand that Guido was a bit reluctant to introduce > += etc into Python,

Re: when and how do you use Self?

2005-11-03 Thread Steven D'Aprano
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? You don't recommend doing this? def MyClass:

Re: reading internet data to generate random numbers.

2005-11-03 Thread Steven D'Aprano
On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote: >> I have no idea what distribution data from the Internet would >> have, I would imagine it is *extremely* non-uniform and *very* >> biased towards certain values (lots of "<" and ">" I bet, and >> relatively few "\x03"). > > I've never he

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread [EMAIL PROTECTED]
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 reason for scrutiny comparing with say using a machine w

Re: declaring Hex in python

2005-11-03 Thread David Wahler
[EMAIL PROTECTED] wrote: > I want to use some old C code such as > #define GEN_STREAMTYPE_NULL 0x51 > I need to send this to a server, but it must be declared as a unsigned > four byte constant. I can not just send a string. I love python, but > am looking for information where I

Re: Filepath string manipulation help

2005-11-03 Thread mjakowlew
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: %s" %(filename) ___ Mo

Can Anyone Help me on this

2005-11-03 Thread [EMAIL PROTECTED]
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') print list1 for a in list1: list2 = list1.pop() print list2 -- * Posted with NewsLeecher v3.0 Bet

ANN: Leo 4.4a2 released

2005-11-03 Thread Edward K. Ream
Leo 4.4 alpha 2 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 To learn about Leo, see: http://webpages.charter.net/edreamleo/intro.html Leo 4.4a2 contains some of the most important changes to Leo's look (tabbed log) and feel (per-pane key bindi

Re: Python and MySQL

2005-11-03 Thread Thomas Bartkus
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > But heck! Now I'm looking at the /usr/lib/python2.3/site-packages on a > > Mandrake Linux box. No [_mysql.] pyd here! Fewer files overall and while > > there are other file extensions, everythin

Re: Can Anyone Help me on this

2005-11-03 Thread jmdeschamps
[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') > > print list1 > > for a in list1: > list2 = list1.pop(

Building python 2.4.2 on linux with static pthreads

2005-11-03 Thread Samuel M. Smith
I can build python 2.4.2 from source on the embedded linux box when I nfs mount and boot a full debian distribution. The embedded box also has stripped down linux distribution in onboard flash. My goal is to run python from the stripped down linux in onboard flash. I can successfully install

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

2005-11-03 Thread utabintarbo
I believe you are thinking of "freeze", which is part of the normal python distro. There is also cx_Freeze ( http://starship.python.net/crew/atuining/cx_Freeze/ ) Bob -- http://mail.python.org/mailman/listinfo/python-list

Issues with pyperl: perl2.so not found

2005-11-03 Thread Cameron Beattie
I am attempting to install pyperl and am having an issue where it can't find perl2.so. I think this is one of those ones where it's looking under the stairs for something which is actually in the laundry under a pile of dirty clothes. cd /tmp/pyperl* cd Python-Object; perl Makefile.PL; make instal

Web automation (was: Pressing a Webpage Button)

2005-11-03 Thread qwweeeit
Hi all, Elliot Temple on the 1 June wrote: > How do I make Python press a button on a webpage? I looked at > urllib, but I only see how to open a URL with that. I searched > google but no luck. > For example, google has a button how would i make a script to press that button? I have a si

Re: Learning multiple languages (question for general discussion)

2005-11-03 Thread Magnus Lycka
infidel wrote: > Python has spoiled me. I used to periodically try out new languages > just for fun, but since learning Python, it's become a lot less > interesting. I find myself preferring to just try new ideas or > techniques in Python rather than searching for new languages to dabble > in. A

Re: Getting Python Accepted in my Organisation

2005-11-03 Thread Magnus Lycka
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 advice on how to respond /

Re: Learning multiple languages (question for general discussion)

2005-11-03 Thread Magnus Lycka
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 *will* spoil you. Python is a good team player. It's

Re: Class Variable Access and Assignment

2005-11-03 Thread Paul Rubin
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 calls. Class variables don't get inherited. -- http://mail.py

publicity for Python-related projects

2005-11-03 Thread Jeremy Jones
If anyone has a project written in Python or usable to Python programmers, I'd like to blog about new releases (or other news) of your project. I'd really like to focus on open source projects, but I would love to mention non-open source projects if I feel there is sufficient benefit to the commun

random number generator

2005-11-03 Thread questions?
How to generate a random number in Python. Is there any build in function I can call? Thanks -- http://mail.python.org/mailman/listinfo/python-list

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

2005-11-03 Thread [EMAIL PROTECTED]
Hello, It's fairly easy to do see code below: ## from win32com.client import DispatchEx import time # instaniate a new IE object ie = DispatchEx('InternetExplorer.Application') # Naviagte to the site ie.Navigate("www.google.

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

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: 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: 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: 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: 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: __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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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? >>

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

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

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

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

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

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

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

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

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

<    1   2   3   >