Re: IronPython 0.7 released!

2005-03-23 Thread Thomas Heller
Robin Becker <[EMAIL PROTECTED]> writes: > Benjamin Niemann wrote: >> Robin Becker wrote: > .. >>>I'm also a bit puzzled that www.ironpython.com has no mention of this >>>release. >>>Curious that J Hugunin didn't announce it himself. >> Jim Hugunin announced it himself in a keynote at PyCon. Y

Re: Snakelets via SSL

2005-03-23 Thread Roland Heiber
Irmen de Jong wrote: However, may I ask you to re-submit the patch but this time in the patch tracker on SF; http://sourceforge.net/tracker/?group_id=41175 because news/mail clients often mangle source code. Hi, I re-submited it as requested. It's just a quick hack, but maybe it's worth trying. H

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Tim Roberts
"Gabriel F. Alcober" <[EMAIL PROTECTED]> wrote: > >Hi! There goes a newbie trouble: > >for i in range(0, len(subject)): >if subject[i] in preps: >psubject.append(noun_syn_parser(subject[0:i])) >subject[0:i] = [] > >Since the last line eliminates some elements of the

Heap class for heapq module

2005-03-23 Thread Stefan Behnel
Hi! I filed a patch for a Heap class to be integrated into the heapq module (in addition the the currently available functions). The main features are support for iteration and for the standard keyword arguments of sort() and sorted(): key, cmp, reverse. http://sourceforge.net/tracker/index.php

Re: possible bug?

2005-03-23 Thread Tim Roberts
Earl Eiland <[EMAIL PROTECTED]> wrote: >I'm running the following code on Windows 2000, 5.00.2195: > >for x in Files: > Command_String = 'C:\Program Files\WinRK\WinRK.exe -create ' + That can't be right. You need either Command_String = 'C:\\Program Files\\WinRK\\WinRK.exe -create

JS3550 PYTHON DEVELOPER Contract Antwerp 4 months initial

2005-03-23 Thread bob gmx
Dear All, is anyone interested in this Python vacancy:- WWW.johnstout.co.uk JS3550 PYTHON DEVELOPERContract Antwerp 4 months initial Our client is a major organisation in Antwerp. They have an urgent requirement for a specialist developer with good knowledge of Python and C++ Job de

Re: IronPython 0.7 released!

2005-03-23 Thread Ville Vainio
> "Robin" == Robin Becker <[EMAIL PROTECTED]> writes: Robin> well that's nice, but I don't do blogs and certainly don't You don't need to "do" much - just go to planetpython.org -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

RE: inter threading info

2005-03-23 Thread Tertius Cronje
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Daniel Dittmar > Sent: Wednesday, March 23, 2005 4:46 PM > To: python-list@python.org > Subject: Re: inter threading info > > Tertius Cronje wrote: > > > Q: Is it possible for a thread on SocketServ

Re: wxPython: accessing wxFrame methods in __del__ fails

2005-03-23 Thread Stephen Thorne
On Thu, 24 Mar 2005 06:21:36 GMT, Alex VanderWoude <[EMAIL PROTECTED]> wrote: > I am attempting to save my window's size and position when it closes. So I > figured I'd put some code in the __del__() method: > > from wxPython import * > class MyWindow(wxFrame): > def __init__(self, parent, id

wxPython: accessing wxFrame methods in __del__ fails

2005-03-23 Thread Alex VanderWoude
I am attempting to save my window's size and position when it closes. So I figured I'd put some code in the __del__() method: from wxPython import * class MyWindow(wxFrame): def __init__(self, parent, id=wxID_ANY, title=None, style=None): # Some stuff here. def __del__(self):

Dr. Dobb's Python-URL! - weekly Python news and links (Mar 24)

2005-03-23 Thread Cameron Laird
QOTW: [Must be seen to be believed] http://groups-beta.google.com/group/comp.lang.python/msg/7613422265cdc010 "If you don't read answers, don't post questions :-/" -- bruno desthuilliers News from PyCon2005 emerges almost continuously. See, for example, this blog startpoint:

Re: Win 32 - VB, Ruby, Perl VS Python with fireEvent

2005-03-23 Thread Roger Upole
I don't know why case would make a difference, but if I change the fireevent call to FireEvent, it works on XP sp2. It also works if you generate the makepy wrappers (probably because that forces case-sensitivity) hth Roger <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED

Re: Python for a 10-14 years old?

2005-03-23 Thread Marcin Mika
you may want to introduce her to programming competitions, which will provide her with a very strong foundation of algorithm design and programming techniques. http://oldweb.uwp.edu/academic/mathematics/usaco/ > I am blessed with a *very* gifted nine-years old daughter for whom I > have recently

Re: Python for a 10-14 years old?

2005-03-23 Thread Stephen Thorne
On 23 Mar 2005 21:03:04 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I am blessed with a *very* gifted nine-years old daughter for whom I > have recently installed an old GNU/Linux Mandrake 7.2 on an equally old > Pentium Pro box. She is enjoying it tremendously and has no proble

Re: Python for a 10-14 years old?

2005-03-23 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Is there something out there like "Python for kids" which would explain > *basic* programming concepts in a way which is accessible and > entertaining for kids aged 10-14 (that about where her brain is right > now) and which would allow them to "play around" and have fun

Re: Python for a 10-14 years old?

2005-03-23 Thread Lucas Raab
[EMAIL PROTECTED] wrote: Hi, I am blessed with a *very* gifted nine-years old daughter for whom I have recently installed an old GNU/Linux Mandrake 7.2 on an equally old Pentium Pro box. She is enjoying it tremendously and has no problems understanding simple desktop operations and the file system

Python for a 10-14 years old?

2005-03-23 Thread tnozh
Hi, I am blessed with a *very* gifted nine-years old daughter for whom I have recently installed an old GNU/Linux Mandrake 7.2 on an equally old Pentium Pro box. She is enjoying it tremendously and has no problems understanding simple desktop operations and the file system basics (Needless to say

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Bengt Richter
On Thu, 24 Mar 2005 02:48:28 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: >On Wed, 23 Mar 2005 23:27:54 +0100, "Gabriel F. Alcober" <[EMAIL PROTECTED]> >wrote: > >>Hi! There goes a newbie trouble: >> >>for i in range(0, len(subject)): >>if subject[i] in preps: >>psubject.appe

Temp dir creation

2005-03-23 Thread marco
I'm a bit puzzled by the following behaviour (at least in the way I read http://docs.python.org/lib/module-tempfile.html ) > python Python 2.4 (#1, Mar 21 2005, 23:04:52) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help", "copyright", "credits" or "license" for more informati

Re: newbie help

2005-03-23 Thread Stephen Thorne
On 23 Mar 2005 16:05:58 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I want to pass and index number and a file name from the command line. > This index number corresponds to a buffer. I need to maintain 2 such > buffers for my test. > > In C you would do someting like this > unsigned ch

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Ron
On Thu, 24 Mar 2005 03:42:04 GMT, Ron <[EMAIL PROTECTED]> wrote: >On Wed, 23 Mar 2005 23:27:54 +0100, "Gabriel F. Alcober" ><[EMAIL PROTECTED]> wrote: > >>Hi! There goes a newbie trouble: >> >>for i in range(0, len(subject)): >>if subject[i] in preps: >>psubject.append(noun_syn

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Ron
On Wed, 23 Mar 2005 23:27:54 +0100, "Gabriel F. Alcober" <[EMAIL PROTECTED]> wrote: >Hi! There goes a newbie trouble: > >for i in range(0, len(subject)): >if subject[i] in preps: >psubject.append(noun_syn_parser(subject[0:i])) >subject[0:i] = [] > >Since the last li

Re: Archives and magic bytes

2005-03-23 Thread Chris Rebert (cybercobra)
Have you tried the tarfile or zipfile modules? You might need to ugrade your python if you don't have them. They look pretty easy and should make this a snap. You can grab the output from the *nix "file" command using the new subprocess module. Good Luck - Chris === PYTHON POWERs all! All your

Re: Please help for Python programming

2005-03-23 Thread yy0127
I am sorry that i forgot to see the working example. Base on your example, i can show the value without missing but got the other problem. I would like to culmulate the value by users. I was rewrite your example but cannot not work. ## import sys import pprint try: f = open('data.txt', 'r') e

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Gabriel F. Alcober
Bengt Richter wrote: On Thu, 24 Mar 2005 02:48:28 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: On Wed, 23 Mar 2005 23:27:54 +0100, "Gabriel F. Alcober" <[EMAIL PROTECTED]> wrote: Hi! There goes a newbie trouble: for i in range(0, len(subject)): if subject[i] in preps: psub

Re: .pth files?

2005-03-23 Thread Skip Montanaro
>> I have a mojam.pth file but no "mojam" package on my server. Works >> just fine. Ben> Where does it call home? site-packages? Yup. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Bengt Richter
On Wed, 23 Mar 2005 23:27:54 +0100, "Gabriel F. Alcober" <[EMAIL PROTECTED]> wrote: >Hi! There goes a newbie trouble: > >for i in range(0, len(subject)): >if subject[i] in preps: >psubject.append(noun_syn_parser(subject[0:i])) >subject[0:i] = [] > Perhaps (untested

Re: recursive method not reaching base case

2005-03-23 Thread possibilitybox
so obvious! thank you for helping me there. i knew it was simple, i just couldn't catch it. -- http://mail.python.org/mailman/listinfo/python-list

Re: recursive method not reaching base case

2005-03-23 Thread Robert Kern
possibilitybox wrote: i was working on implementing the original supermemo algorithm (see http://www.supermemo.com/english/ol/sm2.htm for a description of it) in a class, and i'd just finished up the first draft. it works for repetitions one and two, but on repetition three (you must manually incr

recursive method not reaching base case

2005-03-23 Thread possibilitybox
i was working on implementing the original supermemo algorithm (see http://www.supermemo.com/english/ol/sm2.htm for a description of it) in a class, and i'd just finished up the first draft. it works for repetitions one and two, but on repetition three (you must manually increment item.reps.) or h

Re: Archives and magic bytes

2005-03-23 Thread Maxim Krikun
> Another thing, I work on linux (gentoo) and I would like to use the "file" command to retrieve informations about type of file instead of using extensions, do you think this can be done? this is trivial: >>> import os >>> os.popen("file /etc/passwd").read() '/etc/passwd: ASCII text\n' -- http

Win 32 - VB, Ruby, Perl VS Python with fireEvent

2005-03-23 Thread calfdog
Hello, I was wondering if anyone could tell me why fireEvent works in every language but Python with the latest Internet Explorer? I tried this page that has two listboxes if you select Listbox A the Listbox B should change. The code status: Works fine with Python 2.3, 2.4 in Windows XPsp1 DOES

Re: Read from the last line of a file?

2005-03-23 Thread Bengt Richter
On Tue, 22 Mar 2005 19:51:28 -0800, Mike Rovner <[EMAIL PROTECTED]> wrote: >Anthony Liu wrote: >> I am wondering if it is possible to start reading from >> the last line of file, and then the last but one up to >> the first line. > >If you can afford to keep the whole file in memory, than: > >line

Re: intrusive posts

2005-03-23 Thread François Pinard
[Tim Churches] > Charles Hartman wrote: > > On Mar 23, 2005, at 7:10 PM, [EMAIL PROTECTED] wrote: > > Is there no way of filtering this recurring offensive material from the > > list? > Yes: http://spambayes.sourceforge.net/ > Works a treat. Likely, the question was pertaining to ways by which t

Re: problems with  character

2005-03-23 Thread John Machin
On Tue, 22 Mar 2005 21:39:30 -, "Claudio Grondi" <[EMAIL PROTECTED]> wrote: >In my ASCII table 'Â' is '\xC2' You've got an *ASCII* table that includes that?? I hope you paid for it in Confederate dollars or czarist roubles -- that's about what such a table would be worth. -- http://mail

Re: string join() method

2005-03-23 Thread Benjamin Niemann
Derek Basch wrote: > Can anyone tell me why this CGI code outputs a blank page? > > self.output = [] > self.setContentType("text/plain") > ascii_temp.seek(0) > self.output.extend(ascii_temp.read()) > print ''.join(self.output) > > def setContentType(self, type="te

Re: intrusive posts

2005-03-23 Thread Tim Churches
Charles Hartman wrote: > > On Mar 23, 2005, at 7:10 PM, [EMAIL PROTECTED] wrote: > >>7. (",) Do You Want To Know For Sure You Are Going To Heaven? > > > Is there no way of filtering this recurring offensive material from the > list? Yes: http://spambayes.sourceforge.net/ Works a treat. T

Re: Getting the word to conventional programmers

2005-03-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Advocates of languages and programming methodologies sometimes compare >the current version of their favorite language to an old version of >their disfavored language, resulting in skewed comparisons. For >example, Conway writes > >"Inter

Re: IronPython 0.7 released!

2005-03-23 Thread Luis M. Gonzalez
James wrote: > http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 This is what I get when I follow this link: "Operational Troubleshooting in Progress" I've been visiting ironpython's site all day long searching for news but nothing... Has anyone managed t

Re: Submission for Python Limmerick Contest

2005-03-23 Thread Cappy2112
"The First Python function ever written" (takes place in the Garden of Eden" Guido sayeth "I will write def foo():" "Hmm, I could use an import, or two", Satan said, in a whirl, "Why not write it in Perl?", and the second function ever written - def foo_you(): -- http://mail.python.org/mailman/

Re: newbie help

2005-03-23 Thread andrea
[EMAIL PROTECTED] wrote: I want to pass and index number and a file name from the command line. This index number corresponds to a buffer. I need to maintain 2 such buffers for my test. Passing options is very easy, just import sys and you can find your options in sys.argv. To do something mor

intrusive posts

2005-03-23 Thread Charles Hartman
On Mar 23, 2005, at 7:10 PM, [EMAIL PROTECTED] wrote: 7. (",) Do You Want To Know For Sure You Are Going To Heaven? Is there no way of filtering this recurring offensive material from the list? Charles Hartman -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie help

2005-03-23 Thread Lonnie Princehouse
buf1 = [None] * 512 buf2 = [None] * 512 (Not quite the same as C because the list isn't filled with gibberish...) -- http://mail.python.org/mailman/listinfo/python-list

ANN: SPE 0.7.3.a Python IDE with wxGlade, Blender and PyChecker support

2005-03-23 Thread s_t_a_n_i
Spe is a python IDE with auto-indentation, auto completion, call tips, syntax coloring, uml viewer, syntax highlighting, class explorer, source index, auto todo list, sticky notes, integrated pycrust shell, python file browser, recent file browser, drag&drop, context help, ... Special is its blen

Re: newbie help

2005-03-23 Thread [EMAIL PROTECTED]
I want to pass and index number and a file name from the command line. This index number corresponds to a buffer. I need to maintain 2 such buffers for my test. In C you would do someting like this unsigned char buf1[512]; In python is this as simple as? buf 1 = 512 buf 2 = 512 And how do i keep

Archives and magic bytes

2005-03-23 Thread andrea
Hi everybody, this is my first post but I've read already many of yours interesting posts... (sorry for my bad english) Anyway for my little project I need a module that given an archive (zip, bz2, tar ...) gives me back the archive decompressed. I looked at the modules in the library reference

Re: Anonymus functions revisited : tuple actions

2005-03-23 Thread Ron
On Wed, 23 Mar 2005 06:21:30 +0100, Kay Schluehr <[EMAIL PROTECTED]> wrote: >I think my proposal was more in mind of Rons modified exec than >Pythons lambda. > >When George proposed his unpacking behavoir for list-comps as a pack of >suggar: > >1. [x*y-z for (x,y,z=0) in (1,2,3), (4,5), (6,7,8)] >

Re: IronPython 0.7 released!

2005-03-23 Thread Robin Becker
Benjamin Niemann wrote: Robin Becker wrote: .. I'm also a bit puzzled that www.ironpython.com has no mention of this release. Curious that J Hugunin didn't announce it himself. Jim Hugunin announced it himself in a keynote at PyCon. You can read a lot about it on Python centric blogs - just one

(",) Do You Want To Know For Sure You Are Going To Heaven?

2005-03-23 Thread Ron038653
http://www.want-to-be-sure.blogspot.com << Click On Link -- http://mail.python.org/mailman/listinfo/python-list

string join() method

2005-03-23 Thread Derek Basch
Can anyone tell me why this CGI code outputs a blank page? self.output = [] self.setContentType("text/plain") ascii_temp.seek(0) self.output.extend(ascii_temp.read()) print ''.join(self.output) def setContentType(self, type="text/xml"): self.output.extend(["Con

Re: newbie help

2005-03-23 Thread Lonnie Princehouse
How about describing what your program is supposed to /do/ instead of posting C code? What are the "buffers" for? This group might be more helpful if you did that. If you really do need this sort of random-access character buffer, you have a couple of options. Python strings aren't mutable, so t

Re: IronPython 0.7 released!

2005-03-23 Thread Benjamin Niemann
Robin Becker wrote: > Do Re Mi chel La Si Do wrote: >> Hi ! >> >> >> I am curious : >> >> 1)I can't download the file ("error in the GotDotNet system"). >> 2) On http://ironpython.com, there are no new version >> >> > > I'm also a bit puzzled that www.ironpython.com has no mention of t

Re: Getting the word to conventional programmers

2005-03-23 Thread sigzero
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> wrote: > . > . > . > >It would have been nice to put in a blurb for some of the cool stuff > >planned for 8.5. That way people could see that things are *

embedded python example: PyString_FromString doesnt work?

2005-03-23 Thread David Harris
I'm trying the embedded python example here: http://www.python.org/doc/2.3.2/ext/pure-embedding.html int main(int argc, char *argv[]) { PyObject *pName, *pModule, *pDict, *pFunc; PyObject *pArgs, *pValue; int i; if (argc < 3) { fprintf(stderr,"Usage: call pythonfile funcna

Re: Getting the word to conventional programmers

2005-03-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: . . . >It would have been nice to put in a blurb for some of the cool stuff >planned for 8.5. That way people could see that things are *happening* >in the Tcl world a

Re: IronPython 0.7 released!

2005-03-23 Thread Robin Becker
Do Re Mi chel La Si Do wrote: Hi ! I am curious : 1)I can't download the file ("error in the GotDotNet system"). 2) On http://ironpython.com, there are no new version I'm also a bit puzzled that www.ironpython.com has no mention of this release. Curious that J Hugunin didn't announce it him

looking for programmer

2005-03-23 Thread Peter Tyler
Hi There, I'm looking for someone to write some wx/python code on a small job, but want to avoid a spam invasion. I was thinking of setting up a temp yahoo account for people to respond to. Is this the right way of going about this, or is there somewhere else I should be looking? Thanks

Re: typo in the library reference?

2005-03-23 Thread Bengt Richter
On Wed, 23 Mar 2005 05:13:45 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: [...] >and only now noticed the smiley after it. What is the typogram for >"I feel like an idiot?" I sometimes use variations of *<8^P ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-

Re: newbie help

2005-03-23 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, ashokbellur wrote: > main() > { >unsigned char buf1[512]; >unsigned char buf2[512]; >CODE code = TEST1 > ># The index number is passed from the command line ># It corresponds to one of the two buffers > ># if index = 1 corresponds to buf1 and if in

Re: Anonymus functions revisited

2005-03-23 Thread Ron
On 23 Mar 2005 14:47:30 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: >Kay Schluehr wrote: > >> A working makeVars seems not to be different from >> >> def makeVars(**nameVals): >>globals().update(nameVals) > >Not quite. If Ron can come up with a working makeVars it would update the >caller's

Re: newbie help

2005-03-23 Thread ashokbellur
Here's some changes to the code main() { unsigned char buf1[512]; unsigned char buf2[512]; CODE code = TEST1 # The index number is passed from the command line # It corresponds to one of the two buffers # if index = 1 corresponds to buf1 and if index = 2 corresponds to buf2

Re: sorting a dictionary?

2005-03-23 Thread Bengt Richter
On Wed, 23 Mar 2005 06:27:08 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Tue, 22 Mar 2005 14:13:00 +1200, "Tony Meyer" <[EMAIL PROTECTED]> >declaimed the following in comp.lang.python: > >> >> There are no doubt faster and cleverer ways to do this (and ways that don't >> use a lambda),

Re: newbie help

2005-03-23 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > [snipped snippet] > > This is snippet code trying to generate some test patterns. That snippet of code doesn't compile. At least not with gcc. > How do i manage multiple buffers in python. Is it possible? > > > If the index number at command

Re: problems with  character

2005-03-23 Thread jdonnell
Thanks everyone, I got it working earlier this morning using deelan's suggestion. I modified the code in his link so that it removes rather than replaces the characters. Also, this was my first experience with unicode and what confused me is that I was thinking of a unicode object as an encoding,

Re: IronPython 0.7 released!

2005-03-23 Thread Ville Vainio
> "fphsml" == James <[EMAIL PROTECTED]> writes: fphsml> http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 Apparently they are also going to put out a release every 2 weeks until 1.0 is out. Great news for those who were afraid the project is dead

Re: IronPython 0.7 released!

2005-03-23 Thread Do Re Mi chel La Si Do
Hi ! I am curious : 1)I can't download the file ("error in the GotDotNet system"). 2) On http://ironpython.com, there are no new version @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: problems with  character

2005-03-23 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, jdonnell wrote: > Thanks for all the replies. I just got in to work so I haven't tried > any of them yet. I see that I wasn't as clear as I should have been so > I'll clarify a little. I'm grabbing some data from msn's rss feed. > Here's an example. > http://search.msn.com/

Re: IronPython 0.7 released!

2005-03-23 Thread James
François Pinard emailed me that my posting of the link with no explanation appeared rude. So here is a some information. IronPython is a Python implementation targeting the .NET and Mono platforms from the same person who brought us Jython

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Mitja
On Wed, 23 Mar 2005 23:27:54 +0100, Gabriel F. Alcober <[EMAIL PROTECTED]> wrote: Hi! There goes a newbie trouble: for i in range(0, len(subject)): if subject[i] in preps: psubject.append(noun_syn_parser(subject[0:i])) subject[0:i] = [] Since the last line elimina

newbie help

2005-03-23 Thread [EMAIL PROTECTED]
static void testme( unsigned char *buf, unsigned long size, CODE code) { unsigned long data switch (code) { // Generate some test patterns case TEST1 : value = 0x0; while (size--) {

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Gabriel F. Alcober
Uh! I've not even thought in using a while... Thanks! Lonnie Princehouse wrote: i = 0 while i < len(subject): if subject[i] in preps: psubject.append(noun_syn_parser(subject[0:i])) subject[0:i] = [] i = 0 else: i += 1 Gabriel F. Alcober wrote: Hi! There goes a newbie trouble: for i

Re: Changing the value of a for loop index on the fly

2005-03-23 Thread Lonnie Princehouse
i = 0 while i < len(subject): if subject[i] in preps: psubject.append(noun_syn_parser(subject[0:i])) subject[0:i] = [] i = 0 else: i += 1 Gabriel F. Alcober wrote: > Hi! There goes a newbie trouble: > > for i in range(0, len(subject)): > if subject[i] in preps: >

Re: cross platform use of set locale

2005-03-23 Thread Timothy Smith
Serge Orlov wrote: Timothy Smith wrote: Serge Orlov wrote: Timothy Smith wrote: thats ok, but how do i get it to group thousands with a , ? and thats would mean i'd have to run everything through a formatter before i displayed it :/ it'd be nicer if i could just select a proper local

Re: Getting the word to conventional programmers

2005-03-23 Thread sigzero
Cameron Laird wrote: > *DevSource* profiles "The State of the Scripting Universe" in > http://www.devsource.com/article2/0,1759,1778141,00.asp >. It would have been nice to put in a blurb for some of the cool stuff planned for 8.5. That way people could see that things are *happening* in the Tcl

Changing the value of a for loop index on the fly

2005-03-23 Thread Gabriel F. Alcober
Hi! There goes a newbie trouble: for i in range(0, len(subject)): if subject[i] in preps: psubject.append(noun_syn_parser(subject[0:i])) subject[0:i] = [] Since the last line eliminates some elements of the list, I'm wondering if it's somehow possible to change the val

Use of descriptor __get__: what defines an object as being a class?

2005-03-23 Thread John Perks and Sarah Mount
I'm talk from the point of view of descriptors. Consider a.x = lambda self:None # simple function When a.x is later got, what criterion is used to see if a class (and so the func would have __get__(None, a) called on it)? Pre-metaclasses, one might assume it was isinstance(a, (types.TypeType, ty

Re: typo in the library reference?

2005-03-23 Thread nicke
On Wed, 23 Mar 2005 05:13:45 -0800 Scott David Daniels <[EMAIL PROTECTED]> wrote: > > My apologies belong in this thread. No worries, apology accepted On Wed, 23 Mar 2005 11:44:27 -0500 "Terry Reedy" <[EMAIL PROTECTED]> wrote: > > "nicke" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL

Re: Getting the word to conventional programmers

2005-03-23 Thread sigzero
That was a great article. I really enjoyed it. We need more like it. Robert -- http://mail.python.org/mailman/listinfo/python-list

RE: Help me to sort.

2005-03-23 Thread Delaney, Timothy C (Timothy)
BMS wrote: > I'll apreciate if you can guide me how to sort in Python. I'm doing a > list and I want to sort it in ascending or descending order. > > Please send me some examples. Everything you need is right here: http://www.catb.org/~esr/faqs/smart-questions.html http://www.python.org/doc/ T

Re: Windows, Python and low level networking

2005-03-23 Thread fraca7
[EMAIL PROTECTED] wrote: Is it possible to have low level netwoking with python under Windows? Like raw sockets? Is it possible to send a single packet using python under windows? Yes. But be aware of restrictions on raw sockets in XP SP2: http://blogs.msdn.com/michael_howard/archive/2004/08/12/213

Help me to sort.

2005-03-23 Thread BMS
Hi,   I'll apreciate if you can guide me how to sort in Python. I'm doing a list and I want to sort it in ascending or descending order.   Please send me some examples.   Thank you in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lowest hassle Python web server?

2005-03-23 Thread Gerhard Häring
Larry Bates wrote: [...] You might want to take a look a Medusa. It is the basis for the web server that is bundled in Zope. Medusa is just an asyncore framework, and not something you can develop web apps with. -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows, Python and low level networking

2005-03-23 Thread Martin Franklin
Peter Hansen wrote: [EMAIL PROTECTED] wrote: Is it possible to have low level netwoking with python under Windows? Like raw sockets? Is it possible to send a single packet using python under windows? Google is your friend: Try searching with "python sockets", for example... (You *have* heard of Go

Re: Pattern matching from a text document

2005-03-23 Thread infidel
First, if you're going to loop over each line, do it like this: for line in file('playerlist.txt'): #do stuff here Second, this statement is referencing the *second* item in the list, not the first: match = ph.match(list[1]) Third, a simple splitting of the lines by some delimiter character

Re: Submission for Python Limmerick Contest

2005-03-23 Thread Cappy2112
No pointers, no templates, no streams, These are things found only in bad dreams, Because Explicit is "with it", and static typing dismiss-ed "The Best language has been".joined() at the seams! -- http://mail.python.org/mailman/listinfo/python-list

Re: Pattern matching from a text document

2005-03-23 Thread George Sakkis
B "Ben" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm currently trying to develop a demonstrator in python for an > ontology of a football team. At present all the fit players are > exported to a text document. > > The program reads the document in and splits each line into a st

python equivalent to the perl IDENT module

2005-03-23 Thread malachi
Is there an python equivalent to perl IDENT module, specifically the client functionality ? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: os.stat access and modify time same on WinXP

2005-03-23 Thread rbt
Peter Hansen wrote: rbt wrote: I'm using the standard NTFS file system. The only time the access time is updated is when the file is modified or saved (with no changes). What's up with that? Shouldn't a read/view update the access time? See http://www.microsoft.com/resources/documentation/Windo

xml marshal of general (but non Python standard) class

2005-03-23 Thread syd
Hello all, In my project, I have container classes holding lists of item classes. For example, a container class myLibrary might hold a list of item classes myNation and associated variables like myNation.name='USA' and myNation.continent='North America'. Bottom line, I was hoping to use this str

Re: Anonymus functions revisited

2005-03-23 Thread George Sakkis
"bruno modulix" <[EMAIL PROTECTED]> wrote: in message news:[EMAIL PROTECTED] > Ron wrote: > >>The problem here is that Kay's proposition mixes two points: flexible > >>tuple unpacking and a new syntax for anonymous functions. > > > > > > Yes, two different problems. I don't think anything needs to

IronPython 0.7 released!

2005-03-23 Thread James
http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 -- http://mail.python.org/mailman/listinfo/python-list

Re: Snakelets via SSL

2005-03-23 Thread Irmen de Jong
Roland Heiber wrote: > Hi, > > after Irmen de Jong did another fine release with Snakelets-1.38 i just > did a dirty hack for using snakelets with SSL-support. SSL-support is > added through the use of tlslite from Trevor Perrin. You'll have to > download and install it from http://trevp.net/tlsli

Re: Anonymus functions revisited

2005-03-23 Thread Julian Smith
On 23 Mar 2005 08:31:36 GMT Antoon Pardon <[EMAIL PROTECTED]> wrote: > Can someone who thinks this way, please explain why this is acceptable > > [ x * x for x in some_iterator ] > > But this is not > > map(lambda x: x * x, some_iteraror) > > and should be replaced with > > def sqr(x):

Re: setattr inside a module

2005-03-23 Thread Jeremy Bowers
On Wed, 23 Mar 2005 11:35:34 +0100, kramb64 wrote: > I'm trying to use setattr inside a module. > From outside a module it's easy: > > import spam > name="hello" > value=1 > setattr(spam, name, value) > > But if I want to do this inside the module spam itself, what I've to > pass to setattr as f

Re: problems with  character

2005-03-23 Thread jdonnell
Thanks for all the replies. I just got in to work so I haven't tried any of them yet. I see that I wasn't as clear as I should have been so I'll clarify a little. I'm grabbing some data from msn's rss feed. Here's an example. http://search.msn.com/results.aspx?q=domain+name&format=rss&FORM=ZZRE Th

Re: Windows, Python and low level networking

2005-03-23 Thread Martin Franklin
[EMAIL PROTECTED] wrote: Is it possible to have low level netwoking with python under Windows? Like raw sockets? Is it possible to send a single packet using python under windows? Thank you Yes http://www.python.org/doc/2.4/lib/module-socket.html -- http://mail.python.org/mailman/listinfo/python-li

Re: typo in the library reference?

2005-03-23 Thread Terry Reedy
"nicke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm going to submit a bug report, just don't have much experience with > that... but hey, sometime must be the first! ;) If you can, you might also look at the ossaudio source to verify that the mixup is strictly in the doc a

Re: Windows, Python and low level networking

2005-03-23 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Is it possible to have low level netwoking with python under Windows? Like raw sockets? Is it possible to send a single packet using python under windows? Google is your friend: Try searching with "python sockets", for example... (You *have* heard of Google, haven't you? I

Re: os.stat access and modify time same on WinXP

2005-03-23 Thread Peter Hansen
rbt wrote: I'm using the standard NTFS file system. The only time the access time is updated is when the file is modified or saved (with no changes). What's up with that? Shouldn't a read/view update the access time? See http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-u

Re: Windows, Python and low level networking

2005-03-23 Thread Jaime Wyant
Maybe this will help. >From the interpreter -> >>> import socket >>> help(socket) Which gives you all sorts of neat information on the socket module. jw On 23 Mar 2005 08:08:04 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is it possible to have low level netwoking with python under Wi

  1   2   >