محب علوی
مدیر
فائل پڑھنا
پناہ گزینوں کے دکھ آج بھی وہی ہیں جو اسی سال قبل اسی نظم میں بیان کیے گئے تھے۔
اس نظم کو ہم ایک فائل poem.txt کے نام سے محفوظ کر لیتے ہیں۔ ہم فائل ریڈنگ کے مذکورہ بالا طریقوں کی مدد سے اس فائل کو read کریں گے۔
پناہ گزینوں کے دکھ آج بھی وہی ہیں جو اسی سال قبل اسی نظم میں بیان کیے گئے تھے۔
کوڈ:
Say this city has ten million souls,
Some are living in mansions, some are living in holes:
Yet there's no place for us, my dear, yet there's no place for us.
Once we had a country and we thought it fair,
Look in the atlas and you'll find it there:
We cannot go there now, my dear, we cannot go there now.
In the village churchyard there grows an old yew,
Every spring it blossoms anew:
Old passports can't do that, my dear, old passports can't do that.
The consul banged the table and said,
"If you've got no passport you're officially dead":
But we are still alive, my dear, but we are still alive.
Went to a committee; they offered me a chair;
Asked me politely to return next year:
But where shall we go to-day, my dear, but where shall we go to-day?
Came to a public meeting; the speaker got up and said;
"If we let them in, they will steal our daily bread":
He was talking of you and me, my dear, he was talking of you and me.
اس نظم کو ہم ایک فائل poem.txt کے نام سے محفوظ کر لیتے ہیں۔ ہم فائل ریڈنگ کے مذکورہ بالا طریقوں کی مدد سے اس فائل کو read کریں گے۔
کوڈ:
read()
readline()
readlines()
آخری تدوین: