473,661 Members | 2,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Graphical box /interactive programme

Hello i want to put an interactive text programme in to a graphical box
this is a small section of my text programme
s = raw_input ("Hello whats your name? ")
if s=='melvyn':
print "your my boss's Dad the one they call in indian language DEEP
THOUGHT LITTLE HORSE"
if s=='carol':

print "ahhh you are my boss's mom the one they call WREATH WOMAN"
if s=='rebecca':
print "you must be the FLORIST WOMAN"
if s=='gareth':
print "you must be the one they call the TRUCKER"
if s=='carmel':
print "you must be my boss's wife"

s = raw_input ("what do you do for a living? ")
print "Ahh thats easy you dont do much then",s,"my boss is a Truck driver."
these are the instructions for a graphical boxfrom Tkinter import *

root = Tk()
cv = Canvas(root, width=400, height=300, bg="blue")
cv.pack()
cv.create_recta ngle(50,30,320, 290,outline="ye llow",fill="red ",width=10)

mainloop()

any way what i would like to do is create a programme that would run my text
programme from this graphical box i tried to add the code for the box to the
top of my text programme but when i run it i get the graphical box come up
and my text programme will not work untill i kill the box. i would be graet
full if some body can help me acheive this.
thanks nige
Jul 18 '05 #1
0 1243

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2265
by: jackiechan | last post by:
I would like to test some things in C and make a graphical output when running them , something like in java for example http://www.cs.bell-labs.com/cm/cs/pearls/sortanim.html (without buttons just circles rectangles and such things) is there any extension (library) or any way to make similar (aplet-like but not web-like) output ?? (not ploting into a file but dynamic -> it changes like in that link when you click RUN)
1
1864
by: cm012b5105 | last post by:
Hello i am fairly new to python, I have written an interactive programme a small example of it is here. s = raw_input ("Do you have any children? ") if s== 'yes': print "Thats great" elif s=='no': print "Well my boss has 2" Now i have also been looking at Tkinter if we take the basic "hello, world"
1
1679
by: nigel | last post by:
somebody recently showed me how to create a new line using \n which was great.The thing is when i am creating the programme the text i wish to add is quite long.and it ends up stretching the width of several pages,which i think looks quite messy.Would it be possible for some one to show me how to create another line while writing my programme.What i mean by this is where my text ends "iv arrived"i wish to add a new line beneath to continue...
1
1274
by: nigel | last post by:
hi i have wrote an interactive programme,this is a small section of it. #This is my first programme writing in python s = raw_input ("hello what's your name? ") if s=='carmel': print "Ahh the boss's wife" if s=='melvyn': print "your the boss's dad" if s=='rebecca': print "you must be the wreath woman" if s=='gareth ':
0
1164
by: carmel stanley | last post by:
Hi i have been making an interactive programme,i have recently tried using "pyTTS" with it. This is a small ammount of it. import pyTTS tts = pyTTS.Create() tts.Rate = -3 tts.Speak('hi molly how old are you?.') s = raw_input ("how old are you?")
20
11002
by: Xavoux | last post by:
Hello all... I can't remind which function to use for safe inputs... gets, fgets, scanf leads to buffer overflow... i compiled that code with gcc version 2.95.2, on windows 2000 char tmp0 = "ABCDEFGHI\0"; char buff; /* Input buffer. */ char tmp1 = "ABCDEFGHI\0";
3
2163
by: psbasha | last post by:
Hi, I would like to call the same aplication executable with and without Graphical User Interface. Requirement: With Tkinter User interface,user can give the inputs to run the application ( Interactive). Instead user will have this inputs in the file and it will be read by the batch utility or exe for the application For example:
2
2618
by: nik | last post by:
Hi, I am looking for an interactive graphical script builder for python. Basically, something like the os X automator. I have made a group of methods that some non-programmers need to combine into a script. I don't need a python IDE necessarially, but more of a sequence builder. I am imagining a tool that could show graphical representations of my different commands and then string them together in a single "script." I've done a lot of...
0
154
by: Peter Duniho | last post by:
On Thu, 01 May 2008 07:01:00 -0700, MrNobody <MrNobody@discussions.microsoft.comwrote: It would help if you could be more specific about how you're currently mapping mouse coordinates to states. Usually, the same data you use for hit testing would be useful for drawing as well. Ignoring that for a moment, a couple of reasonable approaches include using the built-in Region class, or handling the states yourself. In
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8542
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.