Re: i need your help

2005-12-18 Thread Steve Holden
emrah gün wrote: > > hi.i dont know it is true or not to write you about that.I ve problem to > run phyton in my personal computer.I install it and there is no error > when installing but when i want to run pythonw.exe, no > window opened.Only i can run python.exe in dos shell when i click.when

Re: Double-Ended Heaps

2005-12-18 Thread Scott David Daniels
Bryan Olson wrote: > Note that any change to the contents of a DeHeap (and > therefore a DeHeap2) any re-arrange the indices of a > number of entries in the DeHeap. Yup, thanks (I'll tweak it tomorrow). > A useful Python class will follow Python convention, where > relevant convention

Re: Double-Ended Heaps

2005-12-18 Thread Bryan Olson
Scott David Daniels wrote: > I've just put together a Double-Ended Heap package. > Of course I'd love comments. > >http://members.dsl-only.net/~daniels/deheap.html I think there's a typo in: Note that any change to the contents of a DeHeap (and therefore a DeHeap2) any re-arrange t

how to remove duplicated elements in a list?

2005-12-18 Thread Kevin Yuan
How to remove duplicated elements in a list? eg. [1,2,3,1,2,3,1,2,1,2,1,3] -> [1,2,3]?Thanks!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Can you pass functions as arguments?

2005-12-18 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I want to calculate f(0) + f(1) + ...+ f(100) over some function f > which I can change. So I would like to create a function taking f as > argument giving back the sum. How do you do that in Python? You can just pass f as an argument. The following is not the most con

Can you pass functions as arguments?

2005-12-18 Thread bobueland
I want to calculate f(0) + f(1) + ...+ f(100) over some function f which I can change. So I would like to create a function taking f as argument giving back the sum. How do you do that in Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Robotics and parallel ports

2005-12-18 Thread Isaac T Alston
Thanks - now I just have to convince my parents that I should be allowed to etch circuit boards in my room :-) . Thanks again. Regards, Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: debian and python--any potential pitfalls?

2005-12-18 Thread bonono
Brian van den Broek wrote: > Hi all, > > I know that this is something for which I could (keep) STFW, but I'm > mostly ignorant of the subject area and under a bit of a deadline. So > I hope people won't mind if I truncate my search and ask here. > > I've tried solo and failed a few times to insta

Re: debian and python--any potential pitfalls?

2005-12-18 Thread Robert Kern
Brian van den Broek wrote: > Not knowing much about the details of linux and less about Debian, my > googling hasn't yielded much that settles things. I have found out > that stable ships with 2.3.5. I imagine it should be straightforward > to upgrade to 2.4.2. Am I correct? Any other Debian/Py

Columns and Rows in Excel

2005-12-18 Thread Anand
Greetings, How can I find the number of active columns and rows used in an excel work sheet? What I mean is how can i find the last column and row or cell position, where the data is stored in an excel sheet? A code snippet would be of great help. Thanks for your cooperation and help. Best rega

debian and python--any potential pitfalls?

2005-12-18 Thread Brian van den Broek
Hi all, I know that this is something for which I could (keep) STFW, but I'm mostly ignorant of the subject area and under a bit of a deadline. So I hope people won't mind if I truncate my search and ask here. I've tried solo and failed a few times to install various Linux distros on Intel x86

attach a pdf file to an email

2005-12-18 Thread [EMAIL PROTECTED]
Hi, I am writing a simple program that sends emails with attachments. I could use "MIMEImage" for .png and then attach it to an "MIMEMultipart" object. But I couldn't or don't know how to attachment a .pdf or something else to my emails. I'm new to python, could somebody help me about that? Tha

Re: Wed Development - Dynamically Generated News Index

2005-12-18 Thread Jean-Paul Calderone
On 18 Dec 2005 12:27:55 -0800, [EMAIL PROTECTED] wrote: >Hi Jean-Paul, > >I am a bit lost in you code. Is it possible for you to step through >it? For in depth-assistance, it would probably be best to continue on [EMAIL PROTECTED] You might also want to check out some of the links on

Double-Ended Heaps

2005-12-18 Thread Scott David Daniels
I've just put together a Double-Ended Heap package. Of course I'd love comments. http://members.dsl-only.net/~daniels/deheap.html --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing a shell's current directory with python

2005-12-18 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Andy B. wrote: >> I've got a python utility that I want to change my shell's current >> directory based on criteria it finds. I've scoured google and the >> python cookbook and can't seem to figure out if this is even possible. >> So far, all my attempts

Re: Wingide is a beautiful application

2005-12-18 Thread BartlebyScrivener
If you're on Windows XP why not try Xemacs? That's free and does syntax highlighting etc. Doesn't have a problem with large files and so on. rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Wingide is a beautiful application

2005-12-18 Thread bonono
I have been using vi/vim for a very long time and love it(now using ion3 + vim, not even gvim on debian), but never found it blend well with the Windows GUI. Sybren Stuvel wrote: > Claudio Grondi enlightened us with: > > The file I was editing was just 22 KByte large having 450 lines, so > > you t

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread robic0
On Sun, 18 Dec 2005 11:47:29 +0100, "Martin P. Hellwig" <[EMAIL PROTECTED]> wrote: >Xah Lee wrote: > >Nice rant, btw in most EU countries the software creator can not >withdraw the responsibility of his/her/it creation, regardless of what >the disclaimer says. Pretty big damned statement there

Re: Accessing next/prev element while for looping

2005-12-18 Thread Joseph Garvin
Steven D'Aprano wrote: >On Sun, 18 Dec 2005 23:36:29 +1100, Steven D'Aprano wrote: > > > >>Python lists aren't linked lists? They are arrays. >> >> > >[slaps head for the stupid typo] >That should have been a full stop, not question mark. Python lists are not >linked lists, period. > > > >

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread robic0
On Sat, 17 Dec 2005 11:27:58 +, Mark Carter <[EMAIL PROTECTED]> wrote: >robic0 wrote: > >> Xah, please admit to me that your under the influence of >> physocopic drugs! > >He could be schizophrenic. > >Seekers of all things wierd on the internet can do no better than Gene >Ray's Timecube:

Re: Wingide is a beautiful application

2005-12-18 Thread Sybren Stuvel
Sybren Stuvel enlightened us with: > SPE is already annoying because of all the new windows it opens... > Not a good start. I remember using it before, to check out the > Blender integration. Unfortunately, that didn't work. I'll give it > another go. I downloaded it, tried to run it, then it stop

Re: Wingide is a beautiful application

2005-12-18 Thread Sybren Stuvel
Claudio Grondi enlightened us with: > The file I was editing was just 22 KByte large having 450 lines, so > you try here to explain to me, that for speed reasons Vim has to cut > it into pieces? Yep. > Stani SPE based on Scintilla does it right, UltraEdit does it right, > Wing does it right, so w

mod_python + vampire file upload not working

2005-12-18 Thread jacob . miles
I'm trying to implement a file upload using vampire on top of mod_python, using vampire's publisher. My form has an input that looks like: and in ImageAdmin.py I define the uploadFile function: def uploadFile (req, uploadFile=None): # etc. the problem is that when this function is call

Re: need help with recieving sockets

2005-12-18 Thread Peter Hansen
Andrew wrote: > Hi I was wondering if any one could help me with a chat client I am > writing my main issue is not in the sending of messages or in the > connection setting. Your main issues should probably include those things and more. Judging by the simplistic way you are attempting to get

Re: Changing a shell's current directory with python

2005-12-18 Thread Peter Hansen
Andy B. wrote: > I've got a python utility that I want to change my shell's current > directory based on criteria it finds. I've scoured google and the > python cookbook and can't seem to figure out if this is even possible. > So far, all my attempts have changed the current python session only.

need help with recieving sockets

2005-12-18 Thread Andrew
Hi I was wondering if any one could help me with a chat client I am writing my main issue is not in the sending of messages or in the connection setting. I am having issues receiving the messages. I am using Tkinter as the GUI and Python 2.3.5 my code has been edited so many times but no matte

Re: What random number generator is used for Numeric and SciPy?

2005-12-18 Thread Robert Kern
The Helmbolds wrote: > > Python bases its random number generators on the Mersenne Twister. > > Do Numeric and SciPy also base their random number generators on the > Mersenne Twister? If not, what do they use? Numeric, numarray and scipy 0.3 use RANLIB. http://www.stat.umn.edu/HELP/ranlib-d

Re: urllib.urlopen

2005-12-18 Thread Tom Anderson
On Sat, 17 Dec 2005, Dennis Lee Bieber wrote: > (Now there is an interesting technical term: > #define ERROR_ARENA_TRASHED 7) FreeBSD at one point had an EDOOFUS; Apple kvetched about this being offensive, so it was changed to EDONTPANIC. I shitteth thee not. tom -- information distribut

Re: CGI module does not parse data

2005-12-18 Thread Tim Roberts
"amfr" <[EMAIL PROTECTED]> wrote: > >Neither work Yes, they do. Post your form HTML and the Python code you're using, and we'll show you what you're doing wrong. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing a shell's current directory with python

2005-12-18 Thread Andy B.
Many thanks for the sanity check. Just wanted to check with the gurus before heading down another path. -A On 12/18/05, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 18 Dec 2005 15:53:11 -0800, "Andy B." <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > I've got

Re: Changing a shell's current directory with python

2005-12-18 Thread Lawrence Oluyede
irIl 2005-12-18, Andy B. <[EMAIL PROTECTED]> ha scritto: > I've got a python utility that I want to change my shell's current > directory based on criteria it finds. I've scoured google and the > python cookbook and can't seem to figure out if this is even possible. > So far, all my attempts have

Re: Wingide is a beautiful application

2005-12-18 Thread Claudio Grondi
Sybren Stuvel wrote: > Claudio Grondi enlightened us with: > >>With [Strg]-[End] I went to the end of the file where I wanted to >>continue editing, but the syntax highlighting told me there is no >>code but only a comment. I checked it and found out, that Vim is >>apparently not able to do proper

Changing a shell's current directory with python

2005-12-18 Thread Andy B.
I've got a python utility that I want to change my shell's current directory based on criteria it finds. I've scoured google and the python cookbook and can't seem to figure out if this is even possible. So far, all my attempts have changed the current python session only. Am I going to have to

Looking for examples of developing new Tkinter Widgets in Tcl/Tk

2005-12-18 Thread jhujsak
Hi, Can anyone point me to any good examples of how to get started developing new Tkinter widgets in Tcl/Tk? I have read a number of the popular books on Python and Tkinter: - Grayson, J.E., Python and Tkinter Programming, Manning Publications, 2000 - Lutz, M., Programming Python, O'Reilly, 1996

PyQT dll's | missing qt-mtedu333.dll

2005-12-18 Thread jelle
Hi, I'm trying to run a python program which requires PyQt, which is installed properly on my machine, but unfortuanately it doesn't come with the required .dll to run the .pyd's, I'm missing qt-mtedu333.dll. This version is no longer available from trolltech, and I hope perhaps someone could spare

Re: Merging Subway and TurboGears (was: Re: Which Python web framework is most ...)

2005-12-18 Thread floydophone
I am looking for ways to improve CrackAJAX; I added for...in loops and iterators, but it still needs work. I would plan on sticking with the Turbogears name if we were to merge. My real worries are the controller styles (functions vs classes) and the templating language (Cheetah vs Kid). Those wil

Re: Wingide is a beautiful application

2005-12-18 Thread Sybren Stuvel
Claudio Grondi enlightened us with: > With [Strg]-[End] I went to the end of the file where I wanted to > continue editing, but the syntax highlighting told me there is no > code but only a comment. I checked it and found out, that Vim is > apparently not able to do proper highlighting when jumping

Re: Unable to install Python Imaging Library

2005-12-18 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I have absolutely no idea how to proceed. Can anyone point me in the > right direction to get over this hurdle? > > > gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC > -fPIC -I/usr/include/freetype2 -IlibImaging -I/usr/include > -I/usr/local/include

Re: Wingide is a beautiful application

2005-12-18 Thread gene tani
Claudio Grondi wrote: > Apparently Vim syntax highlighting analyses only the code it has already > 'seen' within the editing window. This is not what I expect from a > mature editor. > I have stopped here, because I found this problem after three seconds of > using it, so imagine how much other pr

Unable to install Python Imaging Library

2005-12-18 Thread peter . mosley
A few weeks ago I asked for advice about which GUI toolkit I should learn, and receved several helpful answers. In the end I went with Tkinter. This was because a) it was already installed on the machines I am most likley to use, b) it is cross platform, and c) it was not as complex as PyGtk - wh

Re: urllib.urlopen

2005-12-18 Thread JabaPyth
Thanks, guys. I tried on a different computer, and it worked fine.I then found out that my computer thyought i had a proxy server, and after i cleaned that up, it worked. Thanks again -- http://mail.python.org/mailman/listinfo/python-list

Re: Wed Development - Dynamically Generated News Index

2005-12-18 Thread infidel02
Hi Jean-Paul, I am a bit lost in you code. Is it possible for you to step through it? -- http://mail.python.org/mailman/listinfo/python-list

Re: Wingide is a beautiful application

2005-12-18 Thread malv
Good idea. Try several. I did. Many of the above don't have either no gui designer or a rather poor one. eric is by far the best! http://www.die-offenbachs.de/detlev/eric3.html malv -- http://mail.python.org/mailman/listinfo/python-list

Re: Wingide is a beautiful application

2005-12-18 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Claudio Grondi wrote: > >>The only thing what makes a difference to me is, that Wing 'understands' >>Python code what results in features not available elsewhere (e.g. go to >>definition). > > > This is something that pretty much any reasonable programming editor > wil

php to python dynamic dispatch example

2005-12-18 Thread [EMAIL PROTECTED]
I am posting code for calling almost any python function from php, because it seems generally useful. Please feel free to suggest improvements or tell me this has already been done better somewhere else, etc. My limited searching turned up nothing. I work in a heterogeneous environment with php

Re: Microsoft Hatred FAQ

2005-12-18 Thread John
David Schwartz wrote: > "Aragorn" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >>Wrong. The only obligation Microsoft has is to their shareholders. > > >If you genuinely believe that, you are a psychopath. > > >>A psychopath is someone who lacks ethics and/or the

Merging Subway and TurboGears (was: Re: Which Python web framework is most ...)

2005-12-18 Thread John J. Lee
[EMAIL PROTECTED] writes: > I'm the founder and lead developer of Subway. > > I am all for it. TG would have to change a couple of things IMHO, but I > think it would be a great idea. +100 > If we were to merge projects, we would have to get a serious > TurbowaySubgears blogging hype train goi

Your message to ZDP awaits moderator approval

2005-12-18 Thread zdp-bounces
Your mail to 'ZDP' with the subject hi, ive a new mail address Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of t

Re: Can Python write foreign characters to the console?

2005-12-18 Thread Martin v. Löwis
Michel Claveau wrote: > Hi! > > I have a problem, under win-XP, with this code : > > # -*- coding: cp-1252 -*- > > import sys > print u"Martin v. Löwis" > print "€ for Noël" > print u"€ for Noël" > sys.exit() > > ==> "Python a provoqué une erreur" > > > Am I the only one to have that? No. I

Re: Wingide is a beautiful application

2005-12-18 Thread [EMAIL PROTECTED]
Claudio Grondi wrote: > The only thing what makes a difference to me is, that Wing 'understands' > Python code what results in features not available elsewhere (e.g. go to > definition). This is something that pretty much any reasonable programming editor will get you. Vim and emacs both do it.

Re: urllib.urlopen

2005-12-18 Thread gene tani
Jay wrote: > Easy Fix... > > import urllib > the_url = "http://www.google.com"; > req = urllib.urlopen(the_url) > > Does this work for you?? This does look like proxie /firewall issue, try it from an internet cafe. Also depending on the site, you may have to set User-Agnet and/or referer headers

Re: outb, inb?

2005-12-18 Thread Peter Hansen
Daniel Schüle wrote: > I am looking for simple solution to outb to parallel port. > The program should run on Linux. I hope someone here already > faced this problem. Third hit in Google for "python parallel port": http://pyserial.sourceforge.net/pyparallel.html -Peter -- http://mail.python.o

Re: Next floating point number

2005-12-18 Thread Tim Peters
[Steven D'Aprano] > ... > Will Python always use 64-bit floats? A CPython "float" is whatever the platform C compiler means by "double". The C standard doesn't define the size of a double, so neither does Python define the size of a float. That said, I don't know of any Python platform to date w

Re: PythonWin troubleshooting

2005-12-18 Thread chuck
Oh my gosh - thank you, thank. I must have had thousands of these entries in my registry. I've blown it away and at least at initial testing, appears to have solved the problem. I should have gone poking around the the bug database. Next time I will. -- http://mail.python.org/mailman/listinfo

outb, inb?

2005-12-18 Thread Daniel Schüle
Hello, I am looking for simple solution to outb to parallel port. The program should run on Linux. I hope someone here already faced this problem. In C it would look like iopl(3/*mode*/); ioperm(0x378 /*PORT_BASE*/, 3 /*bytes*/, 1/*on*/); outb(0xff /* < data */, 0x378 /*DATA_REG*/); Any ideas we

What random number generator is used for Numeric and SciPy?

2005-12-18 Thread The Helmbolds
Python bases its random number generators on the Mersenne Twister.   Do Numeric and SciPy also base their random number generators on the Mersenne Twister? If not, what do they use?-- http://mail.python.org/mailman/listinfo/python-list

Re: Next floating point number

2005-12-18 Thread Tim Peters
[Bengt Richter] > I wonder if frexp is always available, Yes, `frexp` is a standard C89 libm function. Python's `math` doesn't contain any platform-specific functions. ... > The math module could also expose an efficient multiply by a power > of two using FSCALE if the pentium FPU is there. `l

Re: Accessing next/prev element while for looping

2005-12-18 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I can't speak for others, but I've never come upon a situation where I > needed to access the element before and the element after the current one. > > [thinks...] Wait, no, there was once, when I was writing a parser that > iterated over lines. I need

Re: Wed Development - Dynamically Generated News Index

2005-12-18 Thread gene tani
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I am building a simple MySQL news database, which would contain, a > > headline, a date, main story(body) and a graphic associated with each > > story. I would like to generate an index of the pages in this database > > ( ie a news index with lin

ANN: eric 3.8.1 released

2005-12-18 Thread Detlev Offenbach
Hi, this is to inform you about the release of eric 3.8.1. This is just a bugfix release. eric (or eric3) is a full featured Python and Ruby IDE. It is available via http://www.die-offenbachs.de/detlev/eric3.html Detlev -- Detlev Offenbach [EMAIL PROTECTED] -- http://mail.python.org/mailman/li

Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-18 Thread Thomas G. Marshall
Lars Rune Nøstdal said something like: > hi, > everyone thinks youreoay faggot and that youreh stupid .. now go > fugkght yourselfes > > peasse out .. yo! Idiot. -- http://mail.python.org/mailman/listinfo/python-list

i need your help

2005-12-18 Thread g
hi.i dont know it is true or not to write you about that.I ve problem to run phyton in my personal computer.I install it and there is no error when installing but when i want to run pythonw.exe, no window opened.Only i can run python.exe in dos shell when i click.when cilicking to w9xpopen.exe gi

Re: object oriented programming question

2005-12-18 Thread Daniel Nogradi
Hello Daniel You've certainly got a lot going on here.The heart of your question seems to be how a nested (inner) class _a can access its parent, x.  The short answer is that, in Python, it can't without some help.  _a and its instances are unaware of the context in which they are defined, sothey h

Re: Accessing next/prev element while for looping

2005-12-18 Thread Bengt Richter
On Sun, 18 Dec 2005 04:23:21 -0700, Joseph Garvin <[EMAIL PROTECTED]> wrote: >When I first came to Python I did a lot of C style loops like this: > >for i in range(len(myarray)): >print myarray[i] > >Obviously the more pythonic way is: > >for i in my array: >print i > >The python way is mu

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread Martin P. Hellwig
Ulrich Hobelmann wrote: > > The piece that a European programmer can never withdraw responsibility > could be a big problem to open-source software, though. I'm not sure > I'd want to freely publish anything that could result in liability for me. > Not that big of a problem, in EU a user is s

Re: Wingide is a beautiful application

2005-12-18 Thread vinjvinj
I have the debug and the python shell just below the editor and the project and the source assistent on the right pane. You don't have to swtich tabs when you search or go to the python shell this way. The source assistant tab is always visible. Since I did not configure it in any special way, I as

Re: Accessing next/prev element while for looping

2005-12-18 Thread Steven D'Aprano
On Sun, 18 Dec 2005 04:50:20 -0800, Max Erickson wrote: >>j is a built-in object used to make complex numbers. Or at least it >>was, until you rebound it to the current element from myarray. That's bad >>practice, but since using complex numbers is rather unusual, one you will >>probably get away

Re: Accessing next/prev element while for looping

2005-12-18 Thread Bas
Just make a custom generator function: >>> def prevcurnext(seq): it = iter(seq) prev = it.next() cur = it.next() for next in it: yield (prev,cur,next) prev,cur = cur, next >>> for (a,b,c) in prevcurnext(range(10)): print a,b

Re: Next floating point number

2005-12-18 Thread Steven D'Aprano
On Sun, 18 Dec 2005 08:37:40 +, Bengt Richter wrote: > On Sun, 18 Dec 2005 10:27:16 +1100, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >>On Sat, 17 Dec 2005 09:26:39 +, Bengt Richter wrote: >> >> >>> I wonder if this won't work (for IEEE 754 double that is) >

Re: Accessing next/prev element while for looping

2005-12-18 Thread Max Erickson
j> is a built-in object used to make complex numbers. Or at least it >was, until you rebound it to the current element from myarray. That's bad >practice, but since using complex numbers is rather unusual, one you will >probably get away with. Is it? >>> j Traceback (most recent call last): Fi

Re: Accessing next/prev element while for looping

2005-12-18 Thread Steven D'Aprano
On Sun, 18 Dec 2005 23:36:29 +1100, Steven D'Aprano wrote: > Python lists aren't linked lists? They are arrays. [slaps head for the stupid typo] That should have been a full stop, not question mark. Python lists are not linked lists, period. -- Steven. -- http://mail.python.org/mailman/listi

Re: Accessing next/prev element while for looping

2005-12-18 Thread Steven D'Aprano
On Sun, 18 Dec 2005 04:23:21 -0700, Joseph Garvin wrote: > When I first came to Python I did a lot of C style loops like this: > > for i in range(len(myarray)): > print myarray[i] > > Obviously the more pythonic way is: > > for i in my array: > print i > > The python way is much more s

Re: Accessing next/prev element while for looping

2005-12-18 Thread Nick Craig-Wood
Joseph Garvin <[EMAIL PROTECTED]> wrote: > When I first came to Python I did a lot of C style loops like this: > > for i in range(len(myarray)): > print myarray[i] > > Obviously the more pythonic way is: > > for i in my array: > print i > > The python way is much more succinct. B

Accessing next/prev element while for looping

2005-12-18 Thread Joseph Garvin
When I first came to Python I did a lot of C style loops like this: for i in range(len(myarray)): print myarray[i] Obviously the more pythonic way is: for i in my array: print i The python way is much more succinct. But a lot of times I'll be looping through something, and if a certain

Re: Can Python write foreign characters to the console?

2005-12-18 Thread Michel Claveau
Hi! I have a problem, under win-XP, with this code : # -*- coding: cp-1252 -*- import sys print u"Martin v. Löwis" print "€ for Noël" print u"€ for Noël" sys.exit() ==> "Python a provoqué une erreur" Am I the only one to have that? Michel Claveau -- @-salutations Michel Claveau -- htt

Re: Cp1251-symbols in SOAP request

2005-12-18 Thread Jarek Zgoda
Pelmen napisał(a): > but socket will raise an exception if it'll be in cp1251 I am not a socket programming expert, but I didn't notice anything strange when sending utf-8 or latin2 texts over sockets. -- Jarek Zgoda http://jpa.berlios.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread Ulrich Hobelmann
Martin P. Hellwig wrote: > Xah Lee wrote: > > Nice rant, btw in most EU countries the software creator can not > withdraw the responsibility of his/her/it creation, regardless of what > the disclaimer says. The law is the leading authority and not some > Disclaimer/EULA, that's why most US EULA

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread Martin P. Hellwig
Xah Lee wrote: Nice rant, btw in most EU countries the software creator can not withdraw the responsibility of his/her/it creation, regardless of what the disclaimer says. The law is the leading authority and not some Disclaimer/EULA, that's why most US EULA's are unauthoritative in the EU. --

Re: Next floating point number

2005-12-18 Thread Bengt Richter
On Sun, 18 Dec 2005 10:27:16 +1100, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Sat, 17 Dec 2005 09:26:39 +, Bengt Richter wrote: > > >> I wonder if this won't work (for IEEE 754 double that is) ^^^[1] >> >> from math import frexp >> def next