On 25 Oct 2009, at 07:45 , elca wrote:
i want to make web scraper.
if possible i really want to make it work together with
beautifulsoup or
lxml with PAMIE.
Scraping information from webpages falls apart in two tasks:
1. Getting the HTML data
2. Extracting information from the HTML data
Hello,
im very sorry .
first my source is come from website which consist of html mainly.
and i want to make web scraper.
i was found some script source in internet.
following is script source which can beautifulsoup and PAMIE work together.
but if i run this script source error was happened.
At
Hi,
elca, 25.10.2009 02:35:
> hello...
> if anyone know..please help me !
> i really want to know...i was searched in google lot of time.
> but can't found clear soultion. and also because of my lack of python
> knowledge.
> i want to use IE.navigate function with beautifulsoup or lxml..
> if anyo
Terry Reedy writes on Fri, 23 Oct 2009 03:04:41 -0400:
> Consider this:
>
> def blackhole(*args, **kwds): pass
>
> The fact that it accept args that it ignores could be considered
> misleading or even a bug.
Maybe, it could. But, it is by no means necessary.
In mathematics, there is a set of i
In message , Michal
Ostrowski wrote:
> def MakeLambdaBad():
> a = []
> for x in [1,2]:
> a.append(lambda q: x + q)
> return a
Here's another form that should work:
def MakeLambdaGood2() :
a = []
for x in [1, 2] :
a.append((lambda x : lambda q : x + q)
On Sat, Oct 24, 2009 at 8:33 PM, Michal Ostrowski wrote:
> The snippet of code below uses two functions to dynamically create
> functions using lambda.
> Both of these uses should produce the same result, but they don't.
> def MakeLambdaGood():
> def DoLambda(x):
> return lambda q: x + q
>
The snippet of code below uses two functions to dynamically create
functions using lambda.
Both of these uses should produce the same result, but they don't.
The expected output of this code is
11
12
11
12
However, what we get instead is
12
12
11
12
The problem is that the two functions return
When I click "quit" button, why the following code has problem?
from Tkinter import *
colors = ['red', 'green', 'yellow', 'orange', 'blue', 'navy']
def gridbox(parent):
r = 0
for c in colors:
l = Label(parent, text=c, relief=RIDGE, width=25)
e = Entry(parent, bg=c, reli
On Sat, Oct 24, 2009 at 8:47 PM, Joe wrote:
>> For the reason BK explained, the important difference is that I ran in
>> the IDLE shell, which handles screen printing of unicode better ;-)
>
> Something still does not seem right here to me.
>
> In the example above the bytes were decoded to 'UTF-8
hello!
im very sorry to late reply.
follow script i was executed.
from BeautifulSoup import BeautifulSoup
from PAM30 import PAMIE
url = 'http://www.cnn.com'
ie = PAMIE(url)
bs = BeautifulSoup(ie.pageText())
and i was got such like follow error in wingide.
i can guess because of current version
> For the reason BK explained, the important difference is that I ran in
> the IDLE shell, which handles screen printing of unicode better ;-)
Something still does not seem right here to me.
In the example above the bytes were decoded to 'UTF-8' with the
replace option so any characters that were
hello...
if anyone know..please help me !
i really want to know...i was searched in google lot of time.
but can't found clear soultion. and also because of my lack of python
knowledge.
i want to use IE.navigate function with beautifulsoup or lxml..
if anyone know about this or sample.
please help
Forrest Sheng Bao wrote:
I am having a weird problem on IDLE. After I plot something using show
() of matplotlib, the python shell prompt in IDLE just freezes that I
cannot enter anything and there is no new ">>>" prompt show up. I
tried ctrl - C and it didn't work. I have to restart IDLE to use
I want to use urlopen() to open either a http://... file or a local
file File:C:/... I don't have problems opening and reading the file
either way. But when I run the script on a server (ArcGIS server),
the request won't complete if it was trying to open a local file.
Even though I call close()
Joe wrote:
Thanks for your response.
Please provide more information
The Python 3.1.1 documentation has the following example:
Where? I could not find them
http://docs.python.org/3.1/howto/unicode.html#unicode-howto
Scroll down the page about half way to the "The String Type" section.
Th
I'm starting to look at the iPhone SDK and I'd like to know of
resources on the Net that approach that language with a Pythonic
mindset. Mind you, I want to code Objective-C, not pine about Python
not being on the iPhone either. The kind of elegant simple code that
a good Python coder who also kn
Thanks for your response.
> Please provide more information
>
> > The Python 3.1.1 documentation has the following example:
>
> Where? I could not find them
http://docs.python.org/3.1/howto/unicode.html#unicode-howto
Scroll down the page about half way to the "The String Type" section.
The exa
I am having a weird problem on IDLE. After I plot something using show
() of matplotlib, the python shell prompt in IDLE just freezes that I
cannot enter anything and there is no new ">>>" prompt show up. I
tried ctrl - C and it didn't work. I have to restart IDLE to use it
again.
My system is Ubu
Gabriel Genellina wrote:
En Fri, 23 Oct 2009 20:56:21 -0300, Ronn Ross
escribió:
I have tried setting the baud rate with no success. Also I'm using
port #2
because I"m using a usb to serial cable.
Note that Serial(2) is known as COM3 in Windows, is it ok?
Do you have a machine with a C
On Sat, Oct 24, 2009 at 1:09 PM, Joe wrote:
> The Python 3.1.1 documentation has the following example:
>
b'\x80abc'.decode("utf-8", "strict")
> Traceback (most recent call last):
> File "", line 1, in ?
> UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0:
>
Joe wrote:
Please provide more information
The Python 3.1.1 documentation has the following example:
Where? I could not find them
b'\x80abc'.decode("utf-8", "strict")
Traceback (most recent call last):
File "", line 1, in ?
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in posit
In article <7kh22qf38i28...@mid.uni-berlin.de>,
Diez B. Roggisch wrote:
>
>As you don't show us the code, I can only guess - but experience tells
>me that you try & bind your service to a priviledged (<=1024) port,
>which *nix only allows with root-privileges.
Concur.
You need root privileges
Christian Heimes wrote:
> Michael Ströder wrote:
>> - snip -
>> /usr/src/Python-2.6.4rc2> make
>> 'import site' failed; use -v for traceback
>> Traceback (most recent call last):
>> File "./setup.py", line 15, in
>> from distutils.comma
Peng Yu schrieb:
I'm following the instruction on
http://fragments.turtlemeat.com/pythonwebserver.php to set web
service. But I get the following error message when I run the script
on my mac machine. I'm wondering why I see the permission denied error
message.
$python webserver.py
Traceback (mo
I'm following the instruction on
http://fragments.turtlemeat.com/pythonwebserver.php to set web
service. But I get the following error message when I run the script
on my mac machine. I'm wondering why I see the permission denied error
message.
$python webserver.py
Traceback (most recent call last
Michael Ströder wrote:
> - snip -
> /usr/src/Python-2.6.4rc2> make
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
> File "./setup.py", line 15, in
> from distutils.command.build_ext import build_ext
>
HI!
I'm on a openSUSE system where Python 2.6 is installed from RPMs.
I'm trying to build Python from source separately. This used to work in former
versions but fails now (see build traceback below).
Anyone having a clue what's going on here? Is there a possible work-around? A
possible conflict
I am proud to announce that Jump 0.9.0 is released!
You can find the Jump project at http://gitorious.org/jump,
and its documentation at http://gitorious.org/jump/pages/Home.
This version is the Jump's first release. The goal of Jump is to make
a distribution for Jython application in a really si
The Python 3.1.1 documentation has the following example:
>>> b'\x80abc'.decode("utf-8", "strict")
Traceback (most recent call last):
File "", line 1, in ?
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0:
unexpected code byte
>>> b'\x80abc'.decode("utf-8
On Sun, Oct 25, 2009 at 00:41 +0900, Hyunchul Kim wrote:
> [0;37m How to run multiple processes with sequential input of a thousand
> of data
> [0;37m in a script run?
>
> [0;37m I have a python script and 1,000 independent
Hyunchul Kim wrote:
Hi, all
How to run multiple processes with sequential input of a thousand of
data in a script run?
I have a python script and 1,000 independent input data for it.
Previously, I divided input data into/ n/ groups and ran a same
python script /n/ times to use /n/ processor
Hi, all
How to run multiple processes with sequential input of a thousand of data in
a script run?
I have a python script and 1,000 independent input data for it.
Previously, I divided input data into* n* groups and ran a same python
script *n* times to use *n* processors.
It's inconvenient.
Ho
Mark Dickinson, 24.10.2009 16:44:
> On Oct 24, 3:26 pm, Stefan Behnel wrote:
>> in Python 3.1.1, I get this:
>>
>> Python 3.1.1 (r311:74480, Oct 22 2009, 19:34:26)
>> [GCC 4.3.2] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> -(2j)
>> (-0-2j)
>>
> I know at least that the float repr() was modified in Py3.1, but is the
> above behaviour intentional? It certainly breaks doctests, and I don't see
> a good reason for that.
I don't know whether it was intentional, but it looks right to me.
2j is the complex number +0.0+2.0j (right?). Then, -(2
On Oct 24, 3:26 pm, Stefan Behnel wrote:
> Hi,
>
> in Python 3.1.1, I get this:
>
> Python 3.1.1 (r311:74480, Oct 22 2009, 19:34:26)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> 2j
> 2j
> >>> -2j
> -2j
> >>> -0-2j
> -2j
>
Hi,
in Python 3.1.1, I get this:
Python 3.1.1 (r311:74480, Oct 22 2009, 19:34:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 2j
2j
>>> -2j
-2j
>>> -0-2j
-2j
>>> (-0-2j)
-2j
>>> -(2j)
(-0-2j)
The last line differs fro
On 24 Oct 2009, at 21:37, larudwer wrote:
"Brian Quinlan" schrieb im Newsbeitrag
news:mailman.1895.1256264717.2807.python-l...@python.org...
Any ideas why this is happening?
Cheers,
Brian
IMHO your code is buggy. You run in an typical race condition.
consider following part in your code
Howdy all,
I'm pleased to announce the release of version 1.5.2 of ‘python-daemon’.
What is python-daemon
=
The ‘python-daemon’ library is the reference implementation of PEP 3143
http://www.python.org/dev/peps/pep-3143/>, “Standard daemon process
library”.
The source distri
Yes, with the serial to usb adapter is located on COM3. I have been able to
use puTTY to get into the port and shoot commands at the device, but when I
try to use python I get 'You don't have permissions".
On Sat, Oct 24, 2009 at 12:50 AM, Gabriel Genellina
wrote:
> En Fri, 23 Oct 2009 20:56:21 -
On Oct 24, 4:14 am, Ethan Furman wrote:
> John Machin wrote:
> > On Oct 23, 3:03 pm, Ethan Furman wrote:
>
> >>John Machin wrote:
>
> >>>On Oct 23, 7:28 am, Ethan Furman wrote:
>
> Greetings, all!
>
> I would like to add unicode support to my dbf project. The dbf header
> has a one-
On Sat, Oct 24, 2009 at 07:54 +, Vinay Sajip wrote:
> Wolodja Wentland cl.uni-heidelberg.de> writes:
[snip]
> > foo
> > |__bar
> > |__baz
> > |__newt
> > |___witch
> >
> > I set every loggers log level to DEBUG and use the respective logger in
> You only need set f
"Brian Quinlan" schrieb im Newsbeitrag
news:mailman.1895.1256264717.2807.python-l...@python.org...
>
> Any ideas why this is happening?
>
> Cheers,
> Brian
IMHO your code is buggy. You run in an typical race condition.
consider following part in your code:
> def _make_some_processes(q):
>
I have several instances of the same generator function running
simultaneously, some within the same process, others in separate processes. I
want them to be able to share data (the dictionaries passed to them as
arguments), in such a way that instances designated as "leaders" send their
dictio
baloan wrote:
On Oct 22, 6:34 am, "Gabriel Genellina"
wrote:
class AttrDict(dict):
"""A dict whose items can also be accessed as member variables."""
def __init__(self, *args, **kwargs):
dict.__init__(self, *args, **kwargs)
self.__dict__ = self
def copy(self):
On 24 Oct 2009, at 19:49, Gabriel Genellina wrote:
En Sat, 24 Oct 2009 02:48:38 -0300, Brian Quinlan
escribió:
On 24 Oct 2009, at 14:10, Gabriel Genellina wrote:
En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan > escribió:
I don't like a few things in the code:
I'm actually not looking f
En Sat, 24 Oct 2009 02:48:38 -0300, Brian Quinlan
escribió:
On 24 Oct 2009, at 14:10, Gabriel Genellina wrote:
En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan
escribió:
I don't like a few things in the code:
I'm actually not looking for workarounds. I want to know if this is a
multip
> Emmanuel Surleau a écrit :
> > It still manages to retain flexibility, but you're basically stuck
> > with Django's ORM
>
> You're by no way "stuck" with Django's ORM - you are perfectly free
> not to use it. But then you'll obviously loose quite a lot of useful
> feat
Wolodja Wentland cl.uni-heidelberg.de> writes:
> First and foremost: A big *THANK YOU* for creating and maintaining the
> logging module. I use it in every single piece of software I create and
> am very pleased with it.
I'm glad you like it. Thanks for taking the time to write this detailed
pos
Hi Brian,
I think there could be a slight problem (if I've understood your code).
> import multiprocessing
> import queue
>
> def _process_worker(q):
> while True:
do you really want to run it indefinitely here?
> try:
> something = q.get(block=True, timeout=0.1)
> exc
49 matches
Mail list logo