This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDevelop doesn't like input

Tags: None
(comma "," separated)
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
1175
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.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]