Re: while within while

2007-10-27 Thread Tony
On Oct 27, 7:11 pm, Shawn Minisall <[EMAIL PROTECTED]> wrote: > snip > > import random > > def main(): > > #define and initialize variables > #choice as int > choice = 0 > #weapon choice as int > weaponchoice = 0 > #number of wins > win = 0 > #number of loses > l

Re: elementtree w/utf8

2007-10-27 Thread rzzzwilson
Tim Arnold wrote: > On a related note, I have another question--where/how can I get the > cElementTree.py module? Sorry for something so basic, but I tried installing > cElementTree, but while I could compile with setup.py build, I didn't end up > with a cElementTree.py file anywhere. The directo

Re: multi-protocol url-based IO -- pure python kioslave-like module?

2007-10-27 Thread Rob McMullen
On Oct 27, 10:13 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > Something like itools.vfs, perhaps? > > http://www.ikaaro.org/itools > http://download.ikaaro.org/doc/itools/Chapter--VFS.html Thanks for the pointer -- I hadn't run across itools before. It also gave me some new ideas for google searc

Re: Unix domain socket in python example?

2007-10-27 Thread Grant Edwards
On 2007-10-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Can someone please point me to some resource in the internet > that have a code like that one in a fashion that I can adapt > it? http://docs.python.org/lib/socket-example.html It's trivial to change it from INET to UNIX domain. > Or

iterating over the other and finding the greatest

2007-10-27 Thread Beema shafreen
hi everybody, I have file with four columns:the content: column1column2 col3 col4 1175123443A_16_P03652190 12771336387A_16_P41582022 1723178298A_16_P03652191 18801932270A_16_P41582024 1

Re: while within while

2007-10-27 Thread Steven D'Aprano
On Sat, 27 Oct 2007 15:11:37 -0400, Shawn Minisall wrote: > I've been having some problems with using a while statement for one menu > within another while statement for the main menu, first time I've done > it. [snip] > def main(): [and snip masses and masses of code] The first thing you sh

Re: good example of C extension for Mac OS X

2007-10-27 Thread MrJean1
You will need to download the MacOS X version from . It contains the source code. /Jean Brouwers On Oct 27, 12:31 pm, chewie54 <[EMAIL PROTECTED]> wrote: > On Oct 27, 2:59 pm, MrJean1 <[EMAIL PROTECTED]> wrote: > > > There is a C template in fi

Unix domain socket in python example?

2007-10-27 Thread wsguglielmetti
Hi, How are you? I'm completly new in python but I know a little of C. I developed a small application in python which generate and receive some data from times in times (question of seconds) and I need to send this data to a unix domain socket (/var/run/sfp) and read the response and print on t

Questions for the Python Devs Out There

2007-10-27 Thread Ann Thompson
I'm with an open source game engine project - Project Angela (www.projectangela.org) and I'm writing in hopes that you guys will have some advice for me. We're working on an entirely new concept in gaming engines - Ruleset Markup Languge (RML) that will allow game rules to be engine agnostic mea

Re: A lib to build query string...

2007-10-27 Thread Lawrence Oluyede
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is anybody knows about a function that can build query string from > parameter list? I very need that! urllib.urlencode? -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread Neil Cerutti
On 2007-10-27, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 27 Oct 2007 13:28:02 -0500, Tim Chase wrote: > Even clearer is not to allow octal literals :) Is there *any* use for them? >>> >>> The mode argument to os.chmod. >> >> You mean instead of >> >> import this >

Re: how to creating html files with python

2007-10-27 Thread paul
krishnakant Mane schrieb: [snip] > so instead of I doing the concatination myself, python makes it easy. > and I will have lot of complex tables etc to do like this. > so please help me choose one. Did you actually looked for a template language as suggested here? Now to make your life easier: If

Re: Yet another comparison of Python Web Frameworks

2007-10-27 Thread johnbraduk
Thomas, Like many others I have been going round the same loop for months. I have struggled with most of the Python solutions, including TurboGears and have given up and gone back to ColdFusion. I am not trying to kick of a religious war about the pros and cons of ColdFusion as a scripting langau

Re: mod_python, ElementTree and Aapche 2.0

2007-10-27 Thread Graham Dumpleton
On Oct 28, 3:02 am, Rajarshi <[EMAIL PROTECTED]> wrote: > Hi, this is a slightly vague question but I'm really puzzled as to > when I write a mod_python (3.1.3) program that makes use of > ElementTree and call it via a URL, the program simply stops when I do > something like > > s = # some XML docu

Re: tuples within tuples

2007-10-27 Thread J. Cliff Dyer
J. Clifford Dyer wrote: > On Fri, Oct 26, 2007 at 06:59:51AM -0700, [EMAIL PROTECTED] wrote regarding > Re: tuples within tuples: > >>> Resolve *what*? The problem isn't clear yet; at least to me. Above you >>> say what you get. What exactly do you want? Examples please. >>> >>> >> S

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread J. Cliff Dyer
Marc 'BlackJack' Rintsch wrote: > On Sat, 27 Oct 2007 13:28:02 -0500, Tim Chase wrote: > > Even clearer is not to allow octal literals :) Is there *any* use for them? >>> The mode argument to os.chmod. >>> >> You mean instead of >> >> import this >> os.chmod(fi

cron, python and samba restart

2007-10-27 Thread symbioid
Hello, I'm working on a project, and VMware has problems with suspending the virtual machine. We are accessing the machine through samba. However, when I suspend the VM, it stops the Samba service. The solution we hit upon was to run a script that checks, say, once a minute to determine whether

Re: how to creating html files with python

2007-10-27 Thread krishnakant Mane
hi George, On 27/10/2007, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 27, 12:12 pm, "krishnakant Mane" <[EMAIL PROTECTED]> > wrote: > > > I have one strange requirement, > > I need to create html files through python and add some data from the > database. > > The only strange thing here is t

Re: object inheritance

2007-10-27 Thread Pradeep Jindal
On Friday 26 Oct 2007 6:21:57 pm Anand wrote: > On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > > Can you tell any specific use case for doing this? > > I have many implementaions of a db interface. > > SimpleDB - simple implementation > BetterDB - optimized implementation > Cache

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread Marc 'BlackJack' Rintsch
On Sat, 27 Oct 2007 13:28:02 -0500, Tim Chase wrote: >>> Even clearer is not to allow octal literals :) Is there *any* use for >>> them? >> >> The mode argument to os.chmod. > > You mean instead of > > import this > os.chmod(filename, os.R_OK | os.W_OK | os.X_OK) > > which explicitly (rath

Re: xmpfilter-a-like for python (code annotation)

2007-10-27 Thread Marc 'BlackJack' Rintsch
On Sat, 27 Oct 2007 17:57:06 +, [EMAIL PROTECTED] wrote: > On Oct 27, 6:27 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Sat, 27 Oct 2007 17:10:13 +, [EMAIL PROTECTED] wrote: >> >http://eigenclass.org/hiki/xmpfilter >> > looks cool , anything like this for python? any reaso

Re: while within while

2007-10-27 Thread J. Cliff Dyer
Shawn Minisall wrote: > K I've since fixed the UnboundLocalError: local variable 'ai' referenced > before assignment error, I forgot to include decision = (1, 2, 3) inside > " " for each number. > > You mean like decision = ("1", "2", "3") ? I don't think that would have caused the error you

Re: good example of C extension for Mac OS X

2007-10-27 Thread chewie54
On Oct 27, 2:59 pm, MrJean1 <[EMAIL PROTECTED]> wrote: > There is a C template in file Modules/xxmodule.c in Python 2.5, maybe > earlier. > > /Jean Brouwers > > On Oct 27, 8:11 am, chewie54 <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > Does anyone now of a good example to use as template for a C

while within while

2007-10-27 Thread Shawn Minisall
K I've since fixed the UnboundLocalError: local variable 'ai' referenced before assignment error, I forgot to include decision = (1, 2, 3) inside " " for each number. Now when I run it, I get this.. >>> main() READY TO PLAY ROCK, PAPER, SCISSORS??? Please choose from the following menu: 1. Se

while within while

2007-10-27 Thread Shawn Minisall
I've been having some problems with using a while statement for one menu within another while statement for the main menu, first time I've done it. It's with choice number two from the menu. When I run the program, I get a UnboundLocalError: local variable 'ai' referenced before assignment.

Re: good example of C extension for Mac OS X

2007-10-27 Thread MrJean1
There is a C template in file Modules/xxmodule.c in Python 2.5, maybe earlier. /Jean Brouwers On Oct 27, 8:11 am, chewie54 <[EMAIL PROTECTED]> wrote: > Hi All, > > Does anyone now of a good example to use as template for a C program > extension that needs to be built on the Mac OS X. > > Thanks,

Re: good example of C extension for Mac OS X

2007-10-27 Thread MrJean1
There is a C template in file Modules/xxmodule.c in Python 2.5, maybe earlier. /Jean Brouwers On Oct 27, 8:11 am, chewie54 <[EMAIL PROTECTED]> wrote: > Hi All, > > Does anyone now of a good example to use as template for a C program > extension that needs to be built on the Mac OS X. > > Thanks

Re: Alarming message when running Python code

2007-10-27 Thread Bill Marcum
["Followup-To:" header set to comp.os.linux.misc.] On 2007-10-27, peter <[EMAIL PROTECTED]> wrote: > I'm not sure if this query should be directed to comp.lang.python or > comp.os.linux.misc so I intend to post it to both with apologies if > it's inappropriate on either. > > I have a small python u

Re: About Pywin32's invoke

2007-10-27 Thread Roger Upole
"kernel1983" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > By reading the doc of pywin32 > > we can invoke COM like: > >o = win32com.client.Dispatch("Excel.Application") > > > but is it possible to invoke some GUID directly? > Yes, you can do something like win32com.client.Dis

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread Tim Chase
>> Even clearer is not to allow octal literals :) Is there *any* use for >> them? > > The mode argument to os.chmod. You mean instead of import this os.chmod(filename, os.R_OK | os.W_OK | os.X_OK) which explicitly (rather than implicitly) spells it out? -tkc -- http://mail.python.org/m

Is the subprocess module thread-safe?

2007-10-27 Thread John Nagle
Can the subprocess module be used to launch subprocesses from threads? Or does the subprocess module affect the entire process context, like "fork"? Or is this OS dependent? Also, if you launch processes from the subprocess module module and don't wait them to complete, do zombies accumula

Re: xmpfilter-a-like for python (code annotation)

2007-10-27 Thread [EMAIL PROTECTED]
On Oct 27, 6:27 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 27 Oct 2007 17:10:13 +, [EMAIL PROTECTED] wrote: > >http://eigenclass.org/hiki/xmpfilter > > looks cool , anything like this for python? any reason that we culd > > not do simmilar ? > > I just read that page and

Re: how to creating html files with python

2007-10-27 Thread BartlebyScrivener
On Oct 27, 12:02 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > The only strange thing here is that you think this is a strange > requirement :) This is quite typical, and practically required for web > development. I was wondering about this myself the other day. Suppose you wanted to get by on

urllib: cannot open webpage which requires authentication

2007-10-27 Thread gmguyx
I tried using urllib.urlopen to open a personalized webpage (my.yahoo.com) but it doesn't work: print urllib.urlopen(http://my.yahoo.com).read() Instead of returning my.yahoo.com, it returns a page asking me to log in. So then I tried urllib.urlencode: data = urllib.urlencode({'action': 'https:

Re: os.walk and recursive deletion

2007-10-27 Thread Marc 'BlackJack' Rintsch
On Sat, 27 Oct 2007 18:07:44 +0200, Martin Marcher wrote: > Hello, > > I'm playing around with os.walk and I made up del_tree(path) which I > think is correct (in terms of the algorithm, but not as python wants > it :)). It's not correct in terms of the algorithm if you take the algorithm of `os

Re: os.walk and recursive deletion

2007-10-27 Thread Peter Otten
Martin Marcher wrote: > Hello, > > I'm playing around with os.walk and I made up del_tree(path) which I > think is correct (in terms of the algorithm, but not as python wants > it :)). > > As soon as some directory is deleted the iterator of os.walk chokes. > OK that is somehow clear to me as it

Re: xmpfilter-a-like for python (code annotation)

2007-10-27 Thread Marc 'BlackJack' Rintsch
On Sat, 27 Oct 2007 17:10:13 +, [EMAIL PROTECTED] wrote: > http://eigenclass.org/hiki/xmpfilter > looks cool , anything like this for python? any reason that we culd > not do simmilar ? I just read that page and am a little confused. This program adds assertions based on the actual code, i.e

Re: multi-protocol url-based IO -- pure python kioslave-like module?

2007-10-27 Thread Paul Boddie
On 27 Okt, 18:26, Rob McMullen <[EMAIL PROTECTED]> wrote: > Wheel reinvention preemption question: is there an existing pure- > python library with functionality similar to KDE's kio/kioslave > implementation? A multi-protocol, extensible library based on URLs > that abstracts directory listing an

xmpfilter-a-like for python (code annotation)

2007-10-27 Thread [EMAIL PROTECTED]
http://eigenclass.org/hiki/xmpfilter looks cool , anything like this for python? any reason that we culd not do simmilar ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Alarming message when running Python code

2007-10-27 Thread J. Cliff Dyer
peter wrote: > I'm not sure if this query should be directed to comp.lang.python or > comp.os.linux.misc so I intend to post it to both with apologies if > it's inappropriate on either. > > I have a small python utility which I wrote myself and which crawls > through a directory comparing all possi

Re: how to creating html files with python

2007-10-27 Thread George Sakkis
On Oct 27, 12:12 pm, "krishnakant Mane" <[EMAIL PROTECTED]> wrote: > I have one strange requirement, > I need to create html files through python and add some data from the > database. The only strange thing here is that you think this is a strange requirement :) This is quite typical, and pract

Re: urllib2 weirdness when https_proxy environment variable is exported

2007-10-27 Thread John J. Lee
Devraj <[EMAIL PROTECTED]> writes: > I have been extensively using Python's urllib2 while developing a > project with the Google Data API. The Google Data API uses httplib to > place all of its requests. However I have been using urllib2 and some > handlers that I discovered in an ASPN article to

multi-protocol url-based IO -- pure python kioslave-like module?

2007-10-27 Thread Rob McMullen
Wheel reinvention preemption question: is there an existing pure- python library with functionality similar to KDE's kio/kioslave implementation? A multi-protocol, extensible library based on URLs that abstracts directory listing and file read/write? I'm looking to use it in client code, not serv

Alarming message when running Python code

2007-10-27 Thread peter
I'm not sure if this query should be directed to comp.lang.python or comp.os.linux.misc so I intend to post it to both with apologies if it's inappropriate on either. I have a small python utility which I wrote myself and which crawls through a directory comparing all possible pairs of files. Und

Event for multithread help advice

2007-10-27 Thread JoeSox
I have two threads going class guiThread(threading.Thread) class mainThread(threading.Thread) Within the guiThread, I have an instance of class GUIFramework(Frame) in this Tkinter instance I have a ListBox. The second thread, mainThread, has an instance of a custom class the will need to send out

Re: how to creating html files with python

2007-10-27 Thread Diez B. Roggisch
krishnakant Mane schrieb: > hello, > I have one strange requirement, > I need to create html files through python and add some data from the > database. > it is a GUI based application developed in WX python. > and the reports need to come out in html for some strange reason which > is off topic t

Re: simple question on dictionary usage

2007-10-27 Thread Frank Stutzman
Wow, what a great group! Lots of useful and kind suggestions to what I was sure was a fairly dumb question. A few comments on some selected suggestions (but I appreciate all of them) Edward Kozlowski wrote: > egt = {} > for key in record: >if key.startswith('E'): >egt[key] = record[

Re: sort a list

2007-10-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > hello, > > I'm new to python and this list.I hope this question don't repeat an old > story on the list. > > I have a number list,say it's [3,2,1,4,5],I want to sort it as > [1,2,3,4,5],how to do? your_list.sort() Please read the documentation, all of this is prop

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread Dan Bishop
On Oct 27, 10:27 am, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Oct 27, 3:09 pm, MRAB <[EMAIL PROTECTED]> wrote: > > > > > On Oct 27, 12:12 am, Ben Finney <[EMAIL PROTECTED]> > > wrote:> Matimus <[EMAIL PROTECTED]> writes: > > > > The trailing L [for 'long' literals] is going away in Python 3.0. >

how to creating html files with python

2007-10-27 Thread krishnakant Mane
hello, I have one strange requirement, I need to create html files through python and add some data from the database. it is a GUI based application developed in WX python. and the reports need to come out in html for some strange reason which is off topic to discuss here. but the point is that how

os.walk and recursive deletion

2007-10-27 Thread Martin Marcher
Hello, I'm playing around with os.walk and I made up del_tree(path) which I think is correct (in terms of the algorithm, but not as python wants it :)). As soon as some directory is deleted the iterator of os.walk chokes. OK that is somehow clear to me as it can't be valid anymore since it can't

sort a list

2007-10-27 Thread _nospamnet_
hello, I'm new to python and this list.I hope this question don't repeat an old story on the list. I have a number list,say it's [3,2,1,4,5],I want to sort it as [1,2,3,4,5],how to do? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Consistent mapping from frame to function

2007-10-27 Thread TimeHorse
Is there a consistent way to map a frame object to a function / method object? Methods usually hang off of parameter 1, and functions usually in the global or local scope. But lambda functions and decorators are not so easily mapped. You can get access to the executing code object from the frame

mod_python, ElementTree and Aapche 2.0

2007-10-27 Thread Rajarshi
Hi, this is a slightly vague question but I'm really puzzled as to when I write a mod_python (3.1.3) program that makes use of ElementTree and call it via a URL, the program simply stops when I do something like s = # some XML document in a string root = XML(s) There is no exception at all - the

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread Tim Chase
> Even clearer is not to allow octal literals :) Is there *any* use for > them? +1 I find that anything I have even the remotest inkling of using octal for can be done just as easily with hex. -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: good example of C extension for Mac OS X

2007-10-27 Thread Paul Hankin
On Oct 27, 4:11 pm, chewie54 <[EMAIL PROTECTED]> wrote: > Does anyone now of a good example to use as template for a C program > extension that needs to be built on the Mac OS X. There's good, basic examples in the documentation on extending python: http://docs.python.org/ext/ -- Paul Hankin --

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread Paul Hankin
On Oct 27, 3:09 pm, MRAB <[EMAIL PROTECTED]> wrote: > On Oct 27, 12:12 am, Ben Finney <[EMAIL PROTECTED]> > wrote:> Matimus <[EMAIL PROTECTED]> writes: > > > The trailing L [for 'long' literals] is going away in Python 3.0. > > > Yes. On the other hand, we are gaining '0b' for binary literals,

good example of C extension for Mac OS X

2007-10-27 Thread chewie54
Hi All, Does anyone now of a good example to use as template for a C program extension that needs to be built on the Mac OS X. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Going past the float size limits?

2007-10-27 Thread [EMAIL PROTECTED]
On Oct 27, 8:12?am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 27 Oct 2007 10:24:41 +0200, Hendrik van Rooyen wrote: > > So 0.002625**20 is a number so small that its about as close as you > > can practically get to bugger-all, as it is less than 10 ** -40, and

A lib to build query string...

2007-10-27 Thread [EMAIL PROTECTED]
Hi! I have a pager component. This component is makes database slices (record sets) and it is use query string's PageIndex element to identify the actual page. This component is makes pager buttons in HTML to control. Like this: << < 4 5 6 > >> My problem that I need to search and I need to use

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread MRAB
On Oct 27, 12:12 am, Ben Finney <[EMAIL PROTECTED]> wrote: > Matimus <[EMAIL PROTECTED]> writes: > > The trailing L [for 'long' literals] is going away in Python 3.0. > > Yes. On the other hand, we are gaining '0b' for binary literals, > to go along with '0o' for octal and '0x' for hexa

Re: simple question on dictionary usage

2007-10-27 Thread Steven D'Aprano
On Sat, 27 Oct 2007 04:29:51 +, Frank Stutzman wrote: > My apologies in advance, I'm new to python > > Say, I have a dictionary that looks like this: > > record={'BAT': '14.4', 'USD': '24', 'DIF': '45', 'OAT': '16', > 'FF': '3.9', 'C3': '343', 'E4': '1157', 'C1': '339', 'E6': >

How to include docs using distutils?

2007-10-27 Thread skip
I have a simple setup.py file: #!/usr/bin/env python from distutils.core import setup setup(name='lockfile', author='Skip Montanaro', author_email='[EMAIL PROTECTED]', maintainer='Skip Montanaro', maintainer_email='[EMAIL PROTECTED]',

Re: How to create a PUG mailing list?

2007-10-27 Thread Aahz
In article <[EMAIL PROTECTED]>, Kevin D. Smith <[EMAIL PROTECTED]> wrote: > >I'm trying to get a Python User Group started in Norman, OK and I want >to get one of those fancy mailing lists on mail.python.org. There is a >link there to create a new list if you have the proper authority. How >d

Re: Going past the float size limits?

2007-10-27 Thread Steven D'Aprano
On Sat, 27 Oct 2007 10:24:41 +0200, Hendrik van Rooyen wrote: > So 0.002625**20 is a number so small that its about as close as you > can practically get to bugger-all, as it is less than 10 ** -40, and > more than 10**-60 If you read the rest of the thread, you'll see I give a much m

Re: simple question on dictionary usage

2007-10-27 Thread Marc 'BlackJack' Rintsch
On Sat, 27 Oct 2007 05:23:30 -0700, bearophileHUGS wrote: > My take too :-) > > dict(item for item in record.iteritems() if item[0][0] == 'E') ``s.startswith('E')`` is a little safer than ``s[0] == 'E'`` as the former returns `False` if `s` is empty while the latter raises an `IndexError`. Ciao

Re: NUCULAR fielded text searchable indexing

2007-10-27 Thread Istvan Albert
On Oct 17, 7:20 am, Steve Holden <[EMAIL PROTECTED]> wrote: > I still remember Gadfly fondly. What a great piece of software Gadfly is ... congrats on that Aaron. For me it was one of the first Python packages that truly stood out and made me want to learn Python. i. -- http://mail.python.org/

Re: simple question on dictionary usage

2007-10-27 Thread bearophileHUGS
My take too :-) dict(item for item in record.iteritems() if item[0][0] == 'E') Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression

2007-10-27 Thread patrick . waldo
Finally I solved the problem, with some really minor things to tweak. I guess it's true that I had two problems working with regular expressions. Thank you all for your help. I really learned a lot on quite a difficult problem. Final Code: #For text files in a directory... #Analyzes a randomly

Re: simple question on dictionary usage

2007-10-27 Thread Bruno Desthuilliers
Frank Stutzman a écrit : > My apologies in advance, I'm new to python > > Say, I have a dictionary that looks like this: > > record={'BAT': '14.4', 'USD': '24', 'DIF': '45', 'OAT': '16', > 'FF': '3.9', 'C3': '343', 'E4': '1157', 'C1': '339', > 'E6': '1182', 'RPM': '996', 'C6': '31

Re: simple question on dictionary usage

2007-10-27 Thread Dustan
On Oct 27, 1:16 am, Frank Millman <[EMAIL PROTECTED]> wrote: > On Oct 27, 8:02 am, Frank Millman <[EMAIL PROTECTED]> wrote: > > > > This should work - > > > > egt = dict([i for i in d.items() if i[0].startswith('E')]) > > > Of course I meant record.items(), not d.items(). Sorry. > > > Frank > > On

ANN: Leo 4.4.4 beta 4 released

2007-10-27 Thread Edward K Ream
Leo 4.4.4 beta 4 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 This beta 4 version fixes all bugs reported against Leo 4.4.4 beta 3. Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro

Re: transmit an array via socket

2007-10-27 Thread Bryan Olson
Hendrik van Rooyen wrote: > "Jeff Pang" wrote: >> I want to transmit an array via socket from a host to another. >> How to do it? thank you. > > pickle it and send it and unpickle it on the other side. > > See the cPickle module docs for loads and dumps. In particular note: Warning: The p

Dr. Wallach...

2007-10-27 Thread Hans Peter Tkany
Im Tierfutter sind 41 wichtige Nährstoffe... In der Babynahrung sind nur 11 der wichtigen Nährstoffe... Unsere Nahrung im Supermarkt enthält noch weniger lebenswichtige Mineralien und Vitamine... Erfahren Sie kostenlos die schockierende Wahrheit in Das Geheimniss der 91 essentiellen Nährstoffe

""MAN+_-WOMAN_+|=SEX WORLD""

2007-10-27 Thread Athul
""MAN+_-WOMAN_+|=SEX WORLD"" ""DATING AND ROMANCE""" * http://www.freewebs.com/sociwok/ http://amigos.com/go/g903136-pmem -- http://mail.python.org/mailman/listinfo/python-list

Re: "sem_post: Invalid argument"

2007-10-27 Thread robert
Jonathan Gardner wrote: > On Oct 25, 2:19 pm, robert <[EMAIL PROTECTED]> wrote: >> Jonathan Gardner wrote: >>> On Oct 25, 12:56 pm, robert <[EMAIL PROTECTED]> wrote: On a server the binary (red hat) installed python2.4 and also a fresh compiled python2.5 spits "sem_post: Invalid argument"

Re: Going past the float size limits?

2007-10-27 Thread Carl Banks
On Oct 26, 8:00 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-10-26, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >> What in the world are you trying to count? > > > The calculation looks like this > > > A = 0.35 > > T = 0.30 > > C = 0.25 > > G = 0.10 > > The bases in DNA? > > > and th

Re: How can i do proxy in urllib.urlopen?

2007-10-27 Thread Abandoned
I read the urllib reference and set http_proxy="my proxy". But it didn't work. I can't even get authenticated. Is there anyway that we can set the proxy? -- http://mail.python.org/mailman/listinfo/python-list

Re: transmit an array via socket

2007-10-27 Thread Hendrik van Rooyen
"Jeff Pang" wrote: I want to transmit an array via socket from a host to another. How to do it? thank you. pickle it and send it and unpickle it on the other side. See the cPickle module docs for loads and dumps. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Going past the float size limits?

2007-10-27 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > On Oct 26, 6:56 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > What in the world are you trying to count? > > The calculation looks like this > > A = 0.35 > T = 0.30 > C = 0.25 > G = 0.10 > > and then I basically continually multiply those numbers together. I > ne

How can i do proxy in urllib.urlopen?

2007-10-27 Thread Abandoned
Hi i want to do proxy in urllib.urlopen how can i do this ? And which proxy type have i can prefer ? -- http://mail.python.org/mailman/listinfo/python-list

Re: transmit an array via socket

2007-10-27 Thread 7stud
On Oct 26, 11:52 pm, "Jeff Pang" <[EMAIL PROTECTED]> wrote: > I want to transmit an array via socket from a host to another. > How to do it? thank you. > Try this: client: --- import socket s = socket.socket() host = 'localhost' port = 3030 s.connect( (host, port) ) arr = [1, 2, 3] for elm

Re: transmit an array via socket

2007-10-27 Thread Diez B. Roggisch
Jeff Pang schrieb: > I want to transmit an array via socket from a host to another. > How to do it? thank you. Using XMLRPC or Pyro or other RPC mechanisms instead of reinventing a wheel that is larger than the socket API suggests in the first place. Diez -- http://mail.python.org/mailman/listi

cannot open webpage which requires authentication

2007-10-27 Thread gmguyx
I tried using urllib.urlopen to open a personalized webpage (my.yahoo.com) but it doesn't work: print urllib.urlopen(http://my.yahoo.com).read() Instead of returning my.yahoo.com, it returns a page asking me to log in. So then I tried urllib.urlencode: data = urllib.urlencode({'action': 'https:

Re: Proposal: Decimal literals in Python.

2007-10-27 Thread Raymond Hettinger
On Oct 26, 1:54 am, Lennart Benschop <[EMAIL PROTECTED]> wrote: > My proposal: > - Any decimal constant suffixed with the letter "D" or "d" will be > interpreted as a literal of the Decimal type. This also goes for > decimal constants with exponential notation. There's nothing new here that ha