Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 8th, 2005, 9:50 AM   #1
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile Keyboard Input

I am really new to Python and like the language. Is there another way for keyboard input in Python besides the nutty popup.
Dietrich is offline   Reply With Quote
Old Feb 13th, 2005, 9:45 AM   #2
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 708
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
lol, the nutty popup? I'm not quite sure what you're talking about, but here are the commands for keyboard input.

input("Whatever you want to put here")
Above only takes numbers.

And

raw_input("Whatever you want to put here")
Above only takes strings.

Some examples.
x = input("Age:")
dogYears = x * 7
print dogYears

y = raw_input("What is your name? ")
print "Hello",y
thechristelegacy is offline   Reply With Quote
Old Feb 13th, 2005, 2:24 PM   #3
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

x = Input("Prompt for something numeric")
creates this rather homely looking large size windows popup with a meaningless title, a rather limited length prompt string in front of an editbox, and two cheezy looking buttons.

Just want to use something more modern!
Dietrich is offline   Reply With Quote
Old Feb 13th, 2005, 2:33 PM   #4
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 708
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
Quote:
Originally Posted by Dietrich
x = Input("Prompt for something numeric")
creates this rather homely looking large size windows popup with a meaningless title, a rather limited length prompt string in front of an editbox, and two cheezy looking buttons.

Just want to use something more modern!

Am I sensing sarcasm, or does that actually happen? Lol, forgive my denseness, my girlfriend tells me I don't know a thing about sarcasm either, but the input command should just prompt you for a number. I've never scene anything with a pop-up window, some buttons, and an editbox, unless you're using some sort of GUI.
thechristelegacy is offline   Reply With Quote
Old Feb 15th, 2005, 2:15 PM   #5
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Red face

You got a seemingly nice girlfriend there! Got to find one of those a few years from now.
It actually does happen, I am using PythonWin 2.3.4 for the IDE, maybe that's my problem!!! Believe me, this kind of input is cheezy!
Dietrich is offline   Reply With Quote
Old Feb 15th, 2005, 4:43 PM   #6
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 708
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
ah could be, I've always just used IDLE and Python command line, but yeah the input situation you have does sound pretty cheezy.
thechristelegacy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:03 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC