I have a doubt in python curses.... how to get the current screen size using python curses...
glad if neone cud help.... thankz Sagar On Wed, 23 Mar 2005 12:00:17 +0100 (CET), [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list > or, via email, send a message with subject or body 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Python-list digest..." > > > Today's Topics: > > 1. Re: cross platform use of set locale (Serge Orlov) > 2. Re: Python to c++ conversion problem (Ahmed MOHAMED ALI) > 3. setattr inside a module (kramb64) > 4. Re: cross platform use of set locale (Timothy Smith) > 5. Re: Regular Expressions (Roel Schroeven) > > > > ---------- Forwarded message ---------- > From: "Serge Orlov" <[EMAIL PROTECTED]> > To: python-list@python.org > Date: 23 Mar 2005 02:34:06 -0800 > Subject: Re: cross platform use of set locale > Timothy Smith wrote: > > thats ok, but how do i get it to group thousands with a , ? > > and thats would mean i'd have to run everything through a formatter > > before i displayed it :/ it'd be nicer if i could just select a > > proper locale > > I think you're misusing locale. There is no guarantee that any specific > locale will have properties (like grouping) set to a known value. > Are you trying to format money? Then you need a special class so that > you can say: > > d = Dollars(1000000.01) > print "You have %s in your account" % d > > and get > > You have $1,000,000.01 in your account. > > Serge. > > > > ---------- Forwarded message ---------- > From: "Ahmed MOHAMED ALI" <[EMAIL PROTECTED]> > To: python-list@python.org > Date: Wed, 23 Mar 2005 11:54:24 +0100 > Subject: Re: Python to c++ conversion problem > Hi, > Convert the string to int then cast the int to enum with static_cast. > Ahmed > > "Akdes Serin" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I have a code in python like > > if eval('player.moveRoom(SeLinuxMud.Direction.' + x + ')'): # moveRoom > > function takes Direction enum as a parameter > > > > When I am trying to write this code in c++ > > if (player->moveRoom(s[1])) //s[1] is a string so it outputs an error > > because of not taking enum as a parameter > > > > How can I change string to enum in c++? > > Thanks. > > > > > > > > ---------- Forwarded message ---------- > From: kramb64 <[EMAIL PROTECTED]> > To: python-list@python.org > Date: Wed, 23 Mar 2005 11:35:34 +0100 > Subject: setattr inside a module > I'm trying to use setattr inside a module. > >From outside a module it's easy: > > import spam > name="hello" > value=1 > setattr(spam, name, value) > > But if I want to do this inside the module spam itself, what I've to > pass to setattr as first argument? > > Thanks a lot for your time. > Marco. > > > > ---------- Forwarded message ---------- > From: Timothy Smith <[EMAIL PROTECTED]> > To: Serge Orlov <[EMAIL PROTECTED]>, python-list@python.org > Date: Wed, 23 Mar 2005 20:52:06 +1000 > Subject: Re: cross platform use of set locale > Serge Orlov wrote: > > >Timothy Smith wrote: > > > > > >>thats ok, but how do i get it to group thousands with a , ? > >>and thats would mean i'd have to run everything through a formatter > >>before i displayed it :/ it'd be nicer if i could just select a > >>proper locale > >> > >> > > > >I think you're misusing locale. There is no guarantee that any specific > >locale will have properties (like grouping) set to a known value. > >Are you trying to format money? Then you need a special class so that > >you can say: > > > >d = Dollars(1000000.01) > >print "You have %s in your account" % d > > > >and get > > > >You have $1,000,000.01 in your account. > > > > Serge. > > > > > > > thats exactly what i'm trying to do, only having to do that for all my > outputs is more work then i'd like :/ > why is this a misuse of locale? it's exactly what locale is meant for > isn't it? > > > > ---------- Forwarded message ---------- > From: Roel Schroeven <[EMAIL PROTECTED]> > To: python-list@python.org > Date: Wed, 23 Mar 2005 10:51:41 GMT > Subject: Re: Regular Expressions > Ron wrote: > > This is probably a repeated question, but try as I might I was unable > > to find something similar in the archives. > > > > I'm trying to develop a regular expression for recognizing a simplified > > C-Style string syntax. I need it to be able to handle escape sequences > > of the form \x where x is any character including ". > > > > Here's what I'm trying: > > > > \"([^"\\]|(\\.))*\" > > > > When I try to get it to recognize something like: > > > > "I said, \"Hello!\"" > > > > It stops at the first quote after the \. > > Works for me: > > >>> print re.search(r'\"([^"\\]|(\\.))*\"', > ... r'"I said \"Hello!\""').group(0) > "I said \"Hello!\"" > > You can leave out the backslashes in fron of the first and last quotes > in the regex, by the way, at least if you use ' instead of " to delimite it: > > >>> print re.search(r'"([^"\\]|(\\.))*"', > ... r'"I said \"Hello!\""').group(0) > "I said \"Hello!\"" > > -- > If I have been able to see further, it was only because I stood > on the shoulders of giants. -- Isaac Newton > > Roel Schroeven > > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- http://mail.python.org/mailman/listinfo/python-list