Reply to topic

KDevelop doesn't like input

QueenSvetlana
Registered Member
Posts
1
Karma
0

KDevelop doesn't like input

Tue Jun 12, 2018 4:35 pm
I came across this error when I tried to run this code:

Code: Select all
def main():

    name = input("Enter name: ")
    print(name)

if __name__ == "__main__":
    main()


I was wondering if there was a way to get KDevelop to run the script externally using the windows cmd?
User avatar scummos
Global Moderator
Posts
1153
Karma
7
OS

Re: KDevelop doesn't like input

Tue Jun 12, 2018 7:08 pm
On Linux you can do that, on Windows I doubt there is a terminal emulator which supports it properly. Reading standard input is a super rare thing in programming outside of programming tutorials, and for the few cases where you need it, I suggest you just run your program from the command prompt by hand. You don't *need* to execute it from within kdevelop.

I guess you could also configure kdevelop to launch cmd.exe.


I'm working on the KDevelop IDE.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], grahm, jmacleod, Majestic-12 [Bot], nrykhe, paleo, rblackwell, Sogou [Bot], YaCy [Bot]