Re:



B and C are subdirectories of Parent Directory A.
I am executing a file in Directory C which is importing a file f' in directory
B.
Now while running python file m getting an error of can't open f'. If I copy f'
in
current directory B. then It is running. I want to get rid of that and run the
programme without copying the other f' files( even .txt also) in the current
directory. and I have so many files in directory B,otherwise I wou;ld have
wppended the path while opening the file. I don't want to do it for each file
and also If i need to change directory structure then also I should change one
path and able to run the Programme.


Quoting Tiago Stürmer Daitx <tdaitx@xxxxxxxxx>:

> Well, I still quite don't get what you want to do. I mean, you do need
> to be more specific. Maybe you can post part of your code or explain
> in details what you are trying to do. Anything that would help me
> understand what's going on.
>
> In the mean time, check these sites...
> The file section in the Tutorial (there's not much to see, but hey,
> who knows?):
> http://www.python.org/doc/current/tut/node9.html#SECTION009200000000000000000
>
> The online book DiveIntoPython
> http://diveintopython.org/file_handling/file_objects.html
>
> Or some common questions about files (maybe you can find the answer
> for your troubles - not all of them, of course) =)
> http://www.faqts.com/knowledge_base/index.phtml/fid/552
>
> Regards,
> Tiago S Daitx
>
> On 6/6/05, Jatinder Singh <jatinder@xxxxxxxxxxxxxxxxxxxx> wrote:
> > I am reading a only. But what if I want read write and execute that file.
> >
> > --
> > Regards,
> > Jatinder Singh
> >
> > " Everyone needs to be loved... especially when they do not deserve it."
> >
>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> > Quoting Tiago Stürmer Daitx <tdaitx@xxxxxxxxx>:
> >
> > > That depends on what "using" a file means. You could check the thread
> > > "executing a command" (
> > > http://mail.python.org/pipermail/python-list/2005-June/283963.html) and
> see
> > > if there's something related there, otherwise it would help if you could
> > > post what exactly you are trying to do (execute a file, open a file,
> write
> > > into a file, etc).
> > >
> > > Regards,
> > > Tiago S Daitx
> > >
> > > On 6/4/05, Jatinder Singh <jatinder@xxxxxxxxxxxxxxxxxxxx> wrote:
> > > >
> > > > Hi guys
> > > > I am working in a complex directory structure. I want to use a file
> (not
> > > > .py)
> > > > which is in some other directory. I couldn't do it.but if I copy the
> file
> > > > in
> > > > the same directory then it is working fine. Can anybody guide me how
> and
> > > > where
> > > > to add the path of the file. I have tried it with sys.path but it is
> not
> > > > for
> > > > that.
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Jatinder Singh
> > > >
> > > > " Everyone needs to be loved... especially when they do not deserve
> it."
> > > > --
> > > > http://mail.python.org/mailman/listinfo/python-list
> > > >
> > >
> >
> >
> >
> --
> http://mail.python.org/mailman/listinfo/python-list
>


--
Regards,
Jatinder Singh

? Everyone needs to be loved... especially when they do not deserve it.?
.



Relevant Pages

  • Re:
    ... Regards, ... But what if I want read write and execute that file. ... >> Tiago S Daitx ... >>> Jatinder Singh ...
    (comp.lang.python)
  • Re: [PHP] keyword search syntax
    ... > like a primitive search engine. ... > best regards ... FULLTEXT index and executing a MATCH... ...
    (php.general)
  • Re: SQL Server Unclosed Quotes Error Message
    ... Regards ... > I am accessing SQL Server 2000 through ADO using D5. ... >Executing certain stored procedures randomly generate exception with ... >Sometimes '' is replaced by junk chars. ...
    (borland.public.delphi.database.ado)
  • Re: Closing methods
    ... then your code executing after the select is odd? ... I have a funny problem when closing files from a macro outside the file ... I have in my Personal.xls a macro called Close_files. ...
    (microsoft.public.excel.programming)
  • Re: How to configure Log shipping on SQL server 2000 developer edi
    ... I am getting problem in executing the following commands. ... > I have now successfully configure Log shipping on developer edition. ... > getting some error on executing the stored procedure on the secondary server. ... > With regards, ...
    (microsoft.public.sqlserver.replication)