ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> py2exe-users
py2exe-users
Re: [Py2exe-users] Need a bit of TKinter help...
by Jim-On-Linux other posts by this author
Sep 19 2006 9:22PM messages near this date
Re: [Py2exe-users] Need a bit of TKinter help... | [Py2exe-users] Python 2.5 and zlib.pyd missing
On Tuesday 19 September 2006 19:17, Tanner 
Ruschman wrote:
>   Hey Everybody!
> 
>   I'm trying to get help as to the use of rapyd
>  tk software to create a number speller, but I'm
>  having a bit of trouble. I thought posting to
>  the Rapyd-tk google group would help, but
>  apparently not!
> 
>   Heres what my message looked like:
> 
>  Hey,
> 
>  I have created a simple application with
>  rapyd-tk that *should* take a typed in number
>  and turn it into a spelled out number (this is
>  what the final version should do anyway). Heres
>  my problem: I have no clue how to hook up a
>  text entry box to a variable (lets say x for
>  this example), and have x be parsed into a
>  spelled number.
> 
>  Heres a stupid little command-prompt like
>  python program I made before to let you see
>  kind of what I mean:
> 
>  ***********************************************
> ************************************************
> ******** x=int(raw_input("Please Enter An
>  Integer Between 0 and 20: ")) if x<0:
>           print 'Please type a number between 0
>  and 20' elif x==0:
>           print 'Zero'
>   elif x==1:
>           print 'One'
>   elif x==2:
>           print 'Two'
>   elif x==3:
>           print 'Three'
>   elif x==4:
>           print 'Four'
>   elif x==5:
>           print 'Five'
>   elif x==6:
>           print 'Six'
>   elif x==7:
>           print 'Seven'
>   elif x==8:
>           print 'Eight'
>   elif x==9:
>           print 'Nine'
>   elif x==10:
>           print 'Ten'
>   elif x==11:
>           print 'Eleven'
>   elif x==12:
>           print 'Twelve'
>   elif x==13:
>           print 'Thirteen'
>   elif x==14:
>           print 'Fourteen'
>   elif x==15:
>           print 'Fifteen'
>   elif x==16:
>           print 'Sixteen'
>   elif x==17:
>           print 'Seventeen'
>   elif x==18:
>           print 'Eighteen'
>   elif x==19:
>           print 'Nineteen'
>   elif x==20:
>           print 'Twenty'
>   elif x>20:
>           print 'Please type a number between 0
>  and 20'
> 
>  raw_input("Press ENTER To Close Window...")
>  


Tanner,

You can try this and modify as necessary,

>  class Knumbers :
>      def __init__(self) :
>          self.Fnum()
> 
>      def Fnum(self) :
>          vwrite=
>  ['Zero','one','two','three','four']
> 
> 
>          x = 0
>          for txt in vwrite :
>              if ventry <0 or ventry >4 :
>                  x= 'invalid entry'
>                  print x
>                  break
>              if ventry == x :
>                  txt = vwrite[x]
>                  print txt
>                  break
>              else:
>                  self.x =x =x+1
> 
> 
## you can use self.x or create Knumbers.x as your 
variable for all Widget Entries where needed.


jim-on-linux

http:\\www.inqvista.com









>  ***********************************************
> ****************************
>  ***********************
>   This was something that I wanted to give a
>  gui, where someone could give input through
>  means of a text box, and after clicking a spell
>  button, the number they entered would be
>  converted into spelling. For my gui, i have
>  created an interface as seen at
>  http://tinyurl.com/r4sby
> 
>  So, heres what I need help with:
>   1) How do I assign the entry in the text box
>  to be a variable?
> 
>  2) How do I parse the variable (or determine
>  what the user typed, and convert that into text
>  like the program I created before)
> 
>  3) Off-topic, but is there any way that I can
>  prevent the program from showing the python
>  command prompt from showing while the program
>  is running?
> 
>  Thanks for any help, I really appreciate it!
> 
>  FlyingIsFun1217
> 
>     I wish that I could have gotten some help
>  from the people who work more with this, but
>  that didn't work, so I'm asking everybody on
>  this mailing list: Can you help me with this
>  issue?
> 
>   thanks!
>   Tanner

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Py2exe-users mailing list
Py2exe-users@[...].net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
Thread:
Tanner Ruschman
Jim-On-Linux
Jim-On-Linux

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved