Re: deploying big python applications

2006-05-25 Thread Serge Orlov
AndyL wrote: Hi, let me describe how I do that today. There is standard python taken from python.org installed in a c:\python23 with at least dozen different additional python packages (e.g. SOAPpy, Twisted, wx, many smaller ones etc) included. Also python23.dll moved from c:\windows to

Re: John Bokma harassment

2006-05-25 Thread James
We seem to have strayed a long way from Voltaire's I do not agree with what you say, but I will defend to the death your right to say it. Not at all. My problem with Xah Lee is that he is abusing the Usenet as a personal BLOG. He has a web site to post these articles and he can certainly put

Re: Conversion of perl based regex to python method

2006-05-25 Thread Peter Otten
Andrew Robert wrote: Wanted: perl -ple 's/([^\w\s])/sprintf(%%%2X, ord $1)/ge'  somefile.txt Got: # Evaluate captured character as hex def ret_hex(ch): return chr((ord(ch) + 1) % ) Make it compile at least before posting :-) # Evaluate the value of whatever was matched def

Re: determining available space for Float32, for instance

2006-05-25 Thread Robert Kern
David Socha wrote: Robert Kern wrote: However, keeping track of the sizes of your arrays and the size of your datatypes may be a bit much to ask. Exactly. Building a duplicate mechanism for tracking this informaiton would be a sad solution. Surely Python has access to the amount of

Re: How does a generator object refer to itself?

2006-05-25 Thread Michele Simionato
Why don't you use a class ? class MyGen(object): def __iter__(self): for i in range(2): yield I know who I am %s % self gen_obj = MyGen() for x in gen_obj: print x For language lawyers: strictly speaking gen_obj is not a generator object (since it is restartable)

Re: Best way to handle exceptions with try/finally

2006-05-25 Thread Zameer
I wonder where the else goes in try..except..finally... -- http://mail.python.org/mailman/listinfo/python-list

Re: NEWB: how to convert a string to dict (dictionary)

2006-05-25 Thread Duncan Booth
manstey wrote: Thanks. I didn't know eval could do that. But why do many posts say they want a solution that doesn't use eval? Because it is a sledgehammer: capable of driving in nails or breaking rocks. Most times people say 'I want to use eval' they are using it to drive nails and

Re: how to change sys.path?

2006-05-25 Thread per9000
also se topic named 'problem(s) with import from parent dir: from ../brave.py import sir_robin ' I use this every day now: sys.path.append(../../py_scripts) best wishes, Per -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-25 Thread Tim X
Mitch [EMAIL PROTECTED] writes: John Bokma wrote: Mitch [EMAIL PROTECTED] wrote: John Bokma wrote: [...] You're mistaken. All you need to do is report it. After some time Xah will either walk in line with the rest of the world, or has found somewhere else to yell. As long as it's not my

Re: John Bokma harassment

2006-05-25 Thread bugbear
Mitch wrote: Sure, each server has terms and conditions that apply, doesn't mean you should be able to ban people from speaking just because you don't like what they say. You are a silly person. BugBear -- http://mail.python.org/mailman/listinfo/python-list

Re: Scipy: vectorized function does not take scalars as arguments

2006-05-25 Thread ago
I have installed numpy-0.9.6 I haven't tried 0.9.8. -- http://mail.python.org/mailman/listinfo/python-list

wincerapi

2006-05-25 Thread Tim Williams
Does anyone have a copy of the wincerapi module.It appears not to be in the win32 extensions anymore, and I've googled lots but not found it available anywhere. Thanks -- Tim Williams -- http://mail.python.org/mailman/listinfo/python-list

regex in python

2006-05-25 Thread gisleyt
I'm trying to compile a perfectly valid regex, but get the error message: r = re.compile(r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') Traceback (most recent call last): File stdin, line 1, in ? File /usr/lib/python2.3/sre.py, line 179, in compile return

Qrcode and python

2006-05-25 Thread bussiere
Title: Qrcode and python Iam loooking for some information on qrcode module for python (making qrcode in python qrcode is a special kind of barcode) Or i only found japanese documentation If someone have english or french documentation i twill be nice Regards Bussiere I have some

Re: Modify one character in a string

2006-05-25 Thread keirr
mp wrote: X-No-Archive How do I go about modifying one character in a string elegantly? In other words, I want a function that will change '' to 'aaza', given the index 2 of the character in the string. Also, how do I do this when dealing with a file ; which file mode should I use and

[no subject]

2006-05-25 Thread carlosperezs
hello together !!! I would like to know if it is available the com component for wmeditor in python language? This program is called windows media file editor, lets users to create marks into a movie and belongs to installation packet of windows encoder. thank you

Final_Call_SummerSchool2006

2006-05-25 Thread andrea
REGISTER NOW FOR PATTERN RECOGNITION EVENTS THIS SUMMER, 2006 Early Registration Deadline for ISSPR is 25 MAY, 2006 ___ 4TH INTERNATIONAL SUMMER SCHOOL ON PATTERN RECOGNITION (ISSPR, 2006) 23-28 JULY, UK http://www.PatternRecognitionSchool.com NEW...EXTENDED Early Bird

access to TimesTen using python

2006-05-25 Thread gunsupancar
is there any module to access TimesTen in-memory database using python? -- http://mail.python.org/mailman/listinfo/python-list

pc 2 mobile via bluetooth

2006-05-25 Thread Yasmeen Alkadi
hello :)could some1 help me plzzz is there a python script to connect my windows pc with my s60 mobile via bluetooth on both so i could send text files from my pc and recivee them on my phonethank u so much . . How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call

Two idle questions

2006-05-25 Thread Edward K. Ream
I've asked these questions on idle-dev with no answer. 1. How can code tell whether it is being run from Idle's debugger? 2. How can code being run from Idle's debugger simulate a breakpoint, such as pdb.set_trace() does? Yes, pdb.set_trace() does work, but I want to enable idle's debugging

a good explanation

2006-05-25 Thread s99999999s2003
hi my friend has written a loop like this cnt = 0 files = [a,b,c,d] while cnt len(files) : do_something(files[cnt]) i told him using for fi in files: do_something(fi) is better, because the while loop method makes another call to len..which is slower.. am i partly right? or is there a

Re: Request for comments on python distributed technologies

2006-05-25 Thread Piet van Oostrum
Carl J. Van Arsdall [EMAIL PROTECTED] (CJVA) wrote: CJVA Hey everyone, another question for the list. In particular i'm CJVA looking for comments on some of the distributed technologies CJVA supported in python. Specifically, I'm looking at XML-RPC, RPyC, CJVA CORBA, and Twisted. Although it

Re: regex in python

2006-05-25 Thread Tim Chase
r = re.compile(r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') ... sre_constants.error: nothing to repeat The error gives something away (like any good error message should) You're attempting to repeat something that may not exist. In this case, it's the last

Re: Bind an instance of a base to a subclass - can this be done?

2006-05-25 Thread Maric Michaud
Le Jeudi 25 Mai 2006 01:10, vous avez écrit : The ratio of two durations has no meaning??? Oh, sorry, sure it has, I wanted to say it has no meaning in timedelta provided arithmetic. It's a ratio (no dimension) not a duration. In that sense the expected result should be a float, and the

Re: regex in python

2006-05-25 Thread Jim Segrave
In article [EMAIL PROTECTED], gisleyt [EMAIL PROTECTED] wrote: I'm trying to compile a perfectly valid regex, but get the error message: r = re.compile(r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') Traceback (most recent call last): File stdin, line 1, in ? File

Re: Why can't timedeltas be divided?

2006-05-25 Thread Maric Michaud
oups ididn't post it to the good thread :) Le Jeudi 25 Mai 2006 01:10, vous avez écrit : The ratio of two durations has no meaning??? Oh, sorry, sure it has, I wanted to say it has no meaning in timedelta provided arithmetic. It's a ratio (no dimension) not a duration. In that sense the

RE: how to change sys.path?

2006-05-25 Thread Michael Yanowitz
Is there something like a .pythoninitrc which can run whenever we start Python that can load a file with many sys.path.append(), etc? If not is there some way to modify the Python shell constructor and destructor? Thanks in advance: Michael yanowitz -Original Message- From: [EMAIL

webbrowser module bug on os x?

2006-05-25 Thread robin
hi it seems to me like the webbrowser command webbrowser.open('http://www...', new=0) does not work as advertised: all the urls open in seperate windows regardless of the default browser (safari, firefox, mozilla). i do not have this problem on windows... can anyone help? thank you in advance.

Re: regex in python

2006-05-25 Thread John Machin
On 25/05/2006 7:58 PM, gisleyt wrote: I'm trying to compile a perfectly valid regex, but get the error message: r = re.compile(r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') Traceback (most recent call last): File stdin, line 1, in ? File /usr/lib/python2.3/sre.py,

Re: a good explanation

2006-05-25 Thread Bas
I guess that your version is faster, although the difference would be negligible in this small example. The for loop is probably optimized for speed under the hood (it is written in C), while the 'while' loop is performed in python, which is much slower. Much more important than the speed

Re: a good explanation

2006-05-25 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: hi my friend has written a loop like this cnt = 0 files = [a,b,c,d] while cnt len(files) : do_something(files[cnt]) i told him using for fi in files: do_something(fi) is better, because the while loop method makes another call to len..which is

Re: a good explanation

2006-05-25 Thread John Machin
On 25/05/2006 9:27 PM, [EMAIL PROTECTED] wrote: hi my friend has written a loop like this cnt = 0 files = [a,b,c,d] while cnt len(files) : do_something(files[cnt]) i told him using for fi in files: do_something(fi) is better, because the while loop method makes another call to

Re: a good explanation

2006-05-25 Thread mik3
wow!...thanks for both replies..and yes you are right, he comes from a world of C and java...i have successfully brainwashed him to try out coding in python...haha. So he has written his first program in python and i have roughly toook a glance at it and saw what he did.. i pointed out his

Re: John Bokma harassment

2006-05-25 Thread Iain Chalmers
In article [EMAIL PROTECTED], Tim X [EMAIL PROTECTED] wrote: I also seem to remember a page on his website from a couple of years back in which he admits enjoying trolling and starting flame wars - but I can't find it now, so maybe I'm mistaken.

Re: Bind an instance of a base to a subclass - can this be done?

2006-05-25 Thread Lou Pecora
In article [EMAIL PROTECTED], Diez B. Roggisch [EMAIL PROTECTED] wrote: Lou Pecora schrieb: [cut] Then do something like (I know this isn't right, I'm just trying to convey the idea of what I would like) mf=myfile() mf=open(Afile,r) Possible in some way? Thanks in advance

Re: how to change sys.path?

2006-05-25 Thread Ziga Seilnacht
Michael Yanowitz wrote: Is there something like a .pythoninitrc which can run whenever we start Python that can load a file with many sys.path.append(), etc? If not is there some way to modify the Python shell constructor and destructor? Thanks in advance: Michael yanowitz Yes, there is

Re: Bind an instance of a base to a subclass - can this be done?

2006-05-25 Thread Lou Pecora
In article [EMAIL PROTECTED], Maric Michaud [EMAIL PROTECTED] wrote: Le Mercredi 24 Mai 2006 22:04, Diez B. Roggisch a écrit : Nope, not in that way. But you might consider writing a proxy/wrapper for an object. That looks like this (rouch sketch from head): class FileWrapper(object):

Re: IronPython 1.0 Beta 7 Released

2006-05-25 Thread BartlebyScrivener
Can you recommend a book or a link for a person learning Python on Windows who does not yet know C# or .NET? Thanks, rick -- http://mail.python.org/mailman/listinfo/python-list

how to clear up a List in python?

2006-05-25 Thread python
I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? And, if a list have 801 values, I want to get its values index from 300 to 400, could use list1[300:400],are right me? -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding Upper-case characters in regexps, unicode friendly.

2006-05-25 Thread Kent Johnson
[EMAIL PROTECTED] wrote: I'm trying to make a unicode friendly regexp to grab sentences reasonably reliably for as many unicode languages as possible, focusing on european languages first, hence it'd be useful to be able to refer to any uppercase unicode character instead of just the typical

Re: how to use matplotlib contour()?

2006-05-25 Thread Grant Edwards
On 2006-05-24, Robert Kern [EMAIL PROTECTED] wrote: Yes, unfortunately, much of the documentation was written by people who were very familiar with the Matlab interfaces that these functions are emulating. Since I've never used matlab, I'm a bit clueless. For example one parameter is specied

Re: [Python-Help] os listdir access denied when run as a service

2006-05-25 Thread Danny Yoo
On Thu, 25 May 2006, Thomas Thomas wrote: I am trying to access a mapped network drive folder. everything works fine normally. But when i run the application as service I am getting the error The error is on the line: for filename in os.listdir(folder):#line 25 and I have to

tkFileDialog.Open to select a large number of files

2006-05-25 Thread Alexandre Guimond
Hi. I've noticed that when i select a large number of files ( 400) using tkFileDialog.Open i get an empty list. Does anyone knows the limits of that interface regarding the maximum number of files that can be selected, or the maximum length of the resulting list? Does anyone have any work around?

Re: John Bokma harassment

2006-05-25 Thread Dražen Gemić
Larry Elmore wrote: No shit. Lately it seems that for every spam post of Xah's, there's at three or more by John *to all the same newsgroups* bitching about Xah's use of bandwidth. Pot, meet kettle. I'm killfiling Xah for being a useless twit and killfiling John for being a prick about it.

regex/lambda black magic

2006-05-25 Thread Andrew Robert
Hi everyone, I have two test scripts, an encoder and a decoder. The encoder, listed below, works perfectly. import re,sys output = open(r'e:\pycode\out_test.txt','wb') for line in open(r'e:\pycode\sigh.txt','rb') : output.write( re.sub(r'([^\w\s])', lambda s: '%%%2X' % ord(s.group()),

Re: Modify one character in a string

2006-05-25 Thread Roy Smith
mp [EMAIL PROTECTED] wrote: X-No-Archive How do I go about modifying one character in a string elegantly? In other words, I want a function that will change '' to 'aaza', given the index 2 of the character in the string. Strings are immutable, so you can't change a string. The best you

Re: wincerapi

2006-05-25 Thread [EMAIL PROTECTED]
I know this isn't helpful at all, but now I'm curious. What's wincer? -- http://mail.python.org/mailman/listinfo/python-list

Re: wincerapi

2006-05-25 Thread Tim Williams
On 25 May 2006 07:06:02 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I know this isn't helpful at all, but now I'm curious. What's wincer? Its a module which provides an interface to the win32 CE Remote API :) -- http://mail.python.org/mailman/listinfo/python-list

Re: how to clear up a List in python?

2006-05-25 Thread vbgunz
I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? something like this will probably help. x = [1,2,3,4,5,6,7,8,9] y = x list([x.pop() for z in xrange(len(x))]) print x, y # [] [] And, if a list have 801 values, I want to get its

Re: IronPython 1.0 Beta 7 Released

2006-05-25 Thread Luis M. González
Ravi Teja wrote: Also, IronPython cannot access CPython libraries. So it cannot be used as a drop-in replacement for CPython in most non-trivial apps. Python for .NET however allows you to both use both CPython and .NET libraries. It will be able to access the standard libraries, as long as

Re: Bind an instance of a base to a subclass - can this be done?

2006-05-25 Thread Lou Pecora
I came up with this solution for subclassing the file object and making some easy I/O functions (much thanks to Maric Michaud for pointing me in the right direction). My goal was to make I/O of variables easy and in a form that I could easily visually examine the file (which I often need to

Re: how to clear up a List in python?

2006-05-25 Thread robert
python wrote: I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? And, if a list have 801 values, I want to get its values index from 300 to 400, could use list1[300:400],are right me? del list1[:] del list1[:-1000] # keep max. last

Re: how to change sys.path?

2006-05-25 Thread John Salerno
Dennis Lee Bieber wrote: On Wed, 24 May 2006 17:24:08 GMT, John Salerno [EMAIL PROTECTED] declaimed the following in comp.lang.python: Dennis Lee Bieber wrote: I may have gotten slightly confused That's my job. :) Okay: You have gotten me slightly confused G

Re: how to normalize indentation sources

2006-05-25 Thread John Salerno
John Machin wrote: remove empty lines at the end of files. Also ensure the last line ends with a newline. don't those two things conflict with one another? or is the newline added after empty lines are removed? -- http://mail.python.org/mailman/listinfo/python-list

Re: regex/lambda black magic

2006-05-25 Thread Max Erickson
Andrew Robert [EMAIL PROTECTED] wrote: ValueError: invalid literal for int(): % Does anyone see what I am doing wrong? Try getting rid of the lamba, it might make things clearer and it simplifies debugging. Something like(this is just a sketch): def callback(match): print

Re: how to normalize indentation sources

2006-05-25 Thread Tim Peters
[John Machin, quoting reindent.py docs] remove empty lines at the end of files. Also ensure the last line ends with a newline. [John Salerno] don't those two things conflict with one another? No. This is the repr of a file with (3) empty lines at the end: a file\n\n \n \t\n

Re: John Bokma harassment

2006-05-25 Thread Kay Schluehr
Dražen Gemic wrote: Larry Elmore wrote: No shit. Lately it seems that for every spam post of Xah's, there's at three or more by John *to all the same newsgroups* bitching about Xah's use of bandwidth. Pot, meet kettle. I'm killfiling Xah for being a useless twit and killfiling John

Re: a good explanation

2006-05-25 Thread Nick Craig-Wood
mik3 [EMAIL PROTECTED] wrote: So he has written his first program in python and i have roughly toook a glance at it and saw what he did.. i pointed out his mistakes but couldn't convince him otherwise. Anyway , i am going to show him your replies.. You might want to show him this too...if

Re: how to clear up a List in python?

2006-05-25 Thread vbgunz
del list1[:] thank you for that reply. I never thought of [:] cause to be me I thought it would immediately make a copy of the list or if anything that it would delete a copy so I never played with it. nice :) del list1[:-1000] # keep max. last 1000 appended items in the list

Re: Best way to handle exceptions with try/finally

2006-05-25 Thread Kent Johnson
Zameer wrote: I wonder where the else goes in try..except..finally... try / except / else / finally See the PEP: http://www.python.org/dev/peps/pep-0341/ Kent -- http://mail.python.org/mailman/listinfo/python-list

Re: how to clear up a List in python?

2006-05-25 Thread Damjan
And, if a list have 801 values, I want to get its values index from 300 to 400, could use list1[300:400],are right me? 300 will be included in your slice whereas the 400th index will be excluded. you will ultimately have 99 items in your slice. No, he'll have 100 items in the slice... 300,

script vs inneractive

2006-05-25 Thread Alex Pavluck
I am a little confused because I write most of my programs in a script editor but not all the code executes unless I run it from the inneractive shell. Am I doing something wrong? A good example is return 1 in a script returns nothing where as in the inneractive shell it will return 1 or true.

Re: Telnet linebreaks

2006-05-25 Thread Patrick M. Nielsen
*bump* :)On 5/24/06, Patrick M. Nielsen [EMAIL PROTECTED] wrote: Oh, and, apologies for the inpythonic nature of this issue.On 5/24/06, Patrick M. Nielsen [EMAIL PROTECTED] wrote:Hey guys.I have begun playing with the Simple MUD server example from the Stackless website (

Re: how to normalize indentation sources

2006-05-25 Thread John Salerno
Tim Peters wrote: [John Machin, quoting reindent.py docs] remove empty lines at the end of files. Also ensure the last line ends with a newline. [John Salerno] don't those two things conflict with one another? No. This is the repr of a file with (3) empty lines at the end: a

Re: regex/lambda black magic

2006-05-25 Thread Andrew Robert
Max Erickson wrote: snip /snip Try getting rid of the lamba, it might make things clearer and it simplifies debugging. Something like(this is just a sketch): max Yeah.. trying to keep everything on one line is becoming something of a problem. To make this easier, I followed something

Re: Web frameworks and credit cards

2006-05-25 Thread Larry Bates
TrustCommerce (www.trustcommerce.com) has an easy to use Python interface (they other interfaces as well) that I've used on a large Zope project recently. -Larry Bates Ed Leafe wrote: I may have an opportunity to develop an online ordering system for a client, and will have the ability to

Re: os listdir access denied when run as a service

2006-05-25 Thread Larry Bates
Thomas Thomas wrote: Hi All, I am trying to access a mapped network drive folder. everything works fine normally. But when i run the application as service I am getting the error Traceback (most recent call last): File docBoxApp.py, line 129, in ? File core\PollFiles.pyc, line 332,

Re: how to clear up a List in python?

2006-05-25 Thread vbgunz
No, he'll have 100 items in the slice... 300, 301,... 399 that's 100 items. you're right, sorry. [300:400] would return 100 items but the item at index 400 would not return. I suggested if he wanted it to try [300:401] as the last slice index is excluded from the return. Thanks for that :) --

Re: script vs inneractive

2006-05-25 Thread vbgunz
the interactive shell will immediatly show the result of an expression without you having to explicitly print the result. In all text editor, you will have to print the result if you wish to see it. -- http://mail.python.org/mailman/listinfo/python-list

Re: regex/lambda black magic

2006-05-25 Thread Max Erickson
Andrew Robert [EMAIL PROTECTED] wrote: import re,base64 # Evaluate captured character as hex def ret_hex(value): return base64.b16encode(value) def ret_ascii(value): return base64.b16decode(value) Note that you can just do this: from base64 import b16encode,b16decode and

Re: Modify one character in a string

2006-05-25 Thread Larry Bates
mp wrote: X-No-Archive How do I go about modifying one character in a string elegantly? In other words, I want a function that will change '' to 'aaza', given the index 2 of the character in the string. Also, how do I do this when dealing with a file ; which file mode should I use and

Re: logging

2006-05-25 Thread Vinay Sajip
Baurzhan Ismagulov wrote: Thanks for the idea! I think this should work for the example I sent. However, I have more than one module, and I want to log only l01. How can I do that? I don't know what your logger hierarchy looks like: you could perhaps log to child loggers of l01 (l01.XXX),

Re: script vs inneractive

2006-05-25 Thread Robert Kern
Dennis Lee Bieber wrote: If that return 1 is the last line in the program, at the most it will be treated as a return code to the OS signaling that the program succeeded or failed. I'm not really sure how Python handles a return from main program. It's a syntax error. -- Robert Kern

Re: access to TimesTen using python

2006-05-25 Thread Larry Bates
gunsupancar wrote: is there any module to access TimesTen in-memory database using python? I didn't find native one, but TimesTen has ODBC interface that you could use. http://www.compwisdom.com/topics/ODBC -- http://mail.python.org/mailman/listinfo/python-list

Re: Modify one character in a string

2006-05-25 Thread Paul Rubin
Larry Bates [EMAIL PROTECTED] writes: IMHO the most elegant method is something like: def switchchar(srcstring, position, character): b=list(srcstring) b[2]=character return ''.join(b) If the strings or large or you're doing it a lot, the array module is likely more efficient.

Re: No handlers could be found for logger xxx ?

2006-05-25 Thread Vinay Sajip
robert wrote: some packages like paramiko use the logging. I get this messages: No handlers could be found for logger xxx on stderr Why is un-initialized logging allowed to chatter at all? You could invoke logging.basicConfig with a level of CRITICAL. This will generally filter out logging

list comprehensions put non-names into namespaces!

2006-05-25 Thread Lonnie Princehouse
List comprehensions appear to store their temporary result in a variable named _[1] (or presumably _[2], _[3] etc for nested comprehensions) In other words, there are variables being put into the namespace with illegal names (names can't contain brackets). Can't someone come up with a better

Anyone compiling Python 2.3 on an SCO OpenServer 5 box?

2006-05-25 Thread Mike Kent
If anyone is successfully compiling Pyton 2.3 on an SCO OpenServer 5 box, I'd appreciate hearing from you on how you managed to do it. So far, I'm unable to get a python that doesn't coredump. -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-25 Thread John Bokma
Dra¾en Gemiæ [EMAIL PROTECTED] wrote: There is a person on USENET, particularly in hr. hierarchy that posts under three different accounts. Sometimes he argues with himself, and sometimes event supports himself :-) Maybe we have the similar case here. Wouldn't amaze me if some of the

Re: NEWB: how to convert a string to dict (dictionary)

2006-05-25 Thread Aahz
In article [EMAIL PROTECTED], manstey [EMAIL PROTECTED] wrote: Thanks. I didn't know eval could do that. But why do many posts say they want a solution that doesn't use eval? Because it is a security risk! eval(os.system('rm -rf /')) -- Aahz ([EMAIL PROTECTED]) *

Re: IronPython 1.0 Beta 7 Released

2006-05-25 Thread Luis M. González
Ravi Teja wrote: Also, IronPython cannot access CPython libraries. So it cannot be used as a drop-in replacement for CPython in most non-trivial apps. Python for .NET however allows you to both use both CPython and .NET libraries. It will be able to access the standard libraries, as long as

sybase open client 15_0

2006-05-25 Thread Dan
I have compiled and installed sybase-.037 , the module to add sybase to python. However, when I try to use it I get Import error: /usr/local/lib/python2.3/site-packages/sybasect.so undefined symbol: cs_dt_info I've seen some posts on the internet with other people having this issue. But

Re: Python Programming Books?

2006-05-25 Thread Aahz
In article [EMAIL PROTECTED], Rony Steelandt [EMAIL PROTECTED] wrote: 1.Python for Dummies Maruch Stef;Maruch Aahz - Hungry Minds Inc,U.S. - 408 pages - 08 2006 Possibly September if we get behind, but since Neal Norwitz is trying to accelerate the release of 2.5, that's not too likely. (This

Re: sybase open client 15_0

2006-05-25 Thread Dan
I'm running SLES 9.3 on Tyan with 2 single core 64-bit Opteron 8 GB of memory and SWAP. OCS-15_0 sybperl-2.18 python 2.3.5 Dan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have compiled and installed sybase-.037 , the module to add sybase to python. However, when I try to

Distutils -- specifying compiled output name

2006-05-25 Thread jeremito
I am using distutils to comiple/install a c extension created with SWIG. However I need to be able to specify the output filename from gcc. I tried doing this with the extra_compile_args and extra_link_args by setting them equal to -o MyOutputName.so but that didn't work. Can someone show me

Re: John Bokma harassment

2006-05-25 Thread Geoffrey Summerhayes
John Bokma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dra¾en Gemiæ [EMAIL PROTECTED] wrote: There is a person on USENET, particularly in hr. hierarchy that posts under three different accounts. Sometimes he argues with himself, and sometimes event supports himself :-) Maybe

Re: regex/lambda black magic

2006-05-25 Thread Andrew Robert
Hi Everyone, Thanks for all of your patience on this. I finally got it to work. Here is the completed test code showing what is going on. Not cleaned up yet but it works for proof-of-concept purposes. #!/usr/bin/python import re,base64 # Evaluate captured character as hex def

Re: Request for comments on python distributed technologies

2006-05-25 Thread skip
Piet Python Web services developer: Messaging technologies compared Piet http://www.ibm.com/developerworks/library/ws-pyth9/ Note a couple things. One, the article is four years old. You can't assume the various technologies have remained static since then. Two, the authors apparently

Re: John Bokma harassment

2006-05-25 Thread John Bokma
Geoffrey Summerhayes [EMAIL PROTECTED] wrote: After you kill Navarth, will it be nothing but gruff and deedle with a little wobbly to fill in the chinks? Comparing Navarth with Xah is a huge insult to Jack Vance. You should be ashamed of yourself for even thinking about it, let alone write it

Re: Telnet linebreaks

2006-05-25 Thread Jean-Paul Calderone
On 5/24/06, Patrick M. Nielsen [EMAIL PROTECTED] wrote: Hey guys. I have begun playing with the Simple MUD server example from the Stackless website ( http://www.stackless.com/Members/rmtew/code/mud.py ) and it's all good so far, however, I've come to notice something that I

Re: how to clear up a List in python?

2006-05-25 Thread Fredrik Lundh
vbgunz wrote: I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? something like this will probably help. x = [1,2,3,4,5,6,7,8,9] y = x list([x.pop() for z in xrange(len(x))]) print x, y # [] [] if you don't know how to do

Re: list comprehensions put non-names into namespaces!

2006-05-25 Thread skip
Lonnie List comprehensions appear to store their temporary result in a Lonnie variable named _[1] (or presumably _[2], _[3] etc for Lonnie nested comprehensions) Known issue. Fixed in generator comprehensions. Dunno about plans to fix it in list comprehensions. I believe at some

Re: how to normalize indentation sources

2006-05-25 Thread John Machin
On 26/05/2006 2:38 AM, John Salerno wrote: [snip] So the line below the last line of the file isn't actually considered an empty line, even though you can move the cursor to it in a text editor? That line doesn't exist in a file *until* you (a) type something into the editor and (b) save

Secure Pickle-like module

2006-05-25 Thread jiba
Hi all, I'm currently working on a secure Pickle-like module, Cerealizer, http://home.gna.org/oomadness/en/cerealizer/index.html Cerealizer has a pickle-like interface (load, dump, __getstate__, __setstate__,...), however it requires to register the class you want to cerealize, by calling

Re: John Bokma harassment

2006-05-25 Thread Dale King
Xah Lee wrote: I'm sorry to trouble everyone. But as you might know, due to my controversial writings and style, recently John Bokma lobbied people to complaint to my web hosting provider. After exchanging a few emails, my web hosting provider sent me a 30-day account cancellation notice last

Re: Secure Pickle-like module

2006-05-25 Thread Jean-Paul Calderone
On 25 May 2006 13:22:21 -0700, [EMAIL PROTECTED] wrote: Hi all, I'm currently working on a secure Pickle-like module, Cerealizer, http://home.gna.org/oomadness/en/cerealizer/index.html Cerealizer has a pickle-like interface (load, dump, __getstate__, __setstate__,...), however it requires to

Re: John Bokma harassment

2006-05-25 Thread Steve Holden
Robert Boyd wrote: On 24 May 2006 08:29:57 -0700, Rune Strand [EMAIL PROTECTED] wrote: I can just declare my support. Reading Mr. Bokmas comments below [*] certainly makes my suport stronger. I sent an email in support of Xah, which I wouldn't have bothered to do had I not read the

Problem with itertools.groupby.

2006-05-25 Thread trebucket
What am I doing wrong here? import operator import itertools vals = [(1, 11), (2, 12), (3, 13), (4, 14), (5, 15), ... (1, 16), (2, 17), (3, 18), (4, 19), (5, 20)] for k, g in itertools.groupby(iter(vals), operator.itemgetter(0)): ... print k, [i for i in g] ... 1 [(1, 11)] 2 [(2,

Re: regex/lambda black magic

2006-05-25 Thread John Machin
On 26/05/2006 4:33 AM, Andrew Robert wrote: Hi Everyone, Thanks for all of your patience on this. I finally got it to work. Here is the completed test code showing what is going on. Consider doing what you should have done at the start: state what you are trying to achieve. Not

Go help the perl list instead Fredrik Lundh

2006-05-25 Thread D H
Fredrik Lundh wrote: vbgunz wrote: I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? something like this will probably help. x = [1,2,3,4,5,6,7,8,9] y = x list([x.pop() for z in xrange(len(x))]) print x, y # [] [] if you

  1   2   >