[Tutor] Problem in open function
antonmuhin at rambler.ru
antonmuhin at rambler.ru" <antonmuhin@rambler.ru
Mon Mar 31 12:52:02 2003
Hello sudhir,
Monday, March 31, 2003, 8:11:23 PM, you wrote:
sc> Dear all,
sc> how i can use built in open() functions when i have
sc> imported os module which also have open() system call.
sc> the code allows me to use one only why?
sc> what i should do to to use os module fucntions as well
sc> builin open()function.
sc> regards,
sc> sudhir
sc> ________________________________________________________________________
sc> Missed your favourite TV serial last night? Try the new, Yahoo! TV.
sc> visit http://in.tv.yahoo.com
1. Use file instead (open even seems to be depricated now).
2. If you import with 'import os', then os.open should work, but it
seems that you imorted it with 'from os import open'. In this case you
migth want to save the old functiuon:
old_open = open
from os import open
old_open(...) # standard open
open(...) # os.open
--
Best regards,
anton mailto:antonmuhin@rambler.ru