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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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?
BTW, while implementing support for multi-line code, I found out that there actually /is/ support for it; you just have to end your lines with shift-enter.
It's not very usable, because indenting with tabs also invokes the auto-completer... :-)
ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround a code snippet with "~~~~"?
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.
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?
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
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.
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.
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.
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.
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:
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?
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 dropped a message for you with my email. Thank you!
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.
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?
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:
BTW, while implementing support for multi-line code, I found out that there actually /is/ support for it; you just have to end your lines with shift-enter.
It's not very usable, because indenting with tabs also invokes the auto-completer... :-)
Regards,
Sander