I want to call back a function which is the method of a class .
def callback(self.do,x):
return(self.do(x))
That is what i want to write,when i input
def callback(self.do,x):
error message:
File "", line 1
def callback(self.do,x):
^
there is a simple file `mydown.py` saved in `D:\Python34\Lib\site-packages`
there is only one line in mydown.py .
import requests
C:\Users\pengsir>d:\Python34\python
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit
(AM
D64)] on win32
Type "help", "copy
-- 原始邮件 --
发件人: "Sturla Molden";;
发送时间: 2014年7月26日(星期六) 凌晨4:04
收件人: "python-list";
主题: Re: problem on multi-threading
"水静流深" <1248283...@qq.com> wrote:
> name=['60', '01', '600319', '6
The right program is as following,everything is ok.
import requests
import threading
import queue
class webdata(object):
def __init__(self,name):
self.jobs=queue.Queue()
for x in name:
url='http://stockhtm.finance.qq.com/sstock/ggcx/%s.shtml' %x
se
?
it is target to practice the threading and queue module .
-- 原始邮件 --
发件人: "Chris Angelico";;
发送时间: 2014年7月23日(星期三) 晚上11:58
收件人:
抄送: "python-list";
主题: Re: how to download special range content with requests in python?
On Wed, Jul 23,
url='http://debian.cites.illinois.edu/pub/debian-cd/7.6.0/amd64/iso-cd/debian-7.6.0-amd64-CD-1.iso'
import requests
r = requests.get(url).read(0,1000)
why i can not download special range(from 0 to 1) content with requests
in python?--
https://mail.python.org/mailman/listinfo/python-
>>> import os
>>> help(os.path)
Not enough memory.
Why i get it?Not enough memory , not help info?,not--
https://mail.python.org/mailman/listinfo/python-list
There is a open source project-goagent,when you download it and extract it,
code.google.com/p/goagent/downloads
in the local diretory, a file named goagent.exe in it.
how can i get the source code of goagent.exe ,not the binary form ,the text
form.--
https://mail.python.org/mailman/listinfo/p
No urls, filenames, or requirements specified (see --help)
How can i install it now?
-- 原始邮件 --
发件人: "Mark Lawrence";;
发送时间: 2014年6月29日(星期天) 凌晨1:24
收件人: "python-list";
主题: Re: why i can't install ez_setup
On 28/06/2014 16:36, Chris “Kwp
I have downloaoded ez_setup.py ,when i install it ,the wrong message:
>python d:\ez_setup.py
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-5.2.
zip
Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to th
e remote server"
At line:1 char:152
+ [
file.write(s.decode('gbk').encode('utf-8'))
i open the file c:\t1, to get 中文 in it
not 涓枃
-- 原始邮件 --
发件人: "MRAB";
发送时间: 2012年1月27日(星期五) 上午10:53
收件人: "python-list";
主题: Re: write 中文 into c:\t1
On 27/01/2012 02:46, contro opinion wrote:
> |>>> s='\xd6\xd0
in my xp ,python26,easy_install installed.
i want to install lxml in window xp
1.c:\python26\scripts\easy_install lxml
what i get is:
Reading http://codespeak.net/lxml
Best match: lxml 2.3.3
Downloading http://lxml.de/files/lxml-2.3.3.tgz
Processing lxml-2.3.3.tgz
Running lxml-2.3.3\setup.p
yes i run python3,how to install flask in python3?
-- 原始邮件 --
发件人: "MRAB";
发送时间: 2012年1月6日(星期五) 中午11:05
收件人: "python-list";
主题: Re: problem to install Flask
On 06/01/2012 02:24, 水静流深 wrote:
> ~$ sudo easy_install Flask
> Sea
~$ sudo easy_install Flask
Searching for Flask
Reading http://pypi.python.org/simple/Flask/
Reading http://github.com/mitsuhiko/flask/
Best match: Flask 0.8
Downloading
http://pypi.python.org/packages/source/F/Flask/Flask-0.8.tar.gz#md5=a5169306cfe49b3b369086f2a63816ab
Processing Flask-0.8.tar.gz
-- 原始邮件 --
发件人: "Terry Reedy";
发送时间: 2011年10月24日(星期一) 中午12:58
收件人: "python-list";
抄送: "lxml";
主题: Re: install lxml
On 10/24/2011 12:02 AM, 水静流深 wrote:
> there are two python versions in my computer,
> python2.7 is the
rnal entity "http://frux.wikispaces.com/";'
2. ubuntu11.04+python2.6
import lxml.html
sfile='http://frux.wikispaces.com/'
root=lxml.html.parse(sfile).getroot()
it is ok
it is so strange thing for me to understand
-- 原始邮件 --
发件人: "Dave A
there are two python versions in my computer,
python2.7 is the default,python3.2 is the second install.
for python2.7
~$python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>
C:\Documents and Settings\peng>cd c:\python32
C:\Python32>python
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml.html
>>> sfile='http://finance.yahoo.com/q/op?s
on c:\xml.py
Traceback (most recent call last):
File "c:\xml.py", line 5, in
root=lxml.html.fromstring(root)
File "C:\Python32\lib\site-packages\lxml\html\__init__.py", line 630, in froms
tring
if start.startswith(';
发送时间: 2011年10月23日(星期天) 晚上9:48
收件人: "水
code 1 can run in python2.6
#coding:utf-8
import urllib
import lxml.html
down='http://frux.wikispaces.com/'
root=urllib.urlopen(down).read()
root=lxml.html.fromstring(root)
file=root.xpath('//a')
for i in file:
str1=i.text_content()
if str1.find('pdf') >-1 :
str2='http://frux.wi
20 matches
Mail list logo