python - How to get console output printed using kivy -


I am trying to learn how to use Kiwi Python and I would like to know how to run OS Console / Terminal command and To achieve the results I have seen the tutorials so far only to create widgets, buttons, etc. For example, how do you get results by running "uname" displayed in the cavi. Using "on the press" How can I run an order to interact with the OS and display it back in the kivy app. Whether the kivy.uix.button Import Sequence (app) from the Sequence (app) has any tutorials from the Debitop app / utility

  import app: Def Build (Auto): Return button (text) = "Press here") tutap (). Run ()   

Update: This is what I am trying to achieve. This easy-to-use module uses:

  Easy import imports from imported imports * msg = "What do you want" out = subprocess.check_output ("uname -a", shell = true) Option = boolbox (msg, title, option) if preferred == 1: msgbox (outside) elif choice == 0: msgbox ("end") = "my choice" option = ["kernel version", "nothing"] option = boolbox } 

I really do not have to do such a thing but if you want to You can call The app.run () method can call separately thread so it will not block the command line.

An example using the module:

  import logging logging .getLogger ("kivy"). Disable = import from kivy.app import from kivy.uix.listview Import to Import ListVi CMD Thread Class from CMD Import MyApp (app): Def Build (self): self.lv = ListView () Returns self.Life Def Update (self, line): self.lv.adapter.data.append (line ()) "Update list" class MyCmd (CMD, object) Returns: def __init __ (auto, app, * args): Super (HelloWald, Self) .__ init __ (* args) self.app = app def do_EOF (self, line): self.app.stop () correct def defaults (self, line): ret = self.app.update (line) print (Ret) If __name__ == '__main__': app = MyApp () thread (target = app) .run). Start MyCmd (app) Cmdloop ()    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -