[Geany-Users] GUI Program Development in Geany

Keith Brown keith at xxxxx
Tue Sep 26 11:13:22 UTC 2017


Thanks Lex. You're right - using the VTE with the bash %c workaround 
nicely pops up either a terminal window or a GUI window, and messages 
from the GUI window go to the terminal tab. It's even cleaner if "Don't 
use run script" is selected (now if I could only bind a key to the 
second Execute command...). I guess I got away from using the VTE 
because it isn't supported on Windows (thinking about training courses 
again...although the rest of this workaround might not be translatable 
to Windows either), and from what I can see, it's still not supported 
(pcmiiw).

The more general solution would be built-in support. Clearly Geany 
already sends standard output to the Compile tab for commands in the 
language-specific and Independent command sections. There would only 
need to be a way to specify that a command in the Execute section 
(checkbox?) shouldn't use the terminal setting in Tools, but should 
rather be run directly like commands in the other sections, with 
standard output going to the Messages tab. Hmmm....

Thanks again.

Keith

On 26/09/17 11:09, Lex Trotman wrote:
> On 26 September 2017 at 18:56, Keith Brown <keith at geoffreybrown.com> wrote:
>> Hi everyone,
>>
>> I'm using Geany on Ubuntu 14.04/16.04, mostly for console/terminal program
>> dev in Python. I've always found Geany to be a great piece of software.
>>
>> I've started doing GUI program dev in Python with TKinter, PyQT, etc. and
>> find the fact that Geany always runs commands in the Execute-commands
>> section via the Terminal tool path (i.e. opening a terminal window) to be a
>> little annoying. Is there any "official" way around this?
> You can set a preference to have execute commands run in the VTE window instead.
>
>> I've tried the workaround of putting the typical Python command (e.g.
>> python3 "%f") in the Python-commands or Independent-commands sections of Set
>> Build Commands (calling it e.g. "Execute Graphical") in order to avoid the
>> terminal window - this works but the busy indicator runs and messages go to
>> the Compiler tab.
> When the command is run in the VTE the output goes there.
>
>> I've also tried the workaround of changing the Terminal tool path to bash c%
>> and setting up two commands in the Execute-commands section of Set Build
>> Commands:
>>
>> Execute => gnome-terminal -x bash -c 'python3 "%f"; echo -e "\n"; read -p
>> "Press Enter to continue..."'
>> Execute Graphical => python3 "%f"
>>
>> but messages from commands in the Execute-commands section are not displayed
>> on a tab (Geany expects a terminal window to be open). Is there any
>> workaround for this?
> Nope, Geany just runs whatever commands you tell it, it doesn't even
> know about the terminal window.
>
>> This seems like a lot of gymnastics. Or am I completely missing something?
>> Wouldn't it make sense to have two different Execute commands in Geany, one
>> that uses a terminal and one that doesn't, with messages from the second
>> command going to a tab like they do with compile commands?
> No current contributor has felt the need that badly. There is a
> surprising amount of work required to do that, so someone would have
> to contribute it.
>
>> Part of my motivation comes from wishing to use Geany more in the training
>> courses that I deliver, and making it easier for the participants to
>> configure Geany for Python/Perl/PHP.
>>
>> Thanks for any help!
>>
>> Keith
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list