Re: I/O Operations .....



In <1177924784.122690.233540@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, saif.shakeel
wrote:

File writing can be done in that way,but my query is
something different.I have to rename the output file by default with
input file name(only changing the extension.

Take a look at the functions in `os.path`.

Ciao,
Marc 'BlackJack' Rintsch
.



Relevant Pages

  • Re: read from file question
    ... file and rename the new file to have the name of the old file. ... That implies storing half the contents of the input file in memory, ... Allocating memory for this ... and output files and rename the output file. ...
    (comp.lang.c)
  • Re: I/O Operations .....
    ... output file name should be same as input file in the same path (the ... f.write(content1) ... input file name(only changing the extension. ...
    (comp.lang.python)
  • Re: error when using FileCopy
    ... > an output file, and then is supposed to replace the input file with the new ... So I tried using Rename to do that, ... > Rename didn't exist as a function, and so I tried FileCopy. ... FileCopy outName, inName ...
    (microsoft.public.vb.general.discussion)
  • Re: Does anyone know how to write VB?
    ... the VB program must rename the output file. ... But, rather than force VB to wait in a tight loop, I would suggest using a timer. ... Private Sub Timer1_Timer ...
    (microsoft.public.vb.general.discussion)
  • Re: variable argument in rename()
    ... The original program produces an output file called ... The code reads an input file containing a timestamp and I ... > working - I can only get rename to work if I use something like ... My first advice ...
    (comp.lang.fortran)