[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Argv in scripts vs argv in compiled code.
From: |
William Annis |
Subject: |
[Chicken-users] Argv in scripts vs argv in compiled code. |
Date: |
Wed, 21 Aug 2002 15:09:58 -0500 (CDT) |
If I write a tiny python script like this:
----------------------------------------
#!/s/bin/python2.2 -O
import sys
print sys.argv
----------------------------------------
And then run it, I get this:
----------------------------------------
wazor /u/annis/tmp/argv $ ./p1
['./p1']
----------------------------------------
This is what I expect from this sort of language. When I do the same
thing with chicken, I get conflicting behavior depending on whether
I'm running as a script or as a binary:
----------------------------------------
wazor /u/annis/tmp/argv $ cat c1.scm
#!/u/annis/local/bin/csi -script
(print (argv))
wazor /u/annis/tmp/argv $ ./c1.scm
(/u/annis/local/bin/csi -script ./c1.scm)
wazor /u/annis/tmp/argv $ csc c1.scm
wazor /u/annis/tmp/argv $ ./c1
(./c1)
----------------------------------------
Do other people consider this, if not a bug, then a misfeature? I
like the idea of being able to use chicken interpreted or compiled as
the mood suits, and I'd rather not have to do environment testing
every time I consult argv.
--
William Annis - System Administrator - Biomedical Computing Group
"When men are inhuman, take care not to feel towards them as they do
towards other humans." Marcus Aurelius VII.65
- [Chicken-users] Argv in scripts vs argv in compiled code.,
William Annis <=