#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Running Python in Terminal (UNIX)


    Dear Forums,

    Hello! I am very new to Python, and have had zero experience in any other programing language. I am currently working on a text based game which I would like to run on Terminal on my Mac.

    I have a few issues I would like your wise minds to answer:

    1) Whenever I want to input a string in Terminal, I have to input quotation marks so it recognizes its a string. Anyway to get rid of this need of quotes?

    2) I want a certain theme for the game environment. I want the program thats running the script to have a sort of Matrix theme with the black window and green font (I only chose Terminal because of the theme). Is there anyway to somehow download a theme, or change the color settings of the program? I have WingsIDE and IDLE.


    Would appreciate the help. Many thanks!

    - Duke
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2007
    Location
    Joensuu, Finland
    Posts
    430
    Rep Power
    67
    Originally Posted by theduke007
    1) Whenever I want to input a string in Terminal, I have to input quotation marks so it recognizes its a string. Anyway to get rid of this need of quotes?
    You probably mean input() in Python 2.x. Either use Python 3 or raw_input() in Python 2.

    2) I want a certain theme for the game environment. I want the program thats running the script to have a sort of Matrix theme with the black window and green font (I only chose Terminal because of the theme). Is there anyway to somehow download a theme, or change the color settings of the program? I have WingsIDE and IDLE.
    I have no idea about any “themes”, but I guess you can control the colours using a suitable module (curses? I don’t know).
    My armada: openSUSE 13.1 (home desktop, home laptop), Crunchbang Linux 11 (mini laptop, work laptop), Android 4.2.1 (tablet)
  4. #3
  5. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480

    Solution for both pythons


    import sys
    sys.stdin.readline()
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo