Python Application does nothing

后端 未结 3 1950
野性不改
野性不改 2021-01-29 16:37

This code stopped doing anything at all after I changed something that I no longer remember

#Dash Shell
import os
import datetime

class LocalComputer:
    pass
         


        
3条回答
  •  Happy的楠姐
    2021-01-29 16:54

    You should better describe your problem. Does it print the input prompt? Does it output anything? Does it exit or just sit there? I noticed a few issues while reading over this code that might help. You should be using raw_input(), not input(). Also, you don't actually do anything with userinput unless it == 'exit'. Which is won't, because you are just using input(), not raw_input(), so the person would have to enter 'exit' (including quotes) or else the loop will never exit. (Assuming it's not Python 3 Code)

提交回复
热议问题