Hi,
I have a question regarding the compilation or execution of python source files on Windows. I use Geany mostly for python scripting, drawing graphs etc (no GUI programming). However, since I work on WinXP 32bit with Python 2.6.2 and Geany 0.20, I found out that I get the desired behavior, i.e. printing console output to "Compiler" window at the bottom, if I set the COMPILE command to
python -u "%f"
Setting the same command to EXECUTE command opens a command prompt button, which I don't like.
However, this works for most of things but not doesn't work good when using matplotlib library. In this case for some reason the matplotlib window (if moved, resized) automatically closes after some time, i.e. after 10, 20 seconds or so, and "Compilation failed" is written in the output. Hence, this happens while python is running in the background.
The test code can look as simple as this:
from pylab import * figure() plot((1,2,3,4,5),(2,4,6,8,10)) show()
This code works without a problem in Scite or if use EXECUTE command (but as already mentioned in this case command prompt opens and all the output goes there).
Does anybody know what is the problem here or if anyone has the same problems.
Otherwise I really like Geany for python scripting because it's fast, not cumbersome and it has basically everything I need for my work.
Best regards, Rok
On 30 April 2011 20:19, Rock Star rockstar1707@gmail.com wrote:
Hi,
I have a question regarding the compilation or execution of python source files on Windows. I use Geany mostly for python scripting, drawing graphs etc (no GUI programming). However, since I work on WinXP 32bit with Python 2.6.2 and Geany 0.20, I found out that I get the desired behavior, i.e. printing console output to "Compiler" window at the bottom, if I set the COMPILE command to
python -u "%f"
Setting the same command to EXECUTE command opens a command prompt button, which I don't like.
Yes, adding an option to execute commands without a command prompt is on the list of things to do, but its far from the top.
However, this works for most of things but not doesn't work good when using matplotlib library. In this case for some reason the matplotlib window (if moved, resized) automatically closes after some time, i.e. after 10, 20 seconds or so, and "Compilation failed" is written in the output. Hence, this happens while python is running in the background.
Roughly speaking the Geany compile/make commands execute in a way the approximates Scite mode 0, ie no windows please we're compilers. This might be your problem, but I am not a Windows expert (or a Scite user).
Execute commands run via cmd.exe and approximate scite mode 1 (but with the cmd window).
Cheers Lex
Thanks for quick reply :)
So, if I understand correctly this is most probably the "problem" or better said desired behavior of COMPILE mode, which basically "doesn't allow" GUI windows to appear.
OK, just that I know. So I'll wait for this to be properly managed by EXECUTE command, i.e. without opening command prompt, which is how I would expect it to work anyway. For now I'll simply try to use both commands (EXECUTE and COMPILE) as appropriate for my workflow.
Best regards, Rok
On Sat, Apr 30, 2011 at 1:33 PM, Lex Trotman elextr@gmail.com wrote:
On 30 April 2011 20:19, Rock Star rockstar1707@gmail.com wrote:
Hi,
I have a question regarding the compilation or execution of python source files on Windows. I use Geany mostly for python scripting, drawing graphs etc (no GUI programming). However, since I work on WinXP 32bit with Python 2.6.2 and Geany 0.20, I found out that I get the desired behavior, i.e. printing console output to "Compiler" window at the bottom, if I set the COMPILE command to
python -u "%f"
Setting the same command to EXECUTE command opens a command prompt button, which I don't like.
Yes, adding an option to execute commands without a command prompt is on the list of things to do, but its far from the top.
However, this works for most of things but not doesn't work good when using matplotlib library. In this case for some reason the matplotlib window (if moved, resized) automatically closes after some time, i.e. after 10, 20 seconds or so, and "Compilation failed" is written in the output. Hence, this happens while python is running in the background.
Roughly speaking the Geany compile/make commands execute in a way the approximates Scite mode 0, ie no windows please we're compilers. This might be your problem, but I am not a Windows expert (or a Scite user).
Execute commands run via cmd.exe and approximate scite mode 1 (but with the cmd window).
Cheers Lex _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany