File Object attribute

6 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€42.77
List Price:  €59.88
You save:  €17.11
£37.08
List Price:  £51.91
You save:  £14.83
CA$68.96
List Price:  CA$96.55
You save:  CA$27.59
A$76.38
List Price:  A$106.94
You save:  A$30.56
S$64.32
List Price:  S$90.06
You save:  S$25.73
HK$390.06
List Price:  HK$546.11
You save:  HK$156.05
CHF 40.14
List Price:  CHF 56.21
You save:  CHF 16.06
NOK kr502.12
List Price:  NOK kr703
You save:  NOK kr200.88
DKK kr319.28
List Price:  DKK kr447.02
You save:  DKK kr127.73
NZ$85.06
List Price:  NZ$119.09
You save:  NZ$34.03
د.إ183.58
List Price:  د.إ257.03
You save:  د.إ73.45
৳6,085.49
List Price:  ৳8,520.17
You save:  ৳2,434.68
₹4,412.09
List Price:  ₹6,177.29
You save:  ₹1,765.19
RM211.14
List Price:  RM295.62
You save:  RM84.47
₦76,406.71
List Price:  ₦106,975.51
You save:  ₦30,568.80
₨14,191.25
List Price:  ₨19,868.89
You save:  ₨5,677.63
฿1,609.32
List Price:  ฿2,253.18
You save:  ฿643.86
₺2,062.31
List Price:  ₺2,887.40
You save:  ₺825.09
B$272.33
List Price:  B$381.29
You save:  B$108.95
R884.13
List Price:  R1,237.85
You save:  R353.72
Лв83.73
List Price:  Лв117.23
You save:  Лв33.50
₩69,495.77
List Price:  ₩97,299.65
You save:  ₩27,803.87
₪166.96
List Price:  ₪233.76
You save:  ₪66.79
₱2,844.65
List Price:  ₱3,982.74
You save:  ₱1,138.09
¥7,407.23
List Price:  ¥10,370.72
You save:  ¥2,963.48
MX$933.65
List Price:  MX$1,307.18
You save:  MX$373.53
QR182
List Price:  QR254.81
You save:  QR72.81
P719.51
List Price:  P1,007.37
You save:  P287.86
KSh6,458.70
List Price:  KSh9,042.70
You save:  KSh2,584
E£2,427.02
List Price:  E£3,398.02
You save:  E£971
ብር7,152.60
List Price:  ብር10,014.21
You save:  ብር2,861.61
Kz45,588.63
List Price:  Kz63,827.73
You save:  Kz18,239.10
CLP$48,602.27
List Price:  CLP$68,047.07
You save:  CLP$19,444.80
CN¥356.46
List Price:  CN¥499.08
You save:  CN¥142.61
RD$3,169.86
List Price:  RD$4,438.06
You save:  RD$1,268.20
DA6,491.87
List Price:  DA9,089.14
You save:  DA2,597.26
FJ$112.79
List Price:  FJ$157.92
You save:  FJ$45.12
Q383.64
List Price:  Q537.12
You save:  Q153.48
GY$10,460.92
List Price:  GY$14,646.12
You save:  GY$4,185.20
ISK kr6,124.77
List Price:  ISK kr8,575.17
You save:  ISK kr2,450.40
DH453.73
List Price:  DH635.26
You save:  DH181.53
L838.09
List Price:  L1,173.39
You save:  L335.30
ден2,640.43
List Price:  ден3,696.82
You save:  ден1,056.38
MOP$401.73
List Price:  MOP$562.45
You save:  MOP$160.72
N$886.82
List Price:  N$1,241.62
You save:  N$354.80
C$1,839.97
List Price:  C$2,576.11
You save:  C$736.13
रु7,047.30
List Price:  रु9,866.78
You save:  रु2,819.48
S/176.08
List Price:  S/246.53
You save:  S/70.45
K211.88
List Price:  K296.66
You save:  K84.77
SAR187.57
List Price:  SAR262.61
You save:  SAR75.04
ZK1,189.89
List Price:  ZK1,665.94
You save:  ZK476.05
L217.24
List Price:  L304.15
You save:  L86.91
Kč1,045.04
List Price:  Kč1,463.14
You save:  Kč418.09
Ft16,806.50
List Price:  Ft23,530.45
You save:  Ft6,723.94
SEK kr470.42
List Price:  SEK kr658.63
You save:  SEK kr188.20
ARS$68,111.66
List Price:  ARS$95,361.78
You save:  ARS$27,250.11
Bs345.64
List Price:  Bs483.93
You save:  Bs138.28
COP$199,687.37
List Price:  COP$279,578.30
You save:  COP$79,890.92
₡25,278.20
List Price:  ₡35,391.50
You save:  ₡10,113.30
L1,310.03
List Price:  L1,834.15
You save:  L524.12
₲360,426.55
List Price:  ₲504,626.01
You save:  ₲144,199.46
$U2,003.11
List Price:  $U2,804.51
You save:  $U801.40
zł181.94
List Price:  zł254.73
You save:  zł72.79
Already have an account? Log In

Transcript

Hi, and welcome to this Python tutorials. In this video, I will go I will discuss about file object attributes. These are some file object attributes like file dot closed file dot mod file dot name, file dot source face, to most file attributes also their encoding and new lines. Let's start with file dot closed. It returns a Boolean indicating the current state of the file object. It returns true if the file is closed and false.

When the file is open. And file dot mode. It is the idle mode for the file. If the file was created using the open building function, this will be the value of the mode parameter, file dot name. The file object was created using open the name of the file then file dot source space, it is a Boolean that indicates whether a space character needs to be printed before another value when using the print statement and filed or encoding. The encoding that is used.

In file we use when Unicode strings are returned to a file they will be converted to byte strings using this encoding then new lines of file object debt has been opening universal new line mode have these attributes which reflect the new line convention used in the files. The value of this attributes can be slash our carriage return slash and new line and etc none also with their aura tupple containing all the Nuland steps that seem so late Perform. Open your button ID idle. Mention the file name and the mode with which we are using. I'm using append mode here. No print by name c file dot name, App Lock.

Now let's look for other attributes encoding and then mod and Last new line and coding mode closed new lines see file name, app log encoding used in this file cp 1252 this is for window and for Linux UTF eight will be there file mode append plus which I used here, file closed false because files open I am not close this file, file new line none. Suppose, here I perform close operation now run the script in this way I completed file object attributes. So, till now happy coding, keep learning Learning and keep moving

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.