In message <[EMAIL PROTECTED]>, Steve
Holden wrote:
> Python runs as a sub-process. The parent process (the one that started
> Python) contains the working directory that the Python interpreter
> inherited from it. But you can't expect to just go poking around inside
> the environment of your pare
En Thu, 06 Sep 2007 15:47:02 -0300, rave247 rave247 <[EMAIL PROTECTED]>
escribi�:
> If I could use os.getcwd() or save the value to some variable before
> calling os.chdir() I would do it, believe me. However I can't because it
> is the part of code where I can't do any changes.
>
> Also I d
Please don't top-post. Instead, trim the parts you're not replying to
(preserving the attribution line so we can see who wrote what), and
put your reply beneath those, so your message reads in normal
chronological order.
rave247 rave247 <[EMAIL PROTECTED]> writes:
> If I could use os.getcwd() or
Yes, I think you are right, without hacking into the parent process it will not
work, and this is bad way. I hope I find the better way. Thanks for your
comments
> Původní zpráva
> Od: Steve Holden <[EMAIL PROTECTED]>
> Předmět: Re: Getting original wo
rave247 rave247 wrote:
> If I could use os.getcwd() or save the value to some variable before calling
> os.chdir()
> I would do it, believe me. However I can't because it is the part of
code where I
> can't do any changes.
>
> Also I do not agree that such thing is not possible because after p
n't do it
any other way.
Gary Herron
> Thanks
>
>
>
>> Původní zpráva
>> Od: Gabriel Genellina <[EMAIL PROTECTED]>
>> Předmět: Re: Getting original working directory
>> Datum: 06.9.2007 17:35:51
>>
On 9/6/07, rave247 rave247 <[EMAIL PROTECTED]> wrote:
>
> If I could use os.getcwd() or save the value to some variable before
> calling os.chdir() I would do it, believe me. However I can't because it
> is the part of code where I can't do any changes.
Why is it not possible. If nothing else cre
> One of the best portable ones that I've seen used is this:
>
> os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]),'.'))
This is not working. Please look at this code:
import os
import sys
x = os.getcwd()
os.chdir("\whatever")
y = #here I don't know. This code is not working:
os.pat
it. Simply
after calling os.chdir() the original value doen't disappear, I think it just
needs some nice hack if python doesn't provide a way how to get it.
> Původní zpráva
> Od: Ian Clark <[EMAIL PROTECTED]>
> Předmět: Re: Getting original working
rave247 rave247 wrote:
> "..the *original* directory location *after* os.chdir() is
> performed.." os.getcwd() is not helping much as it returns the location
> that was set up in os.chdir() call
>
> Thanks
Your question is akin to having a name X that is bound to some value,
setting it
On Sep 6, 10:19 am, rave247 rave247 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I' am unable to solve this problem. I've got python program, it is installed
> in standard location. I run this program from some location X (note that I
> just type relative "myscript", leaving operating system to look up s
> Předmět: Re: Getting original working directory
> Datum: 06.9.2007 17:35:51
>
> On 6 sep, 12:19, rave247 rave247 <[EMAIL PROTECTED]> wrote:
>
> > I' am unable to solve this problem. I've got python program, it is ins
rave247 rave247 wrote:
> Hi,
>
> I' am unable to solve this problem. I've got python program, it is installed
> in standard location. I run this program from some location X (note that I
> just type relative "myscript", leaving operating system to look up script
> itself using PATH variable) and
On 6 sep, 12:19, rave247 rave247 <[EMAIL PROTECTED]> wrote:
> I' am unable to solve this problem. I've got python program, it is installed
> in standard location. I run this program from some location X (note that I
> just type relative "myscript", leaving operating system to look up script
> i
Hi,
I' am unable to solve this problem. I've got python program, it is installed in
standard location. I run this program from some location X (note that I just
type relative "myscript", leaving operating system to look up script itself
using PATH variable) and this program somewhere in the cod
15 matches
Mail list logo