<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 3 February 2014 20:48, Sayth Renshaw <span dir="ltr"><<a href="mailto:flebber.crue@gmail.com" target="_blank">flebber.crue@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Thanks Enrico that does seem to work on the file I have <br>
<br>using bin/python "%f" and %p as my working directory.<br><br></div>I can't however get a working version of a /bin/sh -c %p/bin/activate; python %f style virtualenv command. I have tried many versions but just can't get it working. This one finds activate and the file but fails.<br>
</div></div></blockquote><div><br></div><div>Did you actually include the "/bin/sh -c" as part of the command?  Because, as I said before, the whole command is already prefixed by /bin/sh -c inside Geany.  So then when you included it in the command it ran the part before the semicolon in a subshell, so the activate just ran in the sub-shell, and the python ran in the top level shell which didn't know any of the activate settings</div>
<div><br></div><div>Just run:</div><div><br></div><div> ./bin/activate; python %f</div><div><br></div><div>with working dir %p</div><div><br></div><div>Cheers</div><div>Lex</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>
<br>/bin/sh -c /home/sayth/Projects/Test/bin/activate; python file1.py (in directory: /home/sayth/Projects/Test)<div class="im"><br>Traceback (most recent call last):<br>  File "file1.py", line 3, in <module><br>
    import django<br>
ImportError: No module named django<br>Compilation failed.<br><br></div></div><span class=""><font color="#888888">Sayth<br><div><br><br><div><div></div></div></div></font></span></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">On Sun, Feb 2, 2014 at 10:02 PM, Enrico Tröger <span dir="ltr"><<a href="mailto:enrico.troeger@uvena.de" target="_blank">enrico.troeger@uvena.de</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5"><div>On 02/02/14 01:12, Sayth Renshaw wrote:<br>

> OK using vanilla virtualenv(no wrapper) and with built in project from<br>
> geany I have ~/Projects/Test/bin/activate for virtualenv.<br>
><br>
> The project is open and so %p as working directory works perfectly, however<br>
> it returns error on source /bin/sh:1 :source "not found.<br>
><br>
> Updated the command to source bin/activate; python "%f" as thats the usual<br>
> command line activation. still same error.<br>
<br>
</div>I'm afraid I wasn't clear enough about what I meant:<br>
Instead of using the 'bin/activate' script at all, just use the Python<br>
interpreter in the virtualenv's bin directory as this should know the<br>
paths already.<br>
<br>
Something like this could be your build command:<br>
<br>
%p/env/bin/python "%f"<br>
<br>
(provided that your virtualenv is called 'env' in the project directory)<br>
<div><div><br>
Regards,<br>
Enrico<br>
<br>
--<br>
Get my GPG key from <a href="http://www.uvena.de/pub.asc" target="_blank">http://www.uvena.de/pub.asc</a><br>
<br>
</div></div><br></div></div><div class="im">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org" target="_blank">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>