Re: python and JMS

2006-07-30 Thread Ravi Teja
I am looking to use python to talk to JMS. Can some please point me to such resources if this is possible. JPype http://jpype.sourceforge.net/ Jython http://www.jython.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: write()

2006-07-30 Thread Andy Salnikov
manuhack [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I copied the lines f=open('/tmp/workfile', 'w') print f f.close() from Python 2.4 Documentation 7.2. But it said IOerror No such file or directory '/tmp/workfile' Is it something about the os? I'm using Python 2.4

Re: How to force a thread to stop

2006-07-30 Thread H J van Rooyen
Damjan [EMAIL PROTECTED] wrote: | | A common recovery mechanism in embedded systems is a watchdog timer, | | which is a hardware device that must be poked by the software every | | so often (e.g. by writing to some register). If too long an interval | | goes by without a poke, the WDT

Re: Looking for a regular expression for this...

2006-07-30 Thread Anthra Norell
- Original Message - From: [EMAIL PROTECTED] To: python-list@python.org Sent: Friday, July 28, 2006 10:30 PM Subject: Looking for a regular expression for this... Hi, My string is a multi line string that contains filename filename\n and host host\n entries among other

Re: install python on cdrom

2006-07-30 Thread Martin v. Löwis
Fabian Braennstroem schrieb: I look for an easy way to use the newest scipy, pyvtk, matplotlib, f2py, numpy, paraview/vtk,... on a entreprise redhat machine without administration rights. My first thought was to install the whole new python system on a cdrom/dvd and mounting it, when I need

Re: Newbie..Needs Help

2006-07-30 Thread Anthra Norell
Graham, Would it help to use another web site? Not as long as the program works on this site. If it doesn't it may help to change sites, but a new reader would have to be crafted. Towards this my code may look intimidating. It isn't really a good example for a demo, because it looks scary. As I

Re: python and JMS

2006-07-30 Thread Alan Kennedy
[tksri2000] I am looking to use python to talk to JMS. Can some please point me to such resources if this is possible. PyHJB is the python-to-JMS gateway. ... via HJB, the HTTP JMS bridge. http://hjb.python-hosting.com/ HJB (HTTP JMS Bridge) http://hjb.berlios.de/ HTH, -- alan kennedy

Re: class variables

2006-07-30 Thread Colin J. Williams
Andre Meyer wrote: Hi all I am trying to understand the magic of Python's class variables and tried the following code (see below). Just out of curiosity, I tried to define a property that provides access to a seemingly instancae variable which is in fact a class variable. All seems

Re: Nested function scope problem

2006-07-30 Thread Antoon Pardon
On 2006-07-29, Gerhard Fiedler [EMAIL PROTECTED] wrote: On 2006-07-29 13:47:37, Antoon Pardon wrote: I think the important thing to remember is that the assignment in Python is a alias maker and not a copy maker. In languages like C, Fortran, pascal, the assignment makes a copy from what is

Html character entity conversion

2006-07-30 Thread [EMAIL PROTECTED]
Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html = b.submit().get_data() soup = BeautifulSoup(html) print soup.find(span, id =

Re: Nested function scope problem

2006-07-30 Thread Gerhard Fiedler
On 2006-07-30 09:54:14, Antoon Pardon wrote: Aren't you looking too much at implementation details now? Possibly, but at this point I'm still trying to understand how Python does these things, and what the useful abstraction level is for me. I also still have very little experience how I'll put

how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread zxo102
Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame. But the app.MainLoop() in wxpython looks like conflicting with the while 1: in socket server.

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread Philippe Martin
zxo102 wrote: Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame. But the app.MainLoop() in wxpython looks like conflicting with the while

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread Philippe Martin
Philippe Martin wrote: zxo102 wrote: Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame. But the app.MainLoop() in wxpython looks like

Re: metaclass : parse all class once before doing anything else ?

2006-07-30 Thread gene tani
Paddy wrote: Laurent Rahuel wrote: Laurent. I, like Diez am unsure of why you would need what you have asked for, but maybe this will help. You can keep track of all instances of a class by this kind of thing: class C1(object): ... inst = [] ... def __init__(self): ...

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread Grant Edwards
On 2006-07-30, Philippe Martin [EMAIL PROTECTED] wrote: If you get rid of app.MaiLoop(), you basically get rid of all GUI events. You need to have you server in a separate thread. Isn't there any way to use wxWidgets socket callbacks in wxPython? -- Grant Edwards grante

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread zxo102
Philippe, Thanks a lot. I got the idea. Let me try it. Ouyang Philippe Martin 写道: Philippe Martin wrote: zxo102 wrote: Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving

Re: Html character entity conversion

2006-07-30 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html = b.submit().get_data() soup = BeautifulSoup(html)

Re: Html character entity conversion

2006-07-30 Thread danielx
[EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html = b.submit().get_data() soup = BeautifulSoup(html) print

Re: Nested function scope problem

2006-07-30 Thread Antoon Pardon
On 2006-07-30, Gerhard Fiedler [EMAIL PROTECTED] wrote: On 2006-07-30 09:54:14, Antoon Pardon wrote: Aren't you looking too much at implementation details now? Possibly, but at this point I'm still trying to understand how Python does these things, and what the useful abstraction level is

Re: class variables

2006-07-30 Thread faulkner
python != java. when you say self.v = ..., you mask the class attribute with an instance attribute. say C1.v = Colin J. Williams wrote: Andre Meyer wrote: Hi all I am trying to understand the magic of Python's class variables and tried the following code (see below). Just out of

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread bryanjugglercryptographer
Philippe Martin wrote: Philippe Martin wrote: You need to have you server in a separate thread. PS: http://wiki.wxpython.org/index.cgi/LongRunningTasks And here's an important bit from the wxWindows doc: For communication between secondary threads and the main thread, you may use

Re: How do you implement this Python idiom in C++

2006-07-30 Thread alainpoint
Pierre Barbier de Reuille wrote: [EMAIL PROTECTED] wrote: Rob Williscroft wrote: If this is more than idle curiosity I strongly suggest you post a version of the python code you need to translate to C++. For the moment this is just healthy curiosity but i will still post the code i

Re: Fastest Way To Loop Through Every Pixel

2006-07-30 Thread Chaos
Paul McGuire wrote: Paul McGuire [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Chaos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] myCol = (0.3 * image.GetRed(thisX, thisY)) + (0.59 * image.GetGreen(thisX, thisY)) + (0.11 * image.GetBlue(thisX, thisY))

Re: Html character entity conversion

2006-07-30 Thread [EMAIL PROTECTED]
Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html = b.submit().get_data()

Re: Html character entity conversion

2006-07-30 Thread [EMAIL PROTECTED]
danielx wrote: [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html = b.submit().get_data() soup =

Re: How do you implement this Python idiom in C++

2006-07-30 Thread Pierre Barbier de Reuille
[EMAIL PROTECTED] wrote: Pierre Barbier de Reuille wrote: [...] I thank you for your response. The equivalent of your solution is posted hereunder: class cA(object): count=0 def __init__(self): self.__class__.count +=1 @classmethod def

Re: Nested function scope problem

2006-07-30 Thread Gerhard Fiedler
On 2006-07-30 12:45:50, Antoon Pardon wrote: [...] we'd have to use a common definition of variable. This is a term so widely used that I'm not sure there is a useful single definition of it; do you know one? A name in a scope to which is attached some value/object. Now whether this

Re: Smaple of recursive directory walker

2006-07-30 Thread Ant
Traveler wrote: yes this is great i will work from that but how can i use say a list to pass 10 words? mylist = ['word1','word2','word3','word4'] ... for root, dirs, files in os.walk('~/mydir'): for file in [f for f in files if f.endswith(.txt)]: fh = open(file) for

Mouse LED Control in Python

2006-07-30 Thread semagraw
I found this link that describes the byte arrays to control the IM/Email Leds on my Logitech MX610 mouse: http://www.kdedevelopers.org/node/2029 The link to the tarball is dead so I can't look at that. Is there anyway to do what the link says in Python? If you follow the link above, it talks

BCD List to HEX List

2006-07-30 Thread Philippe Martin
Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8] #represents the decimal number 12345678 l2 = func (l1) # l2 =

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread Philippe Martin
Grant Edwards wrote: On 2006-07-30, Philippe Martin [EMAIL PROTECTED] wrote: If you get rid of app.MaiLoop(), you basically get rid of all GUI events. You need to have you server in a separate thread. Isn't there any way to use wxWidgets socket callbacks in wxPython? -- Grant Edwards

Re: Html character entity conversion

2006-07-30 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html = b.submit().get_data() soup =

Re: BCD List to HEX List

2006-07-30 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Philippe Martin wrote: I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8] #represents

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Philippe Martin wrote: I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library.

Re: Smaple of recursive directory walker

2006-07-30 Thread Traveler
Thank you very much that is what i was looking for. On 30 Jul 2006 13:18:51 -0700, Ant [EMAIL PROTECTED] wrote: Traveler wrote: yes this is great i will work from that but how can i use say a list to pass 10 words? mylist = ['word1','word2','word3','word4'] ... for root, dirs, files in

Re: BCD List to HEX List

2006-07-30 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Philippe Martin wrote: Marc 'BlackJack' Rintsch wrote: And now please describe you problem a little better. ;-) I'll try. first of all python is not going to be used for my purpose (sigh) I have device A which holds a binary coded decimal array [N1,N2,Nn]

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Philippe Martin wrote: Marc 'BlackJack' Rintsch wrote: And now please describe you problem a little better. ;-) I'll try. first of all python is not going to be used for my purpose (sigh) I have device A which holds a binary

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: Such as what? I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8] #represents the

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: Such as what? I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 =

Execution timeout

2006-07-30 Thread lorenzo . viscanti
X-No-Archive: yes Hi, I'm using feedparser to parse some xml feeds. As others reported (http://sourceforge.net/tracker/index.php?func=detailaid=1519461group_id=112328atid=661937 ) the library halts while parsing some feeds. To overcome this issue I was thinking about creating some kind of

Re: BCD List to HEX List

2006-07-30 Thread Paul Rubin
Philippe Martin [EMAIL PROTECTED] writes: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8] #represents the decimal number 12345678 This is untested, but should give you

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Paul Rubin wrote: Philippe Martin [EMAIL PROTECTED] writes: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8] #represents the decimal number 12345678 This is

ftplib errors/exceptions

2006-07-30 Thread Matthew Little
I'm new to Python and I am writing a simple FTP client. I am having trouble handling errors like connection refused, invalid username or password, and the like. I can use a try exception block like thistry: ftp=FTP('some_server') ftp.login() # more linesexcept: print An error has occured.\nThis

Small problem with print and comma

2006-07-30 Thread [EMAIL PROTECTED]
Hi, I have a small problem with my function: printList. I use print with a ',' . Somehow the last digit of the last number isn't printed. I wonder why. import random def createRandomList(param): length = param a = [] creating random list for i in range(0,length):

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: John Machin wrote: Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: Such as what? I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: John Machin wrote: Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: Such as what? I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Dennis Lee Bieber wrote: On Sun, 30 Jul 2006 16:39:47 -0500, Philippe Martin [EMAIL PROTECTED] declaimed the following in comp.lang.python: My apologies, I clearly made a mistake with my calculator, yes the resulting array I would need is [0xb,0xc,0x6,0x1,0x4,0xe] Take note that this is

Re: BCD List to HEX List

2006-07-30 Thread Paul Rubin
Philippe Martin [EMAIL PROTECTED] writes: I'm just using Python to prototype, so I cannot use any of these great features of the language. I think when writing a prototype, you should use whatever features you want, except maybe at the upper levels of program organization. The idea of

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Paul Rubin wrote: Philippe Martin [EMAIL PROTECTED] writes: I'm just using Python to prototype, so I cannot use any of these great features of the language. I think when writing a prototype, you should use whatever features you want, except maybe at the upper levels of program

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: Thanks John, I do not have a long available on the device: stuck with 16 bits. What does available on the device mean? Having a long is a property of a C complier, not a device. What is the CPU in the device? What is the C compiler you are using? N.B. Last time I

Re: Small problem with print and comma

2006-07-30 Thread faulkner
why don't you iterate over the list instead of indices? for elem in L: print elem, you don't need the 0 when you call range: range(0, n) == range(n) the last element of a range is n-1: range(n)[-1] == n-1 you don't need while to iterate backwards. the third argument to range is step. range(n-1,

Re: Html character entity conversion

2006-07-30 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] = hello python html =

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: Thanks John, I do not have a long available on the device: stuck with 16 bits. What does available on the device mean? Having a long is a property of a C complier, not a device. What is the CPU in the device? What is the C compiler you are

Re: BCD List to HEX List

2006-07-30 Thread Paul Rubin
Philippe Martin [EMAIL PROTECTED] writes: Thanks John, I do not have a long available on the device: stuck with 16 bits. Oh, I think I understand now, why you were asking about algorithms. You really did want something whose intermediate results all fit in 16 bits. Even if your C compiler

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8] #represents the decimal

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: John Machin wrote: Philippe Martin wrote: Thanks John, I do not have a long available on the device: stuck with 16 bits. What does available on the device mean? Having a long is a property of a C complier, not a device. What is the CPU in the device?

Re: Small problem with print and comma

2006-07-30 Thread Tim Chase
I have a small problem with my function: printList. I use print with a ',' . Somehow the last digit of the last number isn't printed. I wonder why. Posting actual code might help...the code you sent has a horrible mix of tabs and spaces. You've also got some craziness in your creating

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: Have you considered asking on a newsgroup where your problem might actually be on-topic, like: comp.lang.c Yes, I came here for the algorithm question, not the code result. Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Windows vs. Linux

2006-07-30 Thread noahmd
Okay, once-upon-a-time I tried to start programming by learning C. At the time I was younger and didn't really understand all that C had to offer. I eventually moved over to Microsoft's Visual Basic. It was nice to be able to design a visual application with no effort (too bad I didn't really

Re: non-blocking PIPE read on Windows

2006-07-30 Thread placid
Dennis Lee Bieber wrote: On 27 Jul 2006 22:26:25 -0700, placid [EMAIL PROTECTED] declaimed the following in comp.lang.python: readline() blocks until the newline character is read, but when i use read(X) where X is a number of bytes then it doesnt block(expected functionality) but i

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8]

Re: Windows vs. Linux

2006-07-30 Thread Aahz
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Long story short, I want to get back into programming, and Python looks like a good choice for me to start with, and maybe become advanced with. Right now I run Windows as my main operating system. On my old laptop I ran Ubuntu, and liked

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: John Machin wrote: Have you considered asking on a newsgroup where your problem might actually be on-topic, like: comp.lang.c Yes, I came here for the algorithm question, not the code result. This is comp.lang.python, not comp.algorithms Why are you

Re: Windows vs. Linux

2006-07-30 Thread Damjan
Right now I run Windows as my main operating system. On my old laptop I ran Ubuntu, and liked it very much; however, my new laptop has a Broadcom wireless card, and it's not very Linux friendly. of topic: that Broadcom wireless card has a driver included in the latest kernel 2.6.17, and

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library.

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: John Machin wrote: Have you considered asking on a newsgroup where your problem might actually be on-topic, like: comp.lang.c Yes, I came here for the algorithm question, not the code result. This is comp.lang.python, not

Re: Windows vs. Linux

2006-07-30 Thread William Witteman
On Sun, Jul 30, 2006 at 04:21:34PM -0700, [EMAIL PROTECTED] wrote: snip / offer. I eventually moved over to Microsoft's Visual Basic. It was snip / I'm very sorry. Long story short, I want to get back into programming, and Python looks like a good choice for me to start with, and maybe become

Re: Windows vs. Linux

2006-07-30 Thread OMouse
Python should port nicely between Windows and Linux so there should be no need to dual-boot. [EMAIL PROTECTED] wrote: Okay, once-upon-a-time I tried to start programming by learning C. At the time I was younger and didn't really understand all that C had to offer. I eventually moved over to

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: John Machin wrote: Philippe Martin wrote: Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: John Machin wrote: Philippe Martin wrote: John Machin wrote: Have you considered asking on a newsgroup where your problem might actually be on-topic, like: comp.lang.c Yes, I came here for the algorithm question, not the code result. This is

Re: Windows vs. Linux

2006-07-30 Thread James Stroud
[EMAIL PROTECTED] wrote: Okay, once-upon-a-time I tried to start programming by learning C. At the time I was younger and didn't really understand all that C had to offer. I eventually moved over to Microsoft's Visual Basic. It was nice to be able to design a visual application with no

pass parameters in SPYCE

2006-07-30 Thread kepioo
Hi all, I started to use the so good spyce server. I manage to do all the basics, however, I still block on one problem : How can I pass parameters to a spy page : example I have an index page : link1 link2 link3 link4 I want all theses html links to point to process.spy with the value of the

Re: Small problem with print and comma

2006-07-30 Thread Dustan
Dennis Lee Bieber wrote: for i in range(0,len(param)): print a[i], for it in param: print it, That's one way. However, if you need the position (this is for future reference; you don't need the position number here): for i in range(len(param)+1): print

Re: Windows vs. Linux

2006-07-30 Thread BartlebyScrivener
Windows XP is fine. I am learning Python on Windows first with an eye toward moving to Linux. If you like, get the ActivePython distribution, which comes with the Win32 extensions. If you start liking Python, consider adding the IPython shell. There are commandline tweaks you can do to make the

re: how to stop python

2006-07-30 Thread Dan
bruce bedouglas at earthlink.net posted: perl has the concept of die. does python have anything similar. how can a python app be stopped? I see this sort of statement a lot in Perl: open(FH, myfile.txt) or die (Could not open file); I've no idea why you're asking for the Python

Re: Html character entity conversion

2006-07-30 Thread John Machin
Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0) b[source] =

Re: replacing single line of text

2006-07-30 Thread saad82
Simon Tim, very valuable responses. Thank you much! Simon Forman wrote: [EMAIL PROTECTED] wrote: I want to be able to replace a single line in a large text file (several hundred MB). Using the cookbook's method (below) works but I think the replace fxn chokes on such a large chunk of

Re: BCD List to HEX List

2006-07-30 Thread Grant Edwards
On 2006-07-30, John Machin [EMAIL PROTECTED] wrote: Yes, I came here for the algorithm question, not the code result. This is comp.lang.python, not comp.algorithms Why are you avoiding naming the chip and its compiler? It's top secret. If he told us, he'd have to kill us. -- Grant

Re: BCD List to HEX List

2006-07-30 Thread Grant Edwards
On 2006-07-31, John Machin [EMAIL PROTECTED] wrote: but if you wish == on one device, the processor in an 8-bit arm and the X-compiler is made by epson 1. You still haven't *NAMED* the CPU and the compiler!! He obviously doesn't want to have to kill all of us. 2. Do you mean ARM as in

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Dennis Lee Bieber wrote: On Sun, 30 Jul 2006 17:07:57 -0500, Philippe Martin [EMAIL PROTECTED] declaimed the following in comp.lang.python: Paul Rubin wrote: If you prefer, You can do it all in one line: vlist = [int(d, 16) for d in ('%X' % int(''.join(map(str, l1]

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Grant Edwards wrote: On 2006-07-31, John Machin [EMAIL PROTECTED] wrote: but if you wish == on one device, the processor in an 8-bit arm and the X-compiler is made by epson 1. You still haven't *NAMED* the CPU and the compiler!! He obviously doesn't want to have to kill all of us.

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Philippe Martin wrote: Grant Edwards wrote: On 2006-07-31, John Machin [EMAIL PROTECTED] wrote: but if you wish == on one device, the processor in an 8-bit arm and the X-compiler is made by epson 1. You still haven't *NAMED* the CPU and the compiler!! He obviously doesn't want to

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: John Machin wrote: Philippe Martin wrote: Philippe Martin wrote: Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: 3. How does the device manage to compute the 8-decimal-digit number that is your input?? What device manager ? think about it before being rude No device manager [noun] was mentioned. You may have inferred rudeness where astonishment was being implied. I'll try

Re: non-blocking PIPE read on Windows

2006-07-30 Thread placid
Dennis Lee Bieber wrote: On 30 Jul 2006 16:22:34 -0700, placid [EMAIL PROTECTED] declaimed the following in comp.lang.python: ;) Tsk Tsk Have you ever seen a Tempest VT-100? Lead shielding on the monitor FACE... Turn the brightness all the way up and it still looked dim.

Re: python and JMS

2006-07-30 Thread Ravi Teja
Alan Kennedy wrote: [tksri2000] I am looking to use python to talk to JMS. Can some please point me to such resources if this is possible. PyHJB is the python-to-JMS gateway. ... via HJB, the HTTP JMS bridge. http://hjb.python-hosting.com/ HJB (HTTP JMS Bridge) http://hjb.berlios.de/

Re: BCD List to HEX List

2006-07-30 Thread John Machin
Philippe Martin wrote: Yes I had arm in mind (for some reason) while it is the Smc8831 (http://www.google.com/url?sa=Ustart=1q=http://www.epsondevice.com/www/PDFS/epdoc_ic.nsf/5388db40b5eee4f949256a9c001d589f/944b73008b0bad33492570a00015d6ba/%24FILE/S5U1C88000C_2Ev3.pdfe=9797) That appears to

[ python-Bugs-1495229 ] W3C - Python DOM type mapping docs need updating

2006-07-30 Thread SourceForge.net
Bugs item #1495229, was opened at 2006-05-26 01:33 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1495229group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1071248 ] Documented grammar for List displays incorrect (testlist)

2006-07-30 Thread SourceForge.net
Bugs item #1071248, was opened at 2004-11-22 20:26 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1071248group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-766842 ] Installing documentation doesn't make it show up

2006-07-30 Thread SourceForge.net
Bugs item #766842, was opened at 2003-07-06 21:42 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=766842group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Feature Requests-1166378 ] No os.spawn*p* on Windows

2006-07-30 Thread SourceForge.net
Feature Requests item #1166378, was opened at 2005-03-19 03:41 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=355470aid=1166378group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1193180 ] Strange os.path.exists() results with invalid chars

2006-07-30 Thread SourceForge.net
Bugs item #1193180, was opened at 2005-04-30 23:13 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1193180group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1488934 ] file.write + closed pipe = no error

2006-07-30 Thread SourceForge.net
Bugs item #1488934, was opened at 2006-05-15 16:10 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1488934group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Feature Requests-1276768 ] dirutils.mkpath (verbose option does not work)

2006-07-30 Thread SourceForge.net
Feature Requests item #1276768, was opened at 2005-08-30 15:59 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=355470aid=1276768group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1153417 ] os.remove error on Solaris

2006-07-30 Thread SourceForge.net
Bugs item #1153417, was opened at 2005-02-28 11:44 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1153417group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1101667 ] popen3 on windows loses environment variables

2006-07-30 Thread SourceForge.net
Bugs item #1101667, was opened at 2005-01-13 14:33 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1101667group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1525866 ] Bug in shutil.copytree on Windows

2006-07-30 Thread SourceForge.net
Bugs item #1525866, was opened at 2006-07-20 15:00 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1525866group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1257728 ] error message incorrectly claims Visual C++ is required

2006-07-30 Thread SourceForge.net
Bugs item #1257728, was opened at 2005-08-12 17:28 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1257728group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1439538 ] test -e is not portable (Solaris 2.7)

2006-07-30 Thread SourceForge.net
Bugs item #1439538, was opened at 2006-02-27 11:51 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1439538group_id=5470 Please note that this message will contain a full copy of the comment

  1   2   >