FAQ
Hello,


New to PyGUI, so if this is a known problem, I apologize, as I was
unable to find anything on the Web.


I started from the example nagbox.py, and modified it a bit (see
below), but I am getting the error:


c:\Users\dkaufman\Documents\Manufacturing\my_python\GoogleSpreadsheetTest>c:\pyt
hon27\python config_box.py
Traceback (most recent call last):
    File "config_box.py", line 1, in <module>
      from GUI import ModalDialog, Label, Button, Task, application
    File "c:\python27\lib\site-packages\GUI\ModalDialog.py", line 5, in <module>
      from GUI import application, export
    File "c:\python27\lib\site-packages\GUI\application.py", line 9, in <module>
      from GUI import export
ImportError: cannot import name export


My install has no module included named export


Thanks for your help,
Duane




from GUI import ModalDialog, Label, Button, Task, application


class ConfigBox(ModalDialog):


      def __init__(self, text, timeout):
          ModalDialog.__init__(self)
          label = Label(text)
          self.ok_button = Button("OK", action = "ok", enabled = False)
          self.place(label, left = 20, top = 20)
          self.place(self.ok_button, top = label + 20, right = label.right)
          self.shrink_wrap(padding = (20, 20))
          self.timer = Task(self.enable_button, timeout)


      def enable_button(self):
          self.ok_button.enabled = True


      def ok(self):
          self.dismiss(True)


def main():
      dlog = ConfigBox("Consider yourself nagged.", 10)
      dlog.present()


if __name__ == '__main__':
      main()

Search Discussions

  • Greg Ewing at Jul 13, 2013 at 12:50 am

    Duane Kaufman wrote:
    File "c:\python27\lib\site-packages\GUI\application.py", line 9, in
    <module>
    from GUI import export
    ImportError: cannot import name export

    My install has no module included named export

    I don't know what's happening. There should be an export()
    function defined in GUI.__init__.py.


    Are you using a fresh installation of PyGUI, or did you install
    it over an older version? If the latter, you could try deleting
    the whole GUI directory and reinstalling.


    --
    Greg

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppygui @
categoriespython
postedJul 11, '13 at 8:25p
activeJul 13, '13 at 12:50a
posts2
users2
websitecosc.canterbury.ac.nz...

2 users in discussion

Greg Ewing: 1 post Duane Kaufman: 1 post

People

Translate

site design / logo © 2019 Grokbase