First python app on C9 with error
Question: after doing the courses of python and reading some books i decided to do an
app. Since that seemed overwhelming I researched and found this
<http://sebsauvage.net/python/gui/> which im replicating on Cloud9.io, and got
here:

    
    
    import Tkinter
    class simpleapp_tk(Tkinter.Tk):
          def __init__(self,parent):
            Tkinter.Tk.__init__(self,parent)
            self.parent = parent
            self.initialize()
    
        def initialize(self):
            pass
    
    if __name__== '__main__':
        app = simpleapp_tk(None)
        app.title('FirstApp')
        app.mainloop()
    

All well and fine, but now they say we can run it and see a empty window,
which when i run gives me this:

    
    
    Traceback (most recent call last):
      File "/home/ubuntu/workspace/Calculator/Calc.py", line 22, in <module>
        app().mainloop()
      File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2537, in __init__
        Widget.__init__(self, master, 'frame', cnf, {}, extra)
      File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2049, in __init__
        BaseWidget._setup(self, master, cnf)
      File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2024, in _setup
        _default_root = Tk()
      File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1767, in __init__
        self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
    _tkinter.TclError: no display name and no $DISPLAY environment variable
    
    
    Process exited with code: 1
    

Any ideas on what's wrong or how to fix it? thanks


Answer: You're trying to run a GUI app on Cloud9, which has no desktop environment.
You'll want to look into web frameworks if you're going to run on a cloud
provider.

Flask is a good, simple one.

Alternatively, if you like books and you're interested in Django, you might
check out [Hello Web App](https://hellowebapp.com/).

