Thursday, 27 June 2013

'Ye Ehsaas" of spiritual love

Ye Ehasaas

(My First Poem)

Na jane ye saans kab tak chal payegi,
Na jane ye raah kahan tak le jayegi,
Saath chalne ka jo sapne dekhti hun din raat,
Aisa lagta hai aankhon se oojhal ho jayegi,

Jindagi main bahut logon ne chala hai,
Bas aur himmat na juta paungi sahne ki,
Ji chahta hai ki ya to yahin saans ruk jaye,
Ya himmat mil jaye inke sang rahne ki,

Shayad main itna acha to nahi likh pati hun,
Na hi apne aap ko bayaan kar pati hun,
Bas yahi khwaish hai ki meri khamoshi padh le wo,
Samajh le in jazbaaton ko jinko bayan nahi kar pati hun,

Samjh to wo jata h, 
Par na jaane kyun dikhane se wo darta h,
Mere kushi ke aansu se bhi se bhi ghabra jaye,
Wo mujh se itna pyaar karta h,

Pata nahi wo jindagi bhar mera saath nibhayega,
Ya mujhse alag hote hi bhul jayega,
Meri har saans usi ki h,
Uske saare dukh ke badle, apna sukh deke hi chain aayega.......

Resume Download

Resume Download via pyCurl
import os import pycurl import sys def progress(total, existing, upload_t, upload_d): existing = existing + os.path.getsize(filename) try:
       frac = float(existing)/float(total)
except:
frac = 0
sys.stdout.write("\r%s %3i%%" % ("File downloaded - ", frac*100))
url = raw_input('Enter URL to download folder/file: ')
filename = url.split("/")[-1].strip()
def test(debug_type, debug_msg):
print "debug(%d): %s" % (debug_type, debug_msg)
c = pycurl.Curl()
c.setopt(pycurl.URL, url)
c.setopt(pycurl.FOLLOWLOCATION, 1)
c.setopt(pycurl.MAXREDIRS, 5)
# Setup writing
if os.path.exists(filename):
f = open(filename, "ab")
c.setopt(pycurl.RESUME_FROM, os.path.getsize(filename)
else:
f = open(filename, "wb")
c.setopt(pycurl.WRITEDATA, f)
#c.setopt(pycurl.VERBOSE, 1)
c.setopt(pycurl.DEBUGFUNCTION, test)
c.setopt(pycurl.NOPROGRESS, 0)
c.setopt(pycurl.PROGRESSFUNCTION, progress)
try:
c.perform()
except:
pass