Grant Edwards <[EMAIL PROTECTED]> writes:
> On 2005-05-11, jeff elkins <[EMAIL PROTECTED]> wrote:
>
>> I'm totally new to Python (obvious,yes?) so how might argv[0] fail?
>
> argv[0] contains whatever is put there by the program that
> exec'ed you, and can therefore contain just about anything (or
On 2005-05-11, jeff elkins <[EMAIL PROTECTED]> wrote:
> I'm totally new to Python (obvious,yes?) so how might argv[0] fail?
argv[0] contains whatever is put there by the program that
exec'ed you, and can therefore contain just about anything (or
nothing). It may not contain a full path, and your
[Mike Meyer]
[... snip discussions of where to put config files ...]
| Yes, but Windows these days supports multiple users. Are you sure that
| you want to restrict your users to one configuration file per
| installed version of the program?
|
| I'm not sure Windows has a good solution to this p
On Thursday 12 May 2005 05:24 am, Mike Meyer wrote:
> jeff elkins <[EMAIL PROTECTED]> writes:
> > On Wednesday 11 May 2005 04:44 pm, Grant Edwards wrote:
> >> On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >> > The following script demonstrates a method that should work for you. I
>
jeff elkins <[EMAIL PROTECTED]> writes:
> On Wednesday 11 May 2005 04:44 pm, Grant Edwards wrote:
>> On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> > The following script demonstrates a method that should work for you. I
>> > believe it is entirely cross-platform.
>> >
>> > #! /usr
On Wednesday 11 May 2005 10:18 pm, Robert Kern wrote:
> jeff elkins wrote:
> > On Wednesday 11 May 2005 04:44 pm, Grant Edwards wrote:
> >>On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >>>The following script demonstrates a method that should work for you. I
> >>>believe it is entir
jeff elkins wrote:
> On Wednesday 11 May 2005 04:44 pm, Grant Edwards wrote:
>
>>On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>>>The following script demonstrates a method that should work for you. I
>>>believe it is entirely cross-platform.
>>>
>>>#! /usr/bin/python
>>>
>>>impor
On Wednesday 11 May 2005 04:44 pm, Grant Edwards wrote:
> On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > The following script demonstrates a method that should work for you. I
> > believe it is entirely cross-platform.
> >
> > #! /usr/bin/python
> >
> > import sys
> > import os
> >
On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The following script demonstrates a method that should work for you. I
> believe it is entirely cross-platform.
>
> #! /usr/bin/python
>
> import sys
> import os
>
> print os.path.abspath(os.path.dirname(sys.argv[0]))
That will probably
On 2005-05-11, jeff elkins <[EMAIL PROTECTED]> wrote:
> I'm creating an app that relies on a configuration file at
> launch. The file will always exist in the app's installation
> directory,
That's the first decision you need to examine. If you want
work on Unix platforms, that's not where confi
On Wednesday 11 May 2005 04:32 pm, [EMAIL PROTECTED] wrote:
> The following script demonstrates a method that should work for you. I
> believe it is entirely cross-platform.
>
> #! /usr/bin/python
>
> import sys
> import os
>
> print os.path.abspath(os.path.dirname(sys.argv[0]))
Works perfectly, t
The following script demonstrates a method that should work for you. I
believe it is entirely cross-platform.
#! /usr/bin/python
import sys
import os
print os.path.abspath(os.path.dirname(sys.argv[0]))
--
http://mail.python.org/mailman/listinfo/python-list
12 matches
Mail list logo