Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import sys
- """Made by Radical Truth on HF."""
- choice = raw_input("What kind of file would you like to compile/run? " +
- "If the extension is .java, type 1. If the extension is .class, " +
- "type 2. If the extension is .py, type 3. More filetypes will be " +
- "added soon.")
- def javaNotice():
- print "NOTE: This program assumes you have bin inside your PATH.\
- If this is not so, use Google to find out how to put \
- Java's bin in your PATH."
- def pythonNotice():
- print "NOTE: This program assumes you have Python inside your PATH.\
- If this is not so, use Google to find out how to put Python in \
- your PATH."
- if choice = '1'
- javaNotice()
- file_path = raw_input("Enter file path (WITH \".java\"): \n")
- file_name = raw_input("Enter file name (WITHOUT \".java\"): \n")
- os.system("javac " + file_path)
- os.system("java " + file_name)
- if choice = '2'
- javaNotice()
- file_path = raw_input("Enter file path, without file name. \n" +
- "hint: C:\\Users\\Name\\Desktop\\Projects")
- file_name = raw_input("Enter file name, without .class extension. \n")
- os.system("cd " + file_path)
- os.system("java " + file_name)
- if choice = '3'
- pythonNotice()
- file_path = raw_input("Enter file path, with file name and extension. \n")
- os.system("python " + file_path)
- sys.exit
Advertisement
Add Comment
Please, Sign In to add comment