<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="ydp732fd81fyahoo_quoted_7684077193" class="ydp732fd81fyahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Tuesday, May 22, 2018, 11:34:17 PM EDT, Lex Trotman <elextr@gmail.com> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div dir="ltr">On 23 May 2018 at 12:54, 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">><br clear="none">><br clear="none">><br clear="none">> On Tuesday, May 22, 2018, 10:44:45 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">> Lets go back to absolute basics, which file are you editing with<br clear="none">> Geany? the pythonbuild.py file or the .ino file? Is the pythonbuild.py<br clear="none">> file a tool you are trying to run that processes the .ino file?<br clear="none">> Yes,<br clear="none">> The pythonbuild.py file is the tool. The file i am working on in Geany is<br clear="none">> the *.ino file.<br clear="none">> So, the working dir is based on the *.ino file as that is opened in Geany<br clear="none">> and the py<br clear="none">> file is not.<br clear="none">><br clear="none"><br clear="none">Ok, that removes some confusion.<br clear="none"><br clear="none">So the command is `python /home/joe/pythonbuild.py %f`  and nothing in<br clear="none">the working directory column of the 'Set Build Commands' dialog.<br clear="none"><div><br></div><div><font color="#440062">The file i have open sets the %d & %f (directory and  file) which is used as the working <br></font></div><div><font color="#440062">directory part. I moved the pythonbuild.py to the working directory exactly</font></div><div><font color="#440062">where the file is and I still got the invalid working directory error.</font></div><div><font color="#440062">but like you said it doenst matter as long as it finds the py file.</font><br></div><div><br></div>What that does is it makes the tool part (the `python<br clear="none">/home/joe/pythonbuild.py` part) absolute, so it doesn't depend on<br clear="none">where it is run, and Geany will substitute the %f with the currently<br clear="none">open filename and run the command in that file's directory.<br clear="none"><br clear="none">Thats the normal way Geany is intended to be set up, commands are<br clear="none">absolute (or found by PATH as python is) and the command is run local<br clear="none">to the file you are editing.  Since Geany will save the current file<br clear="none"><div>when you invoke a build command that makes it all "just work" :)</div><div><br></div><div><font color="#440062">Yes, I now know how Geany works as I have been fighting this for a whole</font></div><div><font color="#440062">day. I don't know what it doesnt like. I may just do another installation of it.</font></div><div><font color="#440062"><br></font></div><div><font color="#440062">I have another issue trying to create filetypes for *.ino files (arduino) but that</font></div><div><font color="#440062">doesnt seem to work. I have been ALL OVER the manual and I dont know <br></font></div><div><font color="#440062">what I am doing wrong.  <br></font></div><div><font color="#440062"><br></font></div><div><font color="#440062">I will start another topic though and not include it in this.</font></div><div><font color="#440062"><br></font></div><div><font color="#440062">Thanks for your help. I had just installed linux and got rid of windows so thats <br></font></div><div><font color="#440062">another hurdle I am working with. Way different than Windows. Windows is like a <br></font></div><div><font color="#440062">personnal computer linux is like working at a terminal and there's a main frame <br></font></div><div><font color="#440062">somewhere on campus ; )<br></font></div><div><font color="#440062"><br></font></div><br clear="none">Cheers<br clear="none">Lex<br clear="none"><br clear="none">> Cheers<br clear="none">> Lex<br clear="none">><br clear="none">> On 23 May 2018 at 12:01, 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">>><br clear="none">>><br clear="none">>> On Tuesday, May 22, 2018, 9:34:41 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">>> pythonbuild.py  is in /home/joe<br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>> What directory is 'pythonbuild.py' located in and what was the working<br clear="none">>> directory when you ran the CLI command?<br clear="none">>><br clear="none">>> has always been in /home/joe    I am running the CLI from there also<br clear="none">>> the working directory is dev/Arduino/sample/sample.ino  which is relative<br clear="none">>> to my ~ location. The abs path of the working directory would be<br clear="none">>> /home/joe/dev/Arduino/sample/sample.ino<br clear="none">>><br clear="none">>> 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">>> 'dev/Arduino/sample/sample.ino' but we havn't gotten to it yet :).<br clear="none">>><br clear="none">>> yes, that is true<br clear="none">>><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">>> where 'pythonbuild.py' lives.<br clear="none">>><br clear="none">>> so your saying move pythonbuild to my working directory, correct ?<br clear="none">>> Ok, I will try that. So maybe the problem is the there is no way for the<br clear="none">>> working<br clear="none">>> directory to get to reference the up stream directory ? as in its ok to<br clear="none">>> drill down but<br clear="none">>> not up ?? I will try try moving the *.py file to the working directory.<br clear="none">>><br clear="none">>> Yes, so the working directory is just use  %d%f so the whole thing in<br clear="none">>> Geany<br clear="none">>> python home/joe/pythonbuild.py  %d/%f<br clear="none">>><br clear="none">>> but I get Invalid working directory<br clear="none">>> "/home/joe/dev/Arduino/4X20OLED/4X20OLED.ino"<br clear="none">>><br clear="none">>><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><div class="ydp732fd81fyqt1606429400" id="ydp732fd81fyqtfd59998"><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>