Re: Modules for inclusion in standard library?

2005-06-28 Thread John Roth
"Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > at the moment python-dev is discussing including Jason Orendorff's path > module > into the standard library. > > Do you have any other good and valued Python modules that you would think > are > bug-f

Re: Office COM automatisation - calling python from VBA

2005-06-28 Thread guy lateur
Just an update: I've succeeded in writing a COM server, exposing wxPy funtcionality. I've also used this object from within Outlook - 2 lines of VBA: dispatch COM object & call method. If anyone is interested, I could post the source. A few days ago, I honestly didn't think I'd already be this

Re: Thoughts on Guido's ITC audio interview

2005-06-28 Thread Dave Benjamin
Stephen Kellett wrote: > In message <[EMAIL PROTECTED]>, Simon > Brunning <[EMAIL PROTECTED]> writes > >> Eclipse's refactorings are a great boon, I find. Refectoring is never >> *fully* automatic, of course, but the ability to, for example, select >> a chunk of code and have it extracted into a

Re: Dictionary to tuple

2005-06-28 Thread John Roth
"bruno modulix" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Odd-R. wrote: >> I have a dictionary, and I want to convert it to a tuple, >> that is, I want each key - value pair in the dictionary >> to be a tuple in a tuple. >> >> If this is the dictionary {1:'one',2:'two',3:'three

Re: tkinter radiobutton

2005-06-28 Thread William Gill
I thought the problem was practical, not philosophical, but what do I know I'm the one asking for help. I have radiobuttons arranged in 4 rows of 4 buttons each ( 4 rows and 4 columns ) The user can select no more than 1 choice in any column, but any number in any row. Restated: col

Re: Thoughts on Guido's ITC audio interview

2005-06-28 Thread Dave Benjamin
Sakesun Roykiattisak wrote: > >> What's being ignored is that type information is useful for other things >> than compile type checking. The major case in point is the way IDEs >> such as IntelliJ and Eclipse use type information to do refactoring, code >> completion and eventually numerous other

When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread muldoon
Americans consider having a "British accent" a sign of sophistication and high intelligence. Many companies hire salespersons from Britain to represent their products,etc. Question: When the British hear an "American accent," does it sound unsophisticated and dumb? Be blunt. We Americans need to k

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread BJ in Texas
muldoon <[EMAIL PROTECTED]> wrote: || Americans consider having a "British accent" a sign of || sophistication and high intelligence. Many companies hire || salespersons from Britain to represent their products,etc. || Question: When the British hear an "American accent," does it || sound unsophist

Set/Get attribute syntatic sugar

2005-06-28 Thread Заур Шибзухов
There is a syntactic sugar for item access in dictionaries and sequences: o[e] = v <-> o.__setitem__(e, v) o[e] <-> o.__getitem__(e) where e is an expression. There is no similar way for set/get attribute for objects. If e is a given name, then o.e = v <-> o.__setattr__(e, v) o.e <-> o.__

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Peter Hansen
Dennis Lee Bieber wrote: > On Tue, 28 Jun 2005 08:18:55 -0400, Matt Feinstein <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >>FORTH is 'way outside the mainstream of current programming, while > > > Unless one is coding low-level objects on a MUCK (and even that,

I need help figuring out how to fix this code.

2005-06-28 Thread Nathan Pinno
Hi all, I need help figuring out how to fix my code. I'm using Python 2.2.3, and it keeps telling me invalid syntax in the if name == "Nathan" line. Here is the code if you need it. #This program asks for a password, then asks for the user's name after the correct password has been supplied

ethereal parser

2005-06-28 Thread M.N.A.Smadi
hi; i am looking for 802.11 prism header parser for an ethereal text dump. any body aware of something like already in place? thanks m.smadi -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/IDLE - text in different colours

2005-06-28 Thread Nathan Pinno
Bill. The way is the click on view, then click script checker, or something like that. It will color code the text for you. Nathan "Bill Davy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To make life easier for my users, I'd like to colour my prompt string (as > ha

Re: benchmarking with threading module

2005-06-28 Thread Peter Hansen
Matteo Memelli wrote: > Hi, I'd like to know if it is possible to use the threading module to > benchmark a web server. > Do you think that using the Threading module would be a good idea? > Any other suggestion? This sounds like a good time to use Twisted instead of "threading". -Peter -- http:

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Jaime Wyant
On 6/28/05, Nathan Pinno <[EMAIL PROTECTED]> wrote: > Hi all, > [snip!] It looks like your indentation is off for the if statement. It should be aligned with the "name = raw_input" statement above it. Also, elif name == ["Madonna", "Cher"]: will never evaluate to true. Assume someone enters

Re: I need help figuring out how to fix this code.

2005-06-28 Thread harold fellermann
Hi, > I need help figuring out how to fix my code. I'm using Python 2.2.3, > and > it keeps telling me invalid syntax in the if name == "Nathan" line. The problem is that you indent the if statement. the if/elif/else statements are part of the outer block, so they do not need indentation. >

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Gregory Piñero
Make sure that line with name=="Nathan" is not indented. It's hard to tell from the code there. Also, I'm thinking that this won't work: if name == "Nathan": print "What a great name!" elif name == ["Madonna", "Cher"]: because the variable name is a string and not a list. You could t

Re: whois like functionality on Windows?

2005-06-28 Thread Peter Hansen
Gerrit Muller wrote: > I am migrating a website from a UNIX based machine to an Windows > machine. In the logfiles I got from the old machine I mostly got domain > names and sometimes only IP addresses. The Windows machine seems to > produce only IP addresses. > > Somehow I cannot find a window

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Philippe C. Martin
Hi, 1) check the spacing before if name == "Nathan": 2) put a ':' after else Regards, Philippe Nathan Pinno wrote: > Hi all, > > I need help figuring out how to fix my code. I'm using Python 2.2.3, and > it keeps telling me invalid syntax in the if name == "Nathan" line. Here > is the cod

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Peter Hansen
Заур Шибзухов wrote: > There is a syntactic sugar for item access in > dictionaries and sequences: > > o[e] = v <-> o.__setitem__(e, v) > o[e] <-> o.__getitem__(e) > > where e is an expression. > > There is no similar way for set/get attribute for objects. > If e is a given name, then > >

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Devan L
password = raw_input("Type in the password, please: ") while password != "hello": print "Incorrect password!" Wouldn't this print "Incorrect password" untill the end of time if you didn't supply the correct password? -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-28 Thread Paul Rubin
Reinhold Birkenfeld <[EMAIL PROTECTED]> writes: > Do you have any other good and valued Python modules that you would think are > bug-free, mature (that includes a long release distance) and useful enough to > be granted a place in the stdlib? How about the win32 shell extension that allows stuff

[no subject]

2005-06-28 Thread python-list-bounces+archive=mail-archive . com
#! rnews 2994 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp From: Harry George <[EMAIL PROTECTED]> Subject: Re: Boss wants me to program X-Nntp-Pos

Re: regulars expressions ?

2005-06-28 Thread Devan L
re.findall(r'"?(.+?)"?(?:,|$)', yourtexthere) -- http://mail.python.org/mailman/listinfo/python-list

Re: regulars expressions ?

2005-06-28 Thread Devan L
Oh, oops, sorry, that code doesn't respect the quotes. Use this code: re.findall(r'(".+?"|\S+)(?:,|$)', yourtexthere) -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, muldoon <[EMAIL PROTECTED]> wrote: > Americans consider having a "British accent" a sign of sophistication > and high intelligence. That depends on the accent. I believe that's probably true for the educated south of England, BBC, received pronunciation. I don't think that's true

Re: Newbie: Help Figger Out My Problem

2005-06-28 Thread Devan L
import random flips = 100 results = [random.randint(0,1) for i in range(flips)] heads = results.count(0) tails = results.count(1) print "Heads:%s" % heads print "Tails:%s" % tails I think this is more compact. -- http://mail.python.org/mailman/listinfo/python-list

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Chinook
On Tue, 28 Jun 2005 14:39:47 -0400, Nathan Pinno wrote (in article <[EMAIL PROTECTED]>): > Hi all, > > I need help figuring out how to fix my code. I'm using Python 2.2.3, and > it keeps telling me invalid syntax in the if name == "Nathan" line. Here is > the code if you need it. > > #Thi

Debugger Confusion

2005-06-28 Thread Rex Eastbourne
I'm a little confused about which debugging utilities do what, and which I should use for my Python code. I'd like to be able to step through my code, insert breakpoints, etc. I haven't been able to do this yet (I'm using Emacs on Windows). I have seen references to GDB, GUD, PDB, and others. Which

Re: tkinter radiobutton

2005-06-28 Thread Peter Otten
William Gill wrote: > I thought the problem was practical, not philosophical, but what do I > know I'm the one asking for help. What follows looks more like a spec than a question. >columns can have 0 or 1 selection >rows can have 0,1,2,3, or 4 selections. > Loop through the 4 i

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Robert Kern
Peter Hansen wrote: > Заур Шибзухов wrote: > >>There is a syntactic sugar for item access in >>dictionaries and sequences: >> >>o[e] = v <-> o.__setitem__(e, v) >>o[e] <-> o.__getitem__(e) >> >>where e is an expression. >> >>There is no similar way for set/get attribute for objects. >>If e is a gi

Re: Boss wants me to program

2005-06-28 Thread xeys_00
Ok, sorry to throw perhaps unrelated stuff in here, but I want everyone to know what we have right now in the office. We started with an electric typewriter and file cabinets. We were given an old 386 with a 20 mb hard drive about 5 years ago, and we moved everything over to a very very old version

Problem building Python bindings for subversion

2005-06-28 Thread Arthur Chereau
Hi, I'm trying to setup viewcvs to work with subversion 1.2.0 on Linux with Python 2.4.1. The last viewcvs (from CVS) needs subversion python bindings. I installed swig and built subversion from source with it. Everything works fine until I try to build the Python bindings. When I try "make swig-

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Dave Benjamin
BORT wrote: > I am toying with the idea of teaching my ten year old a little about > programming. I started my search with something like "best FREE > programming language for kids." After MUCH clicking and high-level > scanning, I am looking at Python and Forth. Both have advocates that > say e

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Michael Hoffman
Robert Kern wrote: >> Заур Шибзухов wrote: >> >>> There is a syntactic sugar for item access in >>> dictionaries and sequences: >>> >>> o[e] = v <-> o.__setitem__(e, v) >>> o[e] <-> o.__getitem__(e) >>> >>> where e is an expression. >>> >>> There is no similar way for set/get attribute for objects.

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Michael Hoffman
muldoon wrote: > Americans consider having a "British accent" a sign of sophistication > and high intelligence. Many companies hire salespersons from Britain to > represent their products,etc. Question: When the British hear an > "American accent," does it sound unsophisticated and dumb? > > Be bl

Re: Boss wants me to program

2005-06-28 Thread phil
> I may > try to convince the boss that I can write dos programs for the existing > machine. If we get any kind of upgrade, I'm sure it will be able to run > linux with X and a low overhead window manager. If that happened, I'd > be able to use python and this "tk" thing you have talked about and >

Re: Modules for inclusion in standard library?

2005-06-28 Thread Reinhold Birkenfeld
George Sakkis wrote: >> "bruno modulix" <[EMAIL PROTECTED]> wrote: > >> George Sakkis wrote: >> > I'd love to see IPython replace the standard interpreter. >> I dont. > > Care to say why ? For an easy, quick interactive interpreter, it's way to overloaded with functions and too slow in startup.

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, Michael Hoffman <[EMAIL PROTECTED]> wrote: > muldoon wrote: >> Americans consider having a "British accent" a sign of sophistication >> and high intelligence. Many companies hire salespersons from Britain to >> represent their products,etc. Question: When the British hear an >> "Amer

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Jarek Zgoda
Grant Edwards napisał(a): >>To be blunt, I have no idea what this has to do with Python. > > Monty Python was mostly Brits? Wasn't they all Brits? -- Jarek Zgoda http://jpa.berlios.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Devan L
Thats like posting about Google here because the newsgroup is hosted on Google. -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread muldoon
Michael Hoffman wrote: > muldoon wrote: > > Americans consider having a "British accent" a sign of sophistication > > and high intelligence. Many companies hire salespersons from Britain to > > represent their products,etc. Question: When the British hear an > > "American accent," does it sound un

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Grant Edwards napisa³(a): > >>>To be blunt, I have no idea what this has to do with Python. >> >> Monty Python was mostly Brits? > > Wasn't they all Brits? Nope. Terry Gilliam was from Minneapolis. -- Grant Edwards grant

Creating Python wrapper for DLL

2005-06-28 Thread Tim
I have a DLL, and a C .h file that exports a bunch of functions from the DLL. I would like to create a Python extension module for these functions. I have read the "Extending and Embedding" documentation in the Python 2.4 release. I understand how to extend C code for use in Python if I have acc

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Robert Kern
muldoon wrote: >Now, what forum would you recommend? Any help would be appreciated. Not here. Beyond that, you're on your own. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mai

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, Devan L <[EMAIL PROTECTED]> wrote: > Thats like posting about Google here because the newsgroup is hosted on > Google. Except the newsgroup isn't "hosted on Google", and it's far less interesting than Monty Python. -- Grant Edwards grante Yow! "THE

Re: FlashMX and Py2exe doesn't fly...

2005-06-28 Thread Grooooops
Wow, that was easy! Thanks Myles!!! -- http://mail.python.org/mailman/listinfo/python-list

Python C extenstion and __init__.py

2005-06-28 Thread mwidj
I'm building python extension for some solaris specific functions. My setup.py looks like this: setup.py: from distutils.core import setup, Extension sol_ex = Extension('sun.solaris', ['src/solarismodule.c', ]) setup (name = "solaris", version = "0.1", descriptio

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Mike Holmans
On Tue, 28 Jun 2005 19:23:11 -, Grant Edwards <[EMAIL PROTECTED]> tapped the keyboard and brought forth: >On 2005-06-28, muldoon <[EMAIL PROTECTED]> wrote: > >> Americans consider having a "British accent" a sign of sophistication >> and high intelligence. > >That depends on the accent. I bel

Re: turn text lines into a list

2005-06-28 Thread Big and Blue
Gunnar Hjalmarsson wrote: > >> @corenames=qw( >> rb_basic_islamic >> sq1_pentagonTile >> sq_arc501Tile >> sq_arc503Tile >> ); > > > Impractical to mix code and data, isn't it? Obviously not impractical, given he did it quite easily and succinctly. > chomp( my @corenames = ); > > __DATA__

ANN: ActivePython 2.4.1 for Solaris 10 on SPARC, x86 and x64 systems

2005-06-28 Thread Trent Mick
I'm happy to announce that ActivePython 2.4.1 for Solaris 10 on SPARC, x86 and x64 systems is now available for free download from: http://www.ActiveState.com/Products/ActivePython/ This release adds support for Solaris running on x86 and x64 systems. Note: This release (build 247) also in

RE: Debugger Confusion

2005-06-28 Thread Robert Brewer
Rex Eastbourne wrote: > I'm a little confused about which debugging utilities do what, and > which I should use for my Python code. I'd like to be able to step > through my code, insert breakpoints, etc. I haven't been able to do > this yet (I'm using Emacs on Windows). I have seen references to GD

Re: Creating Python wrapper for DLL

2005-06-28 Thread Lonnie Princehouse
ctypes! http://starship.python.net/crew/theller/ctypes/ -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter radiobutton

2005-06-28 Thread William Gill
> What follows looks more like a spec than a question. It is, but I wanted to show why I was getting confused trying to use control variables to maintain the overall relationship. Thank you. This is exactly what I'm trying to do, and oddly enough similar in concept to what I was doing, but fa

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Jarek Zgoda
Grant Edwards napisał(a): To be blunt, I have no idea what this has to do with Python. >>>Monty Python was mostly Brits? >> >>Wasn't they all Brits? > > Nope. Terry Gilliam was from Minneapolis. Are you sure there are no Brits in Minneapolis? -- Jarek Zgoda http://jpa.berlios.de/ -- http

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Michael Hoffman
muldoon wrote: > Michael Hoffman wrote: >>muldoon wrote: >> >>>Americans consider having a "British accent" a sign of sophistication >>>and high intelligence. Many companies hire salespersons from Britain to >>>represent their products,etc. Question: When the British hear an >>>"American accent," d

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread c d saunter
Michael Hoffman ([EMAIL PROTECTED]) wrote: : muldoon wrote: : > Americans consider having a "British accent" a sign of sophistication : > and high intelligence. Many companies hire salespersons from Britain to : > represent their products,etc. Question: When the British hear an : > "American accent

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread James Stroud
Frankly, I can't watch Shakespeare or movies like "the full monty" or "trainspotting" because I can't understand a damn word they say. British talk sounds like gibberish to me for the most part. Out of all of these movies, the only thing I ever could understand was something like "I've got the b

Re: tkinter radiobutton

2005-06-28 Thread William Gill
p.s. I tweaked rbn = tk.Radiobutton(self, text=text, variable=var, value=y) to rbn = tk.Radiobutton(self, text=text, variable=var, value=y+1) and return tuple(row == var.get() for var in self.variables) to return tuple(row+1 == var.get() for var in self.variables) so that the Radiogri

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Gary Wilson Jr
Заур Шибзухов wrote: > There is a syntactic sugar for item access in > dictionaries and sequences: > > o[e] = v <-> o.__setitem__(e, v) > o[e] <-> o.__getitem__(e) > > where e is an expression. > > There is no similar way for set/get attribute for objects. > If e is a given name, then > >

Re: Boss wants me to program

2005-06-28 Thread Lee Harr
> make something that will work for him, am I correct? The other > alternative is to install console mode linux on it and hope that the > ncurses library can be used by python. The system could be as low as a > 486 dx2 66 with maybe 16 megs of ram. Well, I just thought I'd give you > people more in

Re: Embedding python in C - newbie

2005-06-28 Thread Philippe C. Martin
Just to make sure i'm clear as I've been told about swig and pyrex: I don't want to eventually have a python script call C modules, but rather a main.c make calls to python functionnalities. I did add newbie in the title :-) Regards, Philippe Philippe C. Martin wrote: > Hi, > > Is there a p

Re: Modules for inclusion in standard library?

2005-06-28 Thread George Sakkis
"Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > >> "bruno modulix" <[EMAIL PROTECTED]> wrote: > > > >> George Sakkis wrote: > >> > I'd love to see IPython replace the standard interpreter. > >> I dont. > > > > Care to say why ? > > For an easy, quick interactive interpret

building 2.4.1 on HPUX

2005-06-28 Thread Richard Patterson
I'm trying to compile python 2.4.1, on HPUX10.20, with support for tk and tcl 8.4 (installed in /opt/tk and /opt/tcl). I assume this means I need to compile the tkinter module too.. I was getting make errors, saying it couldn't find tcl/tk libs or headers... so I changed the setup.py script, hard

Re: Embedding python in C - newbie

2005-06-28 Thread Philippe C. Martin
Sorry, it is still not clear when I reread it: 1) I have a bunch of Python working modules 2) I need to compile "something" so external C applications can access 1) Thanks, Philippe Philippe C. Martin wrote: > Just to make sure i'm clear as I've been told about swig and pyrex: I > don't want

Re: Favorite non-python language trick?

2005-06-28 Thread Mike Meyer
Tom Anderson <[EMAIL PROTECTED]> writes: > On Fri, 24 Jun 2005, Roy Smith wrote: >> Tom Anderson <[EMAIL PROTECTED]> wrote: >>> The one thing i really do miss is method overloading by parameter >>> type. I used this all the time in java >> You do things like that in type-bondage languages > I love

Re: Modules for inclusion in standard library?

2005-06-28 Thread Robert Kern
George Sakkis wrote: > "Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote: >>For an easy, quick interactive interpreter, it's way to overloaded >>with functions and too slow in startup. > > Too slow ? It doesn't take more than a second or two to startup in a > two years old 1.8Ghz Athlon and an olde

Re: Embedding python in C

2005-06-28 Thread Chris Lambacher
pyrex can be used for embedding too. http://www.freenet.org.nz/python/embeddingpyrex/ On 6/28/05, Philippe C. Martin <[EMAIL PROTECTED]> wrote: > Actually maybe not ... looking at the doc: > > I have modules already coded in Python, and I need a C wrapper so C > applications may link with it. >

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-28 Thread Mike Meyer
Riccardo Galli <[EMAIL PROTECTED]> writes: > On Fri, 24 Jun 2005 09:00:04 -0500, D H wrote: > >>> Bo Peng wrote: >>> I need to pass a bunch of parameters conditionally. In C/C++, I can do func(cond1?a:b,cond2?c:d,.) Is there an easier way to do this in Python? >>> >>> >> Th

Re: Favorite non-python language trick?

2005-06-28 Thread Ivan Van Laningham
Hi All-- Mike Meyer wrote: > > Since the user is the one bound with B&D languages, they are clearly > tops. Which makes Python a bottom. > Well, we certainly hope Python has a safe word. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http:/

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Rocco Moretti
BORT wrote: > I am toying with the idea of teaching my ten year old a little about > programming. I started my search with something like "best FREE > programming language for kids." After MUCH clicking and high-level > scanning, I am looking at Python and Forth. Both have advocates that > say

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Elmo Mäntynen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nathan Pinno wrote: > Hi all, > > I need help figuring out how to fix my code. I'm using Python 2.2.3, and > it keeps telling me invalid syntax in the if name == "Nathan" line. Here is > the code if you need it. > > #This program asks for a pas

Re: Embedding python in C

2005-06-28 Thread Philippe C. Martin
Thanks, I cannot get the demo to compile, but I joined their list. Thanks Philippe Chris Lambacher wrote: > pyrex can be used for embedding too. > http://www.freenet.org.nz/python/embeddingpyrex/ > > On 6/28/05, Philippe C. Martin <[EMAIL PROTECTED]> wrote: >> Actually maybe not ... looking

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-28 Thread Ron Adam
Mike Meyer wrote: > Riccardo Galli <[EMAIL PROTECTED]> writes: > > >>On Fri, 24 Jun 2005 09:00:04 -0500, D H wrote: >> >> Bo Peng wrote: >I need to pass a bunch of parameters conditionally. In C/C++, I can >do func(cond1?a:b,cond2?c:d,.) > >Is there an easier way

Re: Excellent Site for Developers

2005-06-28 Thread Mike Meyer
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: > Woof! > > And I thought my english was improving ! > > I'm laughing very hard right now, thanks ! > > Philippe You might note that a fisherman who is trolling is *not* called a troll. In that context, the "troll" is the lure/line that is being us

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Elmo Mäntynen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Hansen wrote: > Заур Шибзухов wrote: > >> There is a syntactic sugar for item access in >> dictionaries and sequences: >> >> o[e] = v <-> o.__setitem__(e, v) >> o[e] <-> o.__getitem__(e) >> >> where e is an expression. >> >> There is no similar

strange __call__

2005-06-28 Thread Rahul
Consider the following: def a(x): return x+1 def b(f): def g(*args,**kwargs): for arg in args: print arg return f(*args,**kwargs) return g a.__call__ = b(a.__call__) now calling a(1) and a.__call__(1) yield 2 different results!! i.e. for functions a(1) doesnt seem to be tran

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Rocco Moretti
Rocco Moretti wrote: > It's been quite some time since I've looked at Forth, and the reference > material that I used then was probably outdated anyway. Sorry, thought of one more thing Python has going for it vs. Forth - reference material. Check the catalog of your local library. I'd guess t

Re: Boss wants me to program

2005-06-28 Thread Ron Adam
[EMAIL PROTECTED] wrote: > Ok, sorry to throw perhaps unrelated stuff in here, but I want everyone > to know what we have right now in the office. We started with an > electric typewriter and file cabinets. We were given an old 386 with a > 20 mb hard drive about 5 years ago, and we moved everythi

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Andrew Durdin
On 6/29/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > > Sorry, thought of one more thing Python has going for it vs. Forth - > reference material. Check the catalog of your local library. I'd guess > that there is more choice for Python programming books vs. Forth > programming books. I just che

6+ Month Python UI Contract Position in Mountain View, CA

2005-06-28 Thread Steve Burke
Title: 6+ Month Python UI Contract Position in Mountain View, CA I have a client in Mountain View, CA looking for an engineer who can work as part of a small team to develop a UI for a remote management/monitoring application for a new generation of Windows appliance.  The work will involve a

Re: Thoughts on Guido's ITC audio interview

2005-06-28 Thread Markus Wankus
Stephen Kellett wrote: > In message <[EMAIL PROTECTED]>, Simon > Brunning <[EMAIL PROTECTED]> writes > >> Eclipse's refactorings are a great boon, I find. Refectoring is never >> *fully* automatic, of course, but the ability to, for example, select >> a chunk of code and have it extracted into a

Re: Newbie: Help Figger Out My Problem

2005-06-28 Thread Casey Hawthorne
It may be shorter but it keeps the entire list in memory and has to iterate over the list twice! Does he/she need the entire list? import random heads = 0 flips = 100 for i in xrange(flips): if random.randint(0,1): heads += 1 print "Heads:%s" % heads print "Tails:%s" % (flips - heads) "D

Re: Problem building Python bindings for subversion

2005-06-28 Thread Chris Lambacher
You will probably get more help with this on subversion mailing list. -Chris On 28 Jun 2005 12:59:24 -0700, Arthur Chereau <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to setup viewcvs to work with subversion 1.2.0 on Linux with > Python 2.4.1. The last viewcvs (from CVS) needs subversion pyt

Re: OO refactoring trial ??

2005-06-28 Thread Chinook
Never mind. > > BTW: Is duck-typing a variation on duct-taping? > http://www.rubygarden.org/ruby?DuckTyping http://en.wikipedia.org/wiki/Duck_typing Lee C -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-28 Thread Scott David Daniels
Ron Adam wrote: > Mike Meyer wrote: > >> Riccardo Galli <[EMAIL PROTECTED]> writes: >>> result = [value2,value1][cond] Or: result = [(lambda: expr0), lambda: expr1][cond]() Which is harder to understand than the if-based assignment even with 5-character expressions. --Scott David Daniels [

Re: Creating Python wrapper for DLL

2005-06-28 Thread renwei
use ctype: http://starship.python.net/crew/theller/ctypes/ "Tim" <[EMAIL PROTECTED]> news:[EMAIL PROTECTED] > I have a DLL, and a C .h file that exports a bunch of functions from > the DLL. I would like to create a Python extension module for these > functions. > > I have read the "Extendin

How to find Windows "Application data" directory??

2005-06-28 Thread Paul Rubin
I'm writing a Windows program that needs to store some user files. The logical place to store them is in "Application Data", right? Is there a good way to find the correct location of that directory, preferably without any C extensions? It's ok if the directory is found at installation time rath

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-28 Thread Paul Rubin
Scott David Daniels <[EMAIL PROTECTED]> writes: > result = [(lambda: expr0), lambda: expr1][cond]() Winner of the "there should be one obvious way to do it" award. ;-) -- http://mail.python.org/mailman/listinfo/python-list

RE: Modules for inclusion in standard library?

2005-06-28 Thread Tony Meyer
>>> Do you have any other good and valued Python modules that you would >>> think are bug-free, mature (that includes a long release >>> distance) and useful enough to be granted a place in the stdlib? >> >> First of all, numeric/numarray, obviously! > > There has been recent discussion about t

Re: How to find Windows "Application data" directory??

2005-06-28 Thread Trent Mick
[Paul Rubin wrote] > I'm writing a Windows program that needs to store some user files. > > The logical place to store them is in "Application Data", right? > > Is there a good way to find the correct location of that directory, > preferably without any C extensions? It's ok if the directory is

How to compare two directories?

2005-06-28 Thread could ildg
I want to compare 2 directories, and find If all of theire sub-folders and files and sub-files are identical. If not the same, I want know which files or folders are not the same. I know filecmp moudle has cmpfiles function and a class named dircmp, they may help, but I wonder if there is a ready-t

Re: OO refactoring trial ??

2005-06-28 Thread Chinook
Paul, Going back over various material led to another question regarding your comments. > - I'm not keen on the coupling of forcing your A,B,etc. classes to > inherit from MF. Especially in a duck-typing language like Python, it > adds no value, the subclasses receive no default behavior from

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Grant Edwards napisa³(a): > >To be blunt, I have no idea what this has to do with Python. Monty Python was mostly Brits? >>> >>>Wasn't they all Brits? >> >> Nope. Terry Gilliam was from Minneapolis. > > Are you sure there are no Brit

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Erik Max Francis
Mike Holmans wrote: > My wife's an Okie, but she speaks the US equivalent of RP - the one > used by newsreaders on the main terrestrial TV networks and which is > commonly thought to be used mostly in Ohio and other places just south > of the Great Lakes. If there's such a thing as a standard "Ame

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-28, James Stroud <[EMAIL PROTECTED]> wrote: > I think James Bond did it for Americans. He always wore a > dinner jacket and played a lot of backarack--which is only > cool because you have to bet a lot of money. Anyway, if you > insist on making distinctions between the backwoods of > a

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Grant Edwards
On 2005-06-29, Erik Max Francis <[EMAIL PROTECTED]> wrote: >> The problem which a lot of fairly-midstream American accent users face >> is that it's the same sort of thing which Brits try and imitate when >> they want to suggest a snake-oil salesman. > > And due to overcorrection, typically do a r

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Mike Meyer
Ivan Van Laningham <[EMAIL PROTECTED]> writes: > In which case, you should start with PostScript;-) I learned it by > plugging a glass tty into the serial port on one of the very first > AppleWriters and typing away. None of this fancy-shmancy '>>>' > business;-) But what a great reward, having

Re: OO refactoring trial ??

2005-06-28 Thread Kamilche
''' You might find this interesting. Note that the object creation in main() below could easily be read in from a text file instead, thus meeting your requirement of not knowing an item's class until runtime. Sample output: {'password': 'Your Password Here', 'type': 'A', 'logonid': 'Your Logonid

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Terry Hancock
On Tuesday 28 June 2005 07:07 pm, Elmo Mäntynen wrote: > Peter Hansen wrote: > > Заур Шибзухов wrote: > >> There is a syntactic sugar for item access in > >> dictionaries and sequences: > >> o[e] = v <-> o.__setitem__(e, v) > >> o[e] <-> o.__getitem__(e) > >> > >> where e is an expression. > >> > >

<    1   2   3   >