Menu

Loading PAGE in Python via tkinter module (crossplatform?)

Anonymous
2020-10-11
2020-10-15
  • Anonymous

    Anonymous - 2020-10-11

    Hi, given that tkinter is a thin Python wrapper over tcl/tk and includes the framework
    I wrote a Python wrapper to invoke page.tcl, and it appears to work. Here is the code:

    import tkinter, sys
    root=tkinter.Tk()
    root.tk.eval('set argv {}; set argc 0')
    for a in sys.argv[1:]: # Skip argv[0] (the filename of this script)
        root.tk.eval(f'lappend argv {{{a}}}; incr argc')
    root.tk.eval('source {page.tcl}') # invoke PAGE
    root.mainloop()
    

    Place script in the page folder. Run as python page.py followed by any arguments.
    Tested on Windows 10, Python 3.7 x64 with tk 8.6.10.

     
  • Don Rozenberg

    Don Rozenberg - 2020-10-13

    This seems very interesting. Could you send me your email address so I could discuss it with you. I have a number of questions that may get off the subject of PAGE. Perhaps you could sign in to SurceForge and post a comment and then I could send a message,

     
  • Spillane

    Spillane - 2020-10-14

    Hello again, saw your reply just now.
    My Python knowledge is very hands-on so I probably cannot help you too much, but feel free to ask.

     
  • Don Rozenberg

    Don Rozenberg - 2020-10-15

    I tried sending an emaile to spillane@users.sourceforge.net but it bounced. My email address is
    don.rozenberg @ gmail/.com

     
    • Spillane

      Spillane - 2020-10-15

      Sorry about that, I forgot to enable email... please try again.

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.