tags:

views:

123

answers:

1

Suppose from index.py, i have post file #####.fasta to display file. I want to change ####.fasta file extension to ####.aln in display file. How can i do it?

I am working right now on python cgi.

Thanks for listening

+3  A: 

os.path.splitext(), os.rename()

Ignacio Vazquez-Abrams
Can you be more specific, i saw documentation before too but didn't work.
Use the first function to get the base. Combine it with the new extension and pass the old filename and the new filename to the second function.
Ignacio Vazquez-Abrams