Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
with os.open?
#1
i have many cases where i need to call os.open, do something with that file descriptor, then close it. is there a way to do that using a with statement? what about using with with an object of my own creation? is there a specific method to implement?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
with os.open? - by Skaperen - May-28-2019, 10:04 PM
RE: with os.open? - by heiner55 - May-29-2019, 03:12 AM
RE: with os.open? - by Gribouillis - May-29-2019, 07:22 AM
RE: with os.open? - by heiner55 - May-30-2019, 07:33 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020