Menu

Is src/gui/PythonQtScriptingConsole.h public API?

Help
2014-07-24
2015-03-31
  • Florian Will

    Florian Will - 2014-07-24

    Hi,

    I'm wondering if the file src/gui/PythonQtScriptingConsole.h is part of
    the public PythonQt API.

    It seems like it is not listed in the CMakeLists.txt "headers" list, so
    "make install" probably won't install that file.

    Is that a bug in CMakeLists.txt, or did I overlook something?

    Cheers,
    Florian

     
    • Florian Link

      Florian Link - 2015-03-31

      Yes, it is part of the public Sdk, but since I did' do the cmake files myself, I guess it is missing.

      Regarding the console itself, I think it is only good for debugging and as an example. For a full featured scripting console, it would require a number of improvements.

       
  • Florian Link

    Florian Link - 2014-07-24

    The CMake files are an external contribution, the official way of building PythonQt is the qmake profile. The PythonQtScriptingConsole.h is part of the public API, but any serious project will probably write their own console, since it lacks a lot of features.

     
  • Florian Will

    Florian Will - 2014-07-24

    Thanks, Florian. Screencloud happens to use the PythonQt console for a debug feature that is usually not user-visible.

    Since adding the file to the cmake "header" list causes the file to be installed in include/PythonQt while it should be in include/PythonQt/gui, I simply added a line to the end of the CMakeLists.txt file:

    install(FILES src/gui/PythonQtScriptingConsole.h DESTINATION include/PythonQt/gui)

    It works for me. Feel free to take it as another external contribution if you want.

     
  • gmas

    gmas - 2015-03-31

    Hi Florian, how does the scripting console manage multilines statement? I mean for-loop for instance. I am getting: "SyntaxError: unexpected EOF while parsing" both using the scripting console shipped with PythonQt library and with the one within MeVisLab.

     
    • Sander Stoks

      Sander Stoks - 2015-03-31

      I made some patches to NicePyConsole for this. I can share if anyone is interested.

      —Sander

      On 31 Mar 2015, at 17:07, gmas gmas@users.sf.net wrote:

      Hi Florian, how does the scripting console manage multilines statement? I mean for-loop for instance. I am getting: "SyntaxError: unexpected EOF while parsing" both using the scripting console shipped with PythonQt library and with the one within MeVisLab.

      Is src/gui/PythonQtScriptingConsole.h public API?

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/pythonqt/discussion/631393/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • gmas

    gmas - 2015-03-31

    I am sure that it will help, thank you!
    When you cited NicePyConsole, are you talking about this code: https://github.com/Orochimarufan/PythonQt/tree/master/examples/NicePyConsole
    Is this something like a fork of PythonQt or whatelse?

     
    • Sander Stoks

      Sander Stoks - 2015-03-31

      I actually thought it was “included sample code”… Where can I send my versions of the files, or patches?

      —Sander

      On 31 Mar 2015, at 17:19, gmas gmas@users.sf.net wrote:

      I am sure that it will help, thank you!
      When you cited NicePyConsole, are you talking about this code: https://github.com/Orochimarufan/PythonQt/tree/master/examples/NicePyConsole
      Is this something like a fork of PythonQt or whatelse?

      Is src/gui/PythonQtScriptingConsole.h public API?

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/pythonqt/discussion/631393/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
      • gmas

        gmas - 2015-03-31

        I dropped a message for you with my email. Thank you!

         
  • Florian Link

    Florian Link - 2015-03-31

    I did not add the NicePyConsole to PythonQt, because it depends on too many Python libraries which I don't want to maintain as part of PythonQt.

     
    • gmas

      gmas - 2015-03-31

      I see your point. So the way to go for loop-like statement using the official PythonQtScriptingConsole is by avoiding the carriage return.. I mean, for instance, 'for i in myList: print(i);' to avoid the CR. Did I understand correctly?

       
      • Florian Link

        Florian Link - 2015-03-31

        In the MeVisLab PythonQt scripting console, we implemented auto multi line,
        by detecting if the previous line starts a block. If I find some time, I
        can merge some of those console features to the PythonQt console.

        On Tue, Mar 31, 2015 at 5:33 PM, gmas gmas@users.sf.net wrote:

        I see your point. So the way to go for loop-like statement using the
        official PythonQtScriptingConsole is by avoiding the carriage return.. I
        mean, for instance, 'for i in myList: print(i);' to avoid the CR. Did I
        understand correctly?


        Is src/gui/PythonQtScriptingConsole.h public API?


        Sent from sourceforge.net because you indicated interest in <
        https://sourceforge.net/p/pythonqt/discussion/631393/>

        To unsubscribe from further messages, please visit <
        https://sourceforge.net/auth/subscriptions/>

         

Log in to post a comment.