On Wed, Nov 17, 2010 at 5:31 PM, Kushal Kumaran
wrote:
> On Wed, Nov 17, 2010 at 5:18 PM, asit wrote:
>> I have this piece of code
>>
>> import urllib2
>>
>> proc_url = 'http://www.nse-india.com/content/historical/EQUITIES/2001/
>> JAN/cm01JAN2001bhav.
I have this piece of code
import urllib2
proc_url = 'http://www.nse-india.com/content/historical/EQUITIES/2001/
JAN/cm01JAN2001bhav.csv.zip'
print 'processing', proc_url
req = urllib2.Request(proc_url)
res = urllib2.urlopen(req)
when i run this...following error comes
Traceback (most recent
else:
print level, " does NOT have ", perm, "
permission"
except:
print "There was a problem - check the message above"
According to me, indentation is ok. but the python interpreter gives
an indentation error
[asit ~/py] $ python search.py
File
> Define "processing".
getting the title, song name, etc of the file and updating in a
database
--
http://mail.python.org/mailman/listinfo/python-list
Somebody suggest me a python library for processing mp3 file. Here I
don't want to play the file.
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
This question is for any python-twitter developer
I want to develop an application using python twitter .
Just look at the code...
import twitter
api = twitter.Api();
sta = api.GetUserTimeline('ShashiTharoor')
i = 0
for s in sta:
i +=1
print str(i) + " " + s.text
print
print
I need some tutorial about python-mysql connectivity(database
handling).
Somebody please help me !!
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 7, 10:36 pm, Bruno Desthuilliers
wrote:
> asit a écrit :
>
> > In my program I want to catch exception which is caused by accessing
> > NoneType object.
>
> > Can anyone suggest me how this can be done ??
>
> Not without the minimal working code e
In my program I want to catch exception which is caused by accessing
NoneType object.
Can anyone suggest me how this can be done ??
--
http://mail.python.org/mailman/listinfo/python-list
I hv been developing a link scanner. Here the objective is to
recursively scan a particular web site.
During this, my script met http://images.google.co.in/imghp?hl=en&tab=wi
and passed it to the scan function, whose body is like this..
def scan(site):
log=open(logfile,'a')
log.write(site
Thanx everyone
This is my fault. Exception was thrown before the main function.
--
http://mail.python.org/mailman/listinfo/python-list
aborted by user"
except SystemExit:
pass
But it does not work.
Can anyone help me out ???
Though KeyboradInterrupt is handled, but why SystemExit is not
handles
Regards
Asit Dhal
--
http://mail.python.org/mailman/listinfo/python-list
Recently I was coding a link extractor. It's a command line stuff and
takes parameter as argument.
I found that the in operator is not always helpful.
eg. if "--all" in sys.argv:
print "all links will be printed"
its not helpful when some attribute value is sent in command line
paramete
On Jan 15, 11:47 am, "James Mills"
wrote:
> On Thu, Jan 15, 2009 at 4:34 PM, asit wrote:
> > I recently faced a peculiar o/p.
>
> > My objective is to remove the command name(my script name) from
> > sys.argv[0].
> > I coded like this
>
> If you
nkscan.pywww.google.com --verbose
[option]
--verbose/-V for verbose output
-r for recursive scan
I:\Python26>
regards
asit dhal
--
http://mail.python.org/mailman/listinfo/python-list
import httplib
class Server:
#server class
def __init__(self, host):
self.host = host
def fetch(self, path):
http = httplib.HTTPConnection(self.host)
http.request("GET", path)
r = http.getresponse()
print str(r.status) + " : " + r.reason
serve
On Jan 4, 1:59 am, "Chris Rebert" wrote:
> On Sat, Jan 3, 2009 at 12:38 PM, asit wrote:
> > import httplib
>
> > class Server:
> > #server class
> > def __init__(self, host):
> > self.host = host
> > def fetch(self, path)
import httplib
class Server:
#server class
def __init__(self, host):
self.host = host
def fetch(self, path):
http = httplib.HTTPConnection(self.host)
http.putrequest("GET", path)
r = http.getresponse()
print str(r.status) + " : " + r.reason
s
On Nov 26, 11:09 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 26, 2008 at 9:59 AM, asit <[EMAIL PROTECTED]> wrote:
> > Which one is the best IDE for python
>
> This was recently discussed. To avoid needlessly rehashing said
&
Which one is the best IDE for python
--
http://mail.python.org/mailman/listinfo/python-list
27;33', '2']:
y=int(y) #string '2' is converted to int 2
if x < y:
print x, "is less than", y
elif x > y:
print x, "is greater than", y
else:
On Oct 28, 10:02 am, alex23 <[EMAIL PROTECTED]> wrote:
> On Oct 26, 2:51 am, Stefan Behnel <[EMAIL PROTECTED]> wrote:
>
> > The more you spam people with your repetitive postings, the less likely it
> > becomes that they are willing to answer you.
>
> In asit's defence, the Google Groups interface
what is XML-RPC System
--
http://mail.python.org/mailman/listinfo/python-list
I am a newbie and learned python to some extent.
I want to do some project in python based on network programming or
HTML/XML parsing.
Can anyone suggest me about this ???
--
http://mail.python.org/mailman/listinfo/python-list
I want to do a project in python.
It should be something based on socket programming, HTML/XML parsing,
etc
plz suggest me
--
http://mail.python.org/mailman/listinfo/python-list
I want to do a project in python.
It should be something based on socket programming, HTML/XML parsing,
etc
please suggest me
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 24, 11:18 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 24, 2008 at 1:42 PM, asit <[EMAIL PROTECTED]> wrote:
> > I code in both windows and Linux. As python is portable, the o/p
> > should be same in both cases. But why the following code is
I code in both windows and Linux. As python is portable, the o/p
should be same in both cases. But why the following code is perfect in
windows but error one in Linux ???
from socket import *
import sys
status={0:"open",10049:"address not available",10061:"closed",
10060:"timeout",10056:"alread
On Oct 24, 8:01 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Fri, 24 Oct 2008 14:53:19 +, Peter Pearson wrote:
> > On 24 Oct 2008 13:17:45 GMT, Steven D'Aprano wrote:
>
> >> What are programmers coming to these days? When I was their age, we
> >> were expected to *read
On Oct 24, 3:06 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> ["%s="%s" % (k,v) for k,v in d.items()]
> > File "", line 1
> > ["%s="%s" % (k,v) for k,v in d.items()]
> > ^
> > SyntaxError: EOL while scanning single-quoted string
>
> You have three q
what the wrong with the following code
>>> d={"server":"mpilgrim","database":"master",
... "uid":"sa",
... "pwd":"secret"}
>>> d
{'pwd': 'secret', 'database': 'master', 'uid': 'sa', 'server':
'mpilgrim'}
>>> ["%s="%s" % (k,v) for k,v in d.items()]
File "", line 1
["%s="%s" % (k,v) for
On Mar 11, 9:10 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Tue, 11 Mar 2008 08:24:54 -0700 (PDT), asit <[EMAIL PROTECTED]> wrote:
> >import socket
> >import sys
> >import thread
>
> >p=1
> >PORT=11000
> >BUFSIZE=1024
>
>
import socket
import sys
import thread
p=1
PORT=11000
BUFSIZE=1024
def getData(cSocket):
global stdoutlock,cSocketlock
while True:
cSocketlock.acquire()
data=cSocket.recv(BUFSIZE)
if data=='q':
data='client exited'
cSocket.close()
On Feb 28, 7:53 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> asit wrote:
> > i want to show the entry button at the center of the window. How is it
> > possible ??
> > from Tkinter import *
>
> > def callback():
> > print e.get()
>
> > mas
from Tkinter import *
def callback():
print e.get()
master=Tk()
e=Entry(master)
e.pack(anchor=CENTER)
e.focus_set()
b=Button(master,text="get",width=10,command=callback)
b.pack(anchor=CENTER)
master.mainloop()
i want to show the entry button at the center of the window. How is it
possible
from Tkinter import * # get widget classes
from tkMessageBox import askokcancel # get canned std dialog
class Quitter(Frame): # subclass our GUI
def __init__(self, parent=None): # constructor method
Frame.__init__(se
why this program shows ambiguous behavior ??
import os
import stat
import time
#import types
file_name=raw_input("Enter file name : ")
print file_name, "information"
st=os.stat(file_name)
print "mode", "=>", oct(stat.S_IMODE(st[stat.ST_MODE]))
print "type","=>",
if stat.S_ISDIR(st[stat.ST_MODE])
we know that time.gmtime(secs) takes a parameter secs. what does this
secs suggest ??What is it's significance ??
--
http://mail.python.org/mailman/listinfo/python-list
38 matches
Mail list logo