Re: Help Need in running a Python Program from terminal

2010-10-26 Thread Raji
Greetings Philip ! > File "openastro.py", line 90, in > >TRANSLATION[LANGUAGES[i]] = > > gettext.translation("openastro",TDomain,languages=['en']) > > File "/usr/lib/python2.6/gettext.py", line 484, in translation > >raise IOError(ENOENT, 'No translation file found for domain', domain)

Re: Help Need in running a Python Program from terminal

2010-10-25 Thread Philip Semanchuk
On Oct 25, 2010, at 7:16 AM, Raji wrote: > Greetings ! > > I want to analyse and debug a python program ( its a astrology application > ) > > Downloaded the code from here http://openastro.org/?Download > for Ubuntu > > When i executed the main file python o

Help Need in running a Python Program from terminal

2010-10-25 Thread Raji
Greetings ! I want to analyse and debug a python program ( its a astrology application ) Downloaded the code from here http://openastro.org/?Download for Ubuntu When i executed the main file python openastro.py from terminal i stopped with the following error

Re: help need to write a python spell checker

2010-05-21 Thread Albert van der Horst
In article , Terry Reedy wrote: >On 5/19/2010 3:17 AM, CM wrote: >> I love how he just copied and pasted the assignment without any other >> remarks. > >Yeah, that way he did not mess it up ;-). OTOH it may be a copyright infringement. Or is posting an assignment to a newsgroup "fair use"? Groe

Re: help need to write a python spell checker

2010-05-19 Thread alex23
Patrick Maupin wrote: > Although it makes > perfect sense, I never really thought much about the possibility that > the school year would be "upside down" "down under"... Yes, having the school year run within the actual year instead of across two is such a topsy-turvy concept, it's pretty obviou

Re: help need to write a python spell checker

2010-05-19 Thread Terry Reedy
On 5/19/2010 3:17 AM, CM wrote: I love how he just copied and pasted the assignment without any other remarks. Yeah, that way he did not mess it up ;-). -- http://mail.python.org/mailman/listinfo/python-list

Re: help need to write a python spell checker

2010-05-19 Thread CM
I love how he just copied and pasted the assignment without any other remarks. -- http://mail.python.org/mailman/listinfo/python-list

Re: help need to write a python spell checker

2010-05-18 Thread Xavier Ho
Yeah, most unis here commence in March, and the first semester usually finish in June, when the exams are. - Xav on his 'droid On 19/05/2010 2:21 PM, "Patrick Maupin" wrote: On May 14, 3:19 am, "harry k" wrote: > Write a spell checking tool that wil... Well, this has been educational. Both m

Re: help need to write a python spell checker

2010-05-18 Thread John Machin
On May 19, 1:37 pm, Steven D'Aprano wrote: > On Wed, 19 May 2010 13:01:10 +1000, Nigel Rowe wrote: > > I'm happy to do you homework for you, cost is us$1000 per hour.  Email > > to your professor automatically on receipt. > > I'll do it for $700 an hour! he could save the money if he oogledgay or

Re: help need to write a python spell checker

2010-05-18 Thread Patrick Maupin
On May 14, 3:19 am, "harry k" wrote: > Write a spell checking tool that will identify all misspelled word in a text > file using a provided dictionary. Well, this has been educational. Both my daughters just finished their final exams last week, so I was confused about seeing the homework assi

Re: help need to write a python spell checker

2010-05-18 Thread Steven D'Aprano
On Wed, 19 May 2010 13:01:10 +1000, Nigel Rowe wrote: > I'm happy to do you homework for you, cost is us$1000 per hour. Email > to your professor automatically on receipt. I'll do it for $700 an hour! -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: help need to write a python spell checker

2010-05-18 Thread Nigel Rowe
On Fri, 14 May 2010 18:19, harry k wrote in comp.lang.python <>: > Write a spell checking tool that will identify all misspelled word in a text file using a provided dictionary. > > > > Extend the spell-checking tool so that the program will also print out a list of possible correct spellings f

Re: help need to write a python spell checker

2010-05-15 Thread Tim Chase
2) Python-list doesn't like to do other people's homework. This could be fun... :) For this problem, all you have to do is a big "if/elif/else" statement for every possible mis-spelling. If you want to get really fancy, you could put all the mis-spellings in a set() and then test the incomi

Re: help need to write a python spell checker

2010-05-15 Thread James Mills
On Fri, May 14, 2010 at 6:19 PM, harry k wrote: > Write a spell checking tool that will identify all misspelled word in a text > file using a provided dictionary. Is this an assignment ? Sure looks like it! I don't see a question anywhere. --james -- http://mail.python.org/mailman/listinfo/py

Re: help need to write a python spell checker

2010-05-15 Thread Xavier Ho
1) Welcome to Python-List! 2) Python-list doesn't like to do other people's homework. 3) What have you tried? Cheers, Xav On Fri, May 14, 2010 at 6:19 PM, harry k wrote: > Write a spell checking tool that will identify all misspelled word in a > text file using a provided dictionary. > > > Th

help need to write a python spell checker

2010-05-15 Thread harry k
Write a spell checking tool that will identify all misspelled word in a text file using a provided dictionary. The program will accept either one or two command line parameters. 1. The first command line parameter is the name of the text file that will be checked. 2. The optional seco

Re: Help need with subprocess communicate

2008-06-06 Thread Nicola Musatti
On Jun 4, 9:56 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 3 Jun 2008 23:48:38 -0700 (PDT), [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > > > Is there way to configure the stdout buffer size so that it flushes > > earlier.. > > Is there a way to make above mentio

Re: Help need with subprocess communicate

2008-06-05 Thread Daniel Klein
On Tue, 3 Jun 2008 23:48:38 -0700 (PDT), [EMAIL PROTECTED] wrote: >On Jun 3, 11:23 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On Tue, 3 Jun 2008 18:04:40 -0700 (PDT), [EMAIL PROTECTED] declaimed the >> following in comp.lang.python: >> >> >> >> > Hi Daniel, >> > Thanks for your reply.. >>

Re: Help need with subprocess communicate

2008-06-04 Thread Ali
On Jun 3, 10:04 pm, [EMAIL PROTECTED] wrote: > I'm trying to perform following type of operation from inside a python > script. > 1. Open an application shell (basically a tcl ) > 2. Run some commands on that shell and get outputs from each command > 3. Close the shell > > I could do it using commu

Re: Help need with subprocess communicate

2008-06-04 Thread Nicola Musatti
On Jun 3, 11:04 pm, [EMAIL PROTECTED] wrote: > I'm trying to perform following type of operation from inside a python > script. > 1. Open an application shell (basically a tcl ) > 2. Run some commands on that shell and get outputs from each command > 3. Close the shell [...] > Following is my code:

Re: Help need with subprocess communicate

2008-06-04 Thread Chris
On Jun 4, 9:56 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 3 Jun 2008 23:48:38 -0700 (PDT), [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > > > Is there way to configure the stdout buffer size so that it flushes > > earlier.. > > Is there a way to make above mentio

Re: Help need with subprocess communicate

2008-06-03 Thread rdabane
On Jun 3, 11:23 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 3 Jun 2008 18:04:40 -0700 (PDT), [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > > > > > Hi Daniel, > > Thanks for your reply.. > > I've done exactly as you suggested...but I'm still having problem with >

Re: Help need with subprocess communicate

2008-06-03 Thread rdabane
On Jun 3, 5:42 pm, Daniel Klein <[EMAIL PROTECTED]> wrote: > On Tue, 3 Jun 2008 14:04:10 -0700 (PDT), [EMAIL PROTECTED] wrote: > >I'm trying to perform following type of operation from inside a python > >script. > >1. Open an application shell (basically a tcl ) > >2. Run some commands on that shel

Re: Help need with subprocess communicate

2008-06-03 Thread Daniel Klein
On Tue, 3 Jun 2008 14:04:10 -0700 (PDT), [EMAIL PROTECTED] wrote: >I'm trying to perform following type of operation from inside a python >script. >1. Open an application shell (basically a tcl ) >2. Run some commands on that shell and get outputs from each command >3. Close the shell > >I could d

Help need with subprocess communicate

2008-06-03 Thread rdabane
I'm trying to perform following type of operation from inside a python script. 1. Open an application shell (basically a tcl ) 2. Run some commands on that shell and get outputs from each command 3. Close the shell I could do it using communicate if I concatenate all my commands ( separated by new

Re: python readline error - please help - need it for scanner!

2006-09-08 Thread Frederic Wenzel
On 9/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > can configure, make and install > everything fine. I'm using python 2.4 I have ubuntu dapper drake. I am > trying to install hplip which requires python. When I do this, this > also works but while running the following error occurs: > Tr

python readline error - please help - need it for scanner!

2006-09-08 Thread benjamin . grant
can configure, make and install everything fine. I'm using python 2.4 I have ubuntu dapper drake. I am trying to install hplip which requires python. When I do this, this also works but while running the following error occurs: Traceback (most recent call last): File "/usr/local/bin/hp-setup",

Re: Help need

2005-11-25 Thread Steve Holden
sr_sutar wrote: > HI group, > > During doing some codeing with python i got the inline error, > > > def my_word( offset ): > try: > j = ord(t[offset]) + 256*ord(t[offset+1])# + 65536*ord(t > [offset+2]) + 16777216*ord(t[offset+3]) > #return j > except IndexError: > #

Help need

2005-11-25 Thread sr_sutar
HI group, During doing some codeing with python i got the inline error, def my_word( offset ): try: j = ord(t[offset]) + 256*ord(t[offset+1])# + 65536*ord(t [offset+2]) + 16777216*ord(t[offset+3]) #return j except IndexError: # print "Exception" return j

Re: Help need with converting Hex string to IEEE format float

2004-12-17 Thread Ian Vincent
Max M <[EMAIL PROTECTED]> wrote in news:41bf121e$0$280 [EMAIL PROTECTED]: > > ## > st = '80 00 00 00' > > import binascii > import struct > > s = ''.join([binascii.a2b_hex(s) for s in st.split()]) > v = struct.unpack("f", s)[0] > print v > ## This one worked great for what I was trying to do.

Re: Help need with converting Hex string to IEEE format float

2004-12-16 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > One example I tried was: > > wibble = struct.unpack("f", struct.pack("l", long(conv_str, 16))) > OverflowError: long int too large to convert to int You can't fit 0x8000L into a signed 32-bit integer, use 'L' for an unsigned one.

Re: Help need with converting Hex string to IEEE format float

2004-12-15 Thread Peter Hansen
Christos TZOTZIOY Georgiou wrote: s = "".join(x).decode("hex") I am not sure I remember in which version of Python the hex codec was added, but it is handy. Of course, binascii could do this since 2.0 or so, but not having to import another module *is* nice: >>> 'ff12'.decode('hex') '\xff\x12' >>>

Re: Help need with converting Hex string to IEEE format float

2004-12-15 Thread TZOTZIOY
On Tue, 14 Dec 2004 16:57:02 +0100, rumours say that "Fredrik Lundh" <[EMAIL PROTECTED]> might have written: >how about: > ># convert to byte string >import struct >s = "".join([chr(int(c, 16)) for c in x]) >v = struct.unpack("!f", s) I think that the third line in the snippet abo

Re: Help need with converting Hex string to IEEE format float

2004-12-14 Thread Fredrik Lundh
># convert to byte string, via the array module >import array, struct >a = array.array("B", [int(c, 16) for c in x]) >v = struct.unpack("!f", ) eh? should be: # convert to byte string, via the array module import array, struct a = array.array("B", [int(c, 16) for c in

Re: Help need with converting Hex string to IEEE format float

2004-12-14 Thread Fredrik Lundh
Max M wrote: > Oh, programmers loves this kind stuff. You should get tons of answers. data = '80 00 00 00' import Image v = Image.fromstring("F", (1, 1), data, "hex", "F;32BF").getpixel((0, 0)) -- http://mail.python.org/mailman/listinfo/python-list

Re: Help need with converting Hex string to IEEE format float

2004-12-14 Thread Max M
[EMAIL PROTECTED] wrote: Each of these numbers is a Hex byte making up a four byte (32 bit Big-Endian) IEEE float. I have read this data into Python using readlines and then line.split(). This gives me: ['80', '00', '00', '00'] Oh, programmers loves this kind stuff. You should get tons of answers.

Re: Help need with converting Hex string to IEEE format float

2004-12-13 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > Newbie Python programmer here, so please be patient. I have spent all > day googling for an answer to my problem, but everything I try fails to > work (or works from the Interpreter with a set value but not from my > code with dynamic values). > > Okay, here is the gen

Help need with converting Hex string to IEEE format float

2004-12-13 Thread i_vincent
Hi all, Newbie Python programmer here, so please be patient. I have spent all day googling for an answer to my problem, but everything I try fails to work (or works from the Interpreter with a set value but not from my code with dynamic values). Okay, here is the general gist of the problem. I am