anonymous
  • anonymous
I wrote a code in python but I'd really like to run it as if it were a program (as in, just seeing the things I want printed and being able to input my own replies to the question I'm having it ask me) instead of just seeing my code or running it against IDLE. Is there a way to do that and if so, how?
MIT 6.00 Intro Computer Science (OCW)
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

MicroBot
  • MicroBot
file--> New Window--->paste your code there-->f5-->enjoy!or debug!xD
AthenaWolf
  • AthenaWolf
If you want to put your own replies, replace the word/words you are already using with a raw_input("Insert something here: ") statement, unless of course, I am misreading what you asked.
rsmith6559
  • rsmith6559
What OS is your computer? The procedure is different for *nix and Windows.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

AthenaWolf
  • AthenaWolf
I have windows.
rsmith6559
  • rsmith6559
That turned out to be harder than I thought! I have a python.bat file that makes it easier on my XP machine. Simple little file: @echo off c:\python26\python.exe "%1" %* This can be in your working directory, or put in, say, c:\windows. Change the path in the script to the path to your installation. With this file, you can write a python program, say, test.py and invoke it: python test.py Try it with both files on, say, your Desktop and see if you want to stay with it. FWIW, I didn't get the method that the Python documentation suggested to work.
anonymous
  • anonymous
So if I send someone the bat file and the py file, would it be possible to make a simple VB script that will run and do everything for the client?
rsmith6559
  • rsmith6559
They would need Python installed on their machine. The .bat script could be modified to handle the invocation, no need for (UGH!) vbs. Just change the .bat to: @echo off c:\python26\python.exe "yourProgramName"
anonymous
  • anonymous
I guess that's my biggest gripe with these interpreted languages--people have to install additional software on their machine to use any programs. Most people have java, and maybe flash, but I think that's it.
rsmith6559
  • rsmith6559
You're correct that it's sometimes inconvenient to distribute interpreter based programs. On the plus side for languages like Python and Java is that your programs aren't affected much by the OS. I wrote a Python program, with GUI, on my Linux box targeted for Mac OSX that also runs on Windows and the only customizations that were needed was a key-binding for OSX, and the font needed to be bigger for Windows.

Looking for something else?

Not the answer you are looking for? Search for more explanations.