On Tuesday, May 22, 2018, 9:34:41 PM EDT, Lex Trotman <elextr@gmail.com> wrote:
pythonbuild.py  is in /home/joe



What directory is 'pythonbuild.py' located in and what was the working
directory when you ran the CLI command?

has always been in /home/joe    I am running the CLI from there also
the working directory is dev/Arduino/sample/sample.ino  which is relative
to my ~ location. The abs path of the working directory would be /home/joe/dev/Arduino/sample/sample.ino

If your command is 'python pythonbuild.py
dev/Arduino/sample/sample.ino' then it must be executed in the
directory that contains 'pythonbuild.py' since the path is given
relative to the working directory (and so is
'dev/Arduino/sample/sample.ino' but we havn't gotten to it yet :).

yes, that is true

Geany commands (by default) run with a working directory that is the
directory of the current file displayed in the edit area, you can
change this in the "working directory" column of the "set build
commands" dialog to make it a fixed location such as the directory
where 'pythonbuild.py' lives.

so your saying move pythonbuild to my working directory, correct ?
Ok, I will try that. So maybe the problem is the there is no way for the working
directory to get to reference the up stream directory ? as in its ok to drill down but
not up ?? I will try try moving the *.py file to the working directory.

Yes, so the working directory is just use  %d%f so the whole thing in Geany
python home/joe/pythonbuild.py  %d/%f  

but I get Invalid working directory "/home/joe/dev/Arduino/4X20OLED/4X20OLED.ino"





Cheers
Lex

On 23 May 2018 at 10:57, Joe McCarron via Users <users@lists.geany.org> wrote:
> I tried that but I got "Invalid working directory" error.
> Without the %d/%f at least ran the python script but then errored
> since there wasn't a file to work on.
>
> Thanks
>
>
> On Tuesday, May 22, 2018, 6:47:50 PM EDT, Lex Trotman <elextr@gmail.com>
> wrote:
>
>
> Or just simply make the Geany build command THE SAME as the command line.
>
> On 23 May 2018 at 06:57, Joe McCarron via Users <users@lists.geany.org>
> wrote:
>> Thanks for your response Matthew. I think I will just run from the CLI.
>> I am still getting errors when running cmds via Geany.
>>
>> I did change it to an executable but that didn't work. Linux did not
>> recognize it as a command
>> when launched using only the file name, even with the 'shebang' in the
>> script.
>>
>> I tried your other idea about putting what works into the CLI into Geany
>> but
>> I still got "permission denied"
>> error. Although I am not getting anything done, I am learning alot. : )
>>
>> Well now on to see if I can get syntax highlighting working along with
>> auto
>> complete. Wish me
>> luck. Thanks again.
>>
>> Joe McCarron
>>
>>
>>
>>
>> On Tuesday, May 22, 2018, 3:25:36 PM EDT, Matthew Brush
>> <mbrush@codebrainz.ca> wrote:
>>
>>
>> On 2018-05-22 08:22 AM, Joe McCarron via Users wrote:
>>> Hello folks,I am using Linux mint with Geany 1.27
>>>
>>> I get this error when running a command from Build->Set Build
>>> Commands/tmp/geany_run_script_KH9HJZ.sh: 7:
>>> /tmp/geany_run_script_KH9HJZ.sh:
>>> /home/joe/pythonbuild.py: Permission denied
>>> when i run from the command line it works. Here is what I put on the
>>> command line.python pythonbuild.py dev/Arduino/sample/sample.ino
>>>
>>> The set Build Command in Geany is:  /home/joe/pythonbuild.py
>>> I get the erro above when this is exectuted from Geany
>>> It looks like Geany runs a script from the tmp directory to run my py
>>> script.
>>> I just switched from windows to linux so that could be part of my
>>> problem.
>>> thanksJoe
>>>
>>
>> Hi,
>>
>> You probably have to mark the script executable and put a "shebang" in
>> it. Unlike Windows, Linux doesn't go by file extension, a script has to
>> be made executable (ex `chmod +x yourscript.py` or from your file
>> manager) and the first line tells which interpreter to use (ex.
>> `#!/usr/bin/env python`).
>>
>> Alternatively, you could just change your build command in Geany to run
>> the script using Python like what you ran on the command line, so it
>> doesn't need to be executable or have a shebang line. Just put `python
>> /home/joe/pythonbuild.py` in the build command.
>>
>> Regards,
>> Matthew Brush
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users@lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users

>>
>> _______________________________________________
>> Users mailing list
>> Users@lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
>>
> _______________________________________________
> Users mailing list
> Users@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
_______________________________________________
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users