Knowledge Base‎ > ‎Programming‎ > ‎Python‎ > ‎

Text Based Assignments Using Python

Running In A Single Window

When running your assignments in Python you might want to run the program in it's own window. For instance if you are doing the adventure game it would be nice to have the description and input in the same window.

Go to Pyscripters menu: Run > Configure External Run... and make sure you uncheck: Capture Output, Hide Console and Parse Trackback. See screenshot (click for larger version):

Now you can use Run > External Run to have your program run in it's own window.

ASCII Art Title Screen

Go to http://www.network-science.de/ascii/ to generate some ASCII art titles to include on your first screen! Paste the whole block of text in using triple quotes like this:

print """
\__ __/( ____ \( ____ \ ( ____ )( ___ )( ____ \| \ /\( ____ \( )
   ) (   | (    \/| (    \/  | (    )|| (   ) || (    \/|  \  / /| (    \/| |
   | |   | (_____ | |        | (____)|| |   | || |      |  (_/ / | (_____ | |
   | |   (_____  )| |        |     __)| |   | || |      |   _ (  (_____  )| |
   | |         ) || |        | (\ (   | |   | || |      |  ( \ \       ) |(_)
___) (___/\____) || (____/\  | ) \ \__| (___) || (____/\|  /  \ \/\____) | _ 
\_______/\_______)(_______/  |/   \__/(_______)(_______/|_/    \/\_______)(_)
"""
When you code runs you get this:

Clearing The Screen

You can use the following code to clear the screen. Just import os once at the top of your code:

import os
os.system('CLS')


Comments