have all of you forgotten that the current directory isn't in the path
either? to excecute a script in the current directory at the command line,
you type at the '$'
$ ./MyScript
else you do
$python MyScript
but then you wouldn't need the 'shebang' line '#!/bin/env python' or
'#!/usr/bin/python
On
Thank you! This solved it for me.
I knew it had to be something as ridiculously n00bish as keeping
"python" in the script call.
On 07/08/2008, at 9:58 PM, Mike Covill wrote:
You should be able to execute your script by typing just your script
name from anywhere, leave out "python":
Admin
On Thu, Aug 7, 2008 at 9:48 AM, Chris Barker <[EMAIL PROTECTED]> wrote:
> Timothy Grant wrote:
>
>> While command lines can be made to lie, it concerns me that it looks
>> like you're using and Administrator account to do all this work.
>> Administrators have far to much power and can do far too mu
Timothy Grant wrote:
While command lines can be made to lie, it concerns me that it looks
like you're using and Administrator account to do all this work.
Administrators have far to much power and can do far too much damage
far too quickly.
very true. However, OS-X be default does not allow an
On Thu, Aug 7, 2008 at 6:58 AM, Mike Covill <[EMAIL PROTECTED]> wrote:
>
> On 7-Aug-08, at 9:45 AM, Mike Covill wrote:
>
>> On 7-Aug-08, at 9:34 AM, Pascal Bompard wrote:
>>
>>> Returning to this 3 week old chestnut, (apologies for delay - my second
>>> child was born in the interim), and thanks to
On 7-Aug-08, at 9:45 AM, Mike Covill wrote:
On 7-Aug-08, at 9:34 AM, Pascal Bompard wrote:
Returning to this 3 week old chestnut, (apologies for delay - my
second child was born in the interim), and thanks to all who
attempted to help, but I am still struggling with this issue.
Christop
On 7-Aug-08, at 9:34 AM, Pascal Bompard wrote:
Returning to this 3 week old chestnut, (apologies for delay - my
second child was born in the interim), and thanks to all who
attempted to help, but I am still struggling with this issue.
Christopher Barker wrote:
If you have scripts you want
Returning to this 3 week old chestnut, (apologies for delay - my
second child was born in the interim), and thanks to all who attempted
to help, but I am still struggling with this issue.
Christopher Barker wrote:
If you have scripts you want to run from anywhere, make them
executable:
T
Pascal Bompard wrote:
I suppose the next best strategy should be to look into using a terminal
shortcut to at least make the "cd" to the directory a bit less painful.
If you drag and drop a folder from the Finder to the terminal, its path
will get pasted in.
I also really like the "Open Term
Pascal Bompard wrote:
The fix I have working for this now is to use a symbolic link to the
directory where I keep my scripts.
If you make the first line of
/Users/pascal/Documents/Python/Dev/myapps/test.py read like so:
#!/usr/bin/env python
and if your path contains /Users/pascal/Documents/
The fix I have working for this now is to use a symbolic link to the
directory where I keep my scripts.
Not quite as clean as just using the script name, but certainly better
than typing out a long direct path.
I see what you are saying. It didn't occur to me that Python would
not use an
I see what you are saying. It didn't occur to me that Python would not
use any of those variables, not even $PYTHONPATH. Thank you for
pointing that out.
I suppose the next best strategy should be to look into using a
terminal shortcut to at least make the "cd" to the directory a bit
less
Pascal Bompard wrote:
Yes, I am aware that I could do that. I chose to only demonstrate the
full path method rather than both ways to access the file in my example.
The problem remains though, that every time I want to run a script in
that directory, I'd have to type out the entire path, which
Yes, I am aware that I could do that. I chose to only demonstrate the
full path method rather than both ways to access the file in my example.
The problem remains though, that every time I want to run a script in
that directory, I'd have to type out the entire path, which is not
ideal.
Su
Pascal Bompard wrote:
I will include some terminal output below to help with diagnostics:
Successful attempt:
pascal$ python /Users/pascal/Documents/Python/Dev/myapps/test.py
Unsuccessful attempt:
pascal$ python
The problem I am experiencing is that I can run a Python script
successfully if I use the full path to the script, but I can't run it
otherwise.
I have checked and set my $PATH as well as $PYTHONPATH to be correct.
Also, the sys.path has a correct reference. I have also confirmed that
per
16 matches
Mail list logo