<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
            <div><br></div><div><br></div>
            
            <div id="ydp1779125dyahoo_quoted_7972192568" class="ydp1779125dyahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Tuesday, May 22, 2018, 9:34:41 PM EDT, Lex Trotman <elextr@gmail.com> wrote:
                    </div>
                    <div>pythonbuild.py  is in /home/joe</div><div><br></div><div><br></div>
                    <div><br></div>
                    <div><div dir="ltr">What directory is 'pythonbuild.py' located in and what was the working<br clear="none"><div>directory when you ran the CLI command?</div><div><br></div><div><font color="#440062"><span>has always been in <span><font color="#440062"><span>/home/joe</span></font></span>    I am running the CLI from there also </span></font><br></div><div><font color="#440062">the working directory is dev/Arduino/sample/sample.ino  which is relative</font></div><div><font color="#440062">to my ~ location. The abs path of the working directory would be <span><font color="#440062"><span><span><font color="#440062"><span>/home/joe</span></font></span><span><font color="#440062">/dev/Arduino/sample/sample.ino</font></span><br></span></font></span></font><br></div>If your command is 'python pythonbuild.py<br clear="none">dev/Arduino/sample/sample.ino' then it must be executed in the<br clear="none">directory that contains 'pythonbuild.py' since the path is given<br clear="none">relative to the working directory (and so is<br clear="none"><div>'dev/Arduino/sample/sample.ino' but we havn't gotten to it yet :).</div><div><br></div><div><font color="#440062">yes, that is true</font><br></div><br clear="none">Geany commands (by default) run with a working directory that is the<br clear="none">directory of the current file displayed in the edit area, you can<br clear="none">change this in the "working directory" column of the "set build<br clear="none">commands" dialog to make it a fixed location such as the directory<br clear="none"><div>where 'pythonbuild.py' lives.</div><div><br></div><div><font color="#440062">so your saying move pythonbuild to my working directory, correct ?</font></div><div><font color="#440062">Ok, I will try that. So maybe the problem is the there is no way for the working</font></div><div><font color="#440062">directory to get to reference the up stream directory ? as in its ok to drill down but</font></div><div><font color="#440062">not up ?? I will try try moving the *.py file to the working directory.</font><br></div><div><br></div><div>Yes, so the working directory is just use  %d%f so the whole thing in Geany</div><div>python home/joe/pythonbuild.py  %d/%f   <br></div><div><br></div><div><div>but I get<span> Invalid working directory "/home/joe/dev/Arduino/4X20OLED/4X20OLED.ino"</span></div><div><br></div><div><span><br></span></div><div><span></span><br></div> <br></div><br clear="none">Cheers<br clear="none">Lex<br clear="none"><br clear="none">On 23 May 2018 at 10:57, Joe McCarron via Users <<a shape="rect" href="mailto:users@lists.geany.org" rel="nofollow" target="_blank">users@lists.geany.org</a>> wrote:<br clear="none">> I tried that but I got "Invalid working directory" error.<br clear="none">> Without the %d/%f at least ran the python script but then errored<br clear="none">> since there wasn't a file to work on.<br clear="none">><br clear="none">> Thanks<br clear="none">><br clear="none">><br clear="none">> On Tuesday, May 22, 2018, 6:47:50 PM EDT, Lex Trotman <<a shape="rect" href="mailto:elextr@gmail.com" rel="nofollow" target="_blank">elextr@gmail.com</a>><br clear="none">> wrote:<br clear="none">><br clear="none">><br clear="none">> Or just simply make the Geany build command THE SAME as the command line.<br clear="none">><br clear="none">> On 23 May 2018 at 06:57, Joe McCarron via Users <<a shape="rect" href="mailto:users@lists.geany.org" rel="nofollow" target="_blank">users@lists.geany.org</a>><br clear="none">> wrote:<br clear="none">>> Thanks for your response Matthew. I think I will just run from the CLI.<br clear="none">>> I am still getting errors when running cmds via Geany.<br clear="none">>><br clear="none">>> I did change it to an executable but that didn't work. Linux did not<br clear="none">>> recognize it as a command<br clear="none">>> when launched using only the file name, even with the 'shebang' in the<br clear="none">>> script.<br clear="none">>><br clear="none">>> I tried your other idea about putting what works into the CLI into Geany<br clear="none">>> but<br clear="none">>> I still got "permission denied"<br clear="none">>> error. Although I am not getting anything done, I am learning alot. : )<br clear="none">>><br clear="none">>> Well now on to see if I can get syntax highlighting working along with<br clear="none">>> auto<br clear="none">>> complete. Wish me<br clear="none">>> luck. Thanks again.<br clear="none">>><br clear="none">>> Joe McCarron<br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>> On Tuesday, May 22, 2018, 3:25:36 PM EDT, Matthew Brush<br clear="none">>> <<a shape="rect" href="mailto:mbrush@codebrainz.ca" rel="nofollow" target="_blank">mbrush@codebrainz.ca</a>> wrote:<br clear="none">>><br clear="none">>><br clear="none">>> On 2018-05-22 08:22 AM, Joe McCarron via Users wrote:<br clear="none">>>> Hello folks,I am using Linux mint with Geany 1.27<br clear="none">>>><br clear="none">>>> I get this error when running a command from Build->Set Build<br clear="none">>>> Commands/tmp/geany_run_script_KH9HJZ.sh: 7:<br clear="none">>>> /tmp/geany_run_script_KH9HJZ.sh:<br clear="none">>>> /home/joe/pythonbuild.py: Permission denied<br clear="none">>>> when i run from the command line it works. Here is what I put on the<br clear="none">>>> command line.<span style="background-color: rgb(68, 0, 98);">python pythonbuild.py dev/Arduino/sample/sample.ino</span><br clear="none">>>><br clear="none">>>> The set Build Command in Geany is:  /home/joe/pythonbuild.py<br clear="none">>>> I get the erro above when this is exectuted from Geany<br clear="none">>>> It looks like Geany runs a script from the tmp directory to run my py<br clear="none">>>> script.<br clear="none">>>> I just switched from windows to linux so that could be part of my<br clear="none">>>> problem.<br clear="none">>>> thanksJoe<br clear="none">>>><br clear="none">>><br clear="none">>> Hi,<br clear="none">>><br clear="none">>> You probably have to mark the script executable and put a "shebang" in<br clear="none">>> it. Unlike Windows, Linux doesn't go by file extension, a script has to<br clear="none">>> be made executable (ex `chmod +x yourscript.py` or from your file<br clear="none">>> manager) and the first line tells which interpreter to use (ex.<br clear="none">>> `#!/usr/bin/env python`).<br clear="none">>><br clear="none">>> Alternatively, you could just change your build command in Geany to run<br clear="none">>> the script using Python like what you ran on the command line, so it<br clear="none">>> doesn't need to be executable or have a shebang line. Just put `python<br clear="none">>> /home/joe/pythonbuild.py` in the build command.<br clear="none">>><br clear="none">>> Regards,<br clear="none">>> Matthew Brush<br clear="none">>><br clear="none">>><br clear="none">>> _______________________________________________<br clear="none">>> Users mailing list<br clear="none">>> <a shape="rect" href="mailto:Users@lists.geany.org" rel="nofollow" target="_blank">Users@lists.geany.org</a><br clear="none">>> <a shape="rect" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><div class="ydp1779125dyqt0017435357" id="ydp1779125dyqtfd46392"><br clear="none">>><br clear="none">>> _______________________________________________<br clear="none">>> Users mailing list<br clear="none">>> <a shape="rect" href="mailto:Users@lists.geany.org" rel="nofollow" target="_blank">Users@lists.geany.org</a><br clear="none">>> <a shape="rect" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br clear="none">><br clear="none">>><br clear="none">> _______________________________________________<br clear="none">> Users mailing list<br clear="none">> <a shape="rect" href="mailto:Users@lists.geany.org" rel="nofollow" target="_blank">Users@lists.geany.org</a><br clear="none">> <a shape="rect" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> Users mailing list<br clear="none">> <a shape="rect" href="mailto:Users@lists.geany.org" rel="nofollow" target="_blank">Users@lists.geany.org</a><br clear="none">> <a shape="rect" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br clear="none">><br clear="none">_______________________________________________<br clear="none">Users mailing list<br clear="none"><a shape="rect" href="mailto:Users@lists.geany.org" rel="nofollow" target="_blank">Users@lists.geany.org</a><br clear="none"><a shape="rect" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" rel="nofollow" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br clear="none"></div></div></div>
                </div>
            </div></div></body></html>