Hi Saurabh, those are good for ones to become proficient in writing Python
Code.
Regards,
Sriram Srinivasan
www.sriramsrinivasan.in
-Original Message-
From: Python-list
[mailto:python-list-bounces+learning=sriramsrinivasan...@python.org] On
Behalf Of Saurabh Hooda
Sent: 09 August 2017
Hello all. I'm new to Python, but have been playing around with it for a few
weeks now, following tutorials, etc. I've spun off on my own and am trying to
do some basic web scraping. I've used Firebug/View XPath in Firefox for some
help with the XPaths, however, I still am receiving errors when
Sorry about that. I'm using Python 2.7.3, 32 bit one Windows 7.
The errors I get are
>>File
>>"C:\python27\lib\site-packages\scrapy-0.16.3-py2.7.egg\scrapy\selector\lxmlsel.py",
>> line 47, in select
>>raise ValueError("Invalid XPath: %s" % xpath)
>>exceptions.ValueError: Invalid XPath: /span[@c
A example in learning Python by Mark Lutz and David Ascher
about function scope
example like this:
>>def outer(x):
def inner(i):
print i,
if i: inner(i-1)
inner(x)
>>outer(3)
Here supposely, it should report error, because the function inner
cannot see
Thanks all for replying.
I finally know what's going on.
--
http://mail.python.org/mailman/listinfo/python-list
I know this is dummy, just never saw an example of this.
I want to use the special argument matching.
A code like this:
def adder(**varargs):
sum=varargs[varargs.keys()[0]]
for next in varargs.keys()[1:]:
sum=sum+varargs[next]
return sum
print adder( "first","
thanks, got it.
I want to test the **name option for argument matching.
--
http://mail.python.org/mailman/listinfo/python-list
An example in the book I didn't understood well
two modules files recursively import/from each other
in recur1.py,we have:
x=1
import recur2
y=1
in recur2.py, we have
from recur1 import x
from recur1 import y
If we run interactively at python command line,
>>> import recur1
it has errors li
anything related to csv, I usually use VB within excel to manipulate
the data, nonetheless, i finally got the courage to take a dive into
python. i have viewed a lot of googled csv tutorials, but none of
them address everything i need. Nonetheless, I was wondering if
someone can help me manipulat