Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
testing an open file
#4
i was wanting how it was opened, not what permissions the file allows me to open. it might be open to a non-file object like:
Output:
lt1a/forums/3 /home/forums 4> python3.8 Python 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.stdin.mode,sys.stderr.mode,sys.stdout.mode ('r', 'w', 'w') >>> lt1a/forums/3 /home/forums 5>
what cases where it may not have a mode attribute?
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
testing an open file - by Skaperen - Dec-17-2022, 02:06 AM
RE: testing an open file - by Larz60+ - Dec-17-2022, 03:26 AM
RE: testing an open file - by Gribouillis - Dec-17-2022, 07:02 AM
RE: testing an open file - by Skaperen - Dec-17-2022, 06:47 PM
RE: testing an open file - by Gribouillis - Dec-17-2022, 09:00 PM
RE: testing an open file - by Skaperen - Dec-19-2022, 03:17 AM
RE: testing an open file - by Gribouillis - Dec-19-2022, 07:37 AM
RE: testing an open file - by Skaperen - Dec-20-2022, 02:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Open/save file on Android frohr 0 415 Jan-24-2024, 06:28 PM
Last Post: frohr
  file open "file not found error" shanoger 8 1,412 Dec-14-2023, 08:03 AM
Last Post: shanoger
  How can i combine these two functions so i only open the file once? cubangt 4 981 Aug-14-2023, 05:04 PM
Last Post: snippsat
  I cannot able open a file in python ? ted 5 3,825 Feb-11-2023, 02:38 AM
Last Post: ted
  I get an FileNotFouerror while try to open(file,"rt"). My goal is to replace str decoded 1 1,470 May-06-2022, 01:44 PM
Last Post: Larz60+
  Dynamic File Name to a shared folder with open command in python sjcsvatt 9 6,394 Jan-07-2022, 04:55 PM
Last Post: bowlofred
  Open an excel file Newbie1114 1 2,398 Jun-16-2021, 09:11 PM
Last Post: Gribouillis
  How to open MIDI-file and get events in a list? philipbergwerf 7 5,190 May-29-2021, 08:24 AM
Last Post: j.crater
  Error on open of file created with tempfile.TemporaryDirectory() Brian177 4 6,526 Apr-05-2021, 07:12 PM
Last Post: Brian177
  I can't open a python file :( Oshadha 2 3,070 Mar-28-2021, 11:00 PM
Last Post: pythonprogrammer1101935

Forum Jump:

User Panel Messages

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