Skip to content

Instantly share code, notes, and snippets.

@kived
Created August 14, 2014 19:03
Show Gist options
  • Save kived/473d559e435e79684842 to your computer and use it in GitHub Desktop.
Save kived/473d559e435e79684842 to your computer and use it in GitHub Desktop.
closing fds
import os, sys
sys.stdin.close()
sys.stdout.close()
sys.stderr.close()
os.close(0)
os.close(1)
os.close(2)
import kivy
kivy.require('1.8.1')
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
BoxLayout:
Label:
text: 'hi'
''')
class TestApp(App):
def build(self):
return root
if __name__ == '__main__':
TestApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment