0% found this document useful (0 votes)
19 views5 pages

File Handling Notes

Computer science file handling topic notes

Uploaded by

abacabacabac13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

File Handling Notes

Computer science file handling topic notes

Uploaded by

abacabacabac13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Camlin Page

tILe HANDLING Date

Ho a proaram idorks ?

Covso A puf Cowsott Output


Lroarm
Fi Output|

,A Prla is a Scpusnck of loytes ondiskpamnolnt_fan0gL


C goup 0 ulated o t a is fored

ile fiandlinq inython enaleosCd o CreaBe dpdate


F0ad anddelete ho pezation fiey 3 terud On ha
file Systeni Ou Progian

Py thonile tlandlli CodstS tstlaroig 3 Sfeps


Open the
Pro coss e Penfonpaig o Or 20 tke opeiatu
Close e he

upe) of iles
Text files:Afih _ese_Condexs Con be Ve0ea
4 e t elfor S Caltod a tert ilo
dsig
dsihg

Binary ile A bivoky e Stora a dodo in Tu Sa


a Stofrad in o lnmory, ae e le
mp2 e inages anl So me Cxanpk binoy
Camlin Page
Date

Open functon Refora. asu0ocluqDet0at enqopenatioz

oFan A mus be opened cSE..


Open l ) e r r i
Pytkonprod uilt ina unchion

fileobject Open huname < access-mode>, 4bufeus

name hame of 4 Ale, enclosed in doubk uote


Cces mole Detenmiu hat hat tuind 6f openatieu
Ca be peforomed coift File, l be ucd
Ariteele
Buffengin o o bufleatg set to 0 , tor liu
butfeniug-sett to 1. s qrahte
Hhan 1,tten sbuiler Sie2f #
15 waative ten huten SizasSastem defaule

Mods

- TOadingOnly
only
L0 rltwo on ONeNcO ute tte Hles C
tor dppeyeli vbve Ple polntes at 2nd 6
t e file CradBe
Camlin Pge
Date

Syntar

P2 Openpoem.tt A do open Eh as aile


fcOrite ( Good Martnina
Pclaset) T t 5SoChotiom/ Save tram
de alo cafe "ts Hes Oace

Raadi data

Open Poem trt

data L rad) t sit Had e dafa Trerm


print t ContainSdata)
Cotet)

Couintinghe. ofletens in Ha

Open tpoemttt ", " )


date Ezr0odO
C
tort in data

print (No. ef lhe", c)


Acloce )

Courting No. of Voels

7radU

Or im dato.
in 4"aeiou ortin "AEIOu:
C+1
Pant CNe, fVoadela c
fctose C
Comlin
Dete

rogaram toget call umberMamis and marks o


Studens getom t a d ser nd Sore deailts in
fil alsd Dato.tat

Open (Daka. trt w


Count int (input ( Ho
many Studonk
oniin rarge (count)
printEnter detailt er StudendCi+O)
Holl ind input (Roll n e
YamA
Input ( Ender Name i

manks float inpud (gnten


mas Z
rec Strn (ol1) +Yhame s n mass+
. tonite (rec)

primtCsuuces.. ')
. closeC)

Eopen Bata.trt72
dala TOadline()_ odline Can Xead only liue
Prunt( En4 te', daia
dafo reodlint)
print(8 eco nd liudata

dlalo zadline
prisdhind telato)
Prtint

cAose )
Date

data Handlines 0 Storcas thedoto arm 6


print ltat data)

close 0

0pen( "Bata.tat " )

dao. rad (6) 0ting mgument nside Treod Fanchien


print ( data)_ is Used to zc0ad specific ostes of date
data-f z0ad S)
prind Cdafa )

f Close

You might also like