dieter wrote:
> Once the problems to get the "final" HTML code solved,
> I would use "lxml" and its "xpath" support to locate any
> relevant HTML information.
Hello Dieter, yes - you are correct. (though I don't think there's any auth
to browse - nice that you actually tried) He's using jsonP an
Great Avenger Singh writes:
> I am installing Pybison from following Source:
>
> https://github.com/smvv/pybison
>
> After installing all required dependencies I am able to run "sodo python
> setup.py install" without any errors.
>
> I am getting following error while Running "python -c import bi
Veek M writes:
> I tried scraping a javascript website using two tools, both didn't work. The
> website link is: http://xdguo.taobao.com/category-499399872.htm The relevant
> text I'm trying to extract is 'GY-68...':
>
>
>
>
>
> id="4002-6778075404" data-spm-anchor-i
On 02/07/2015 01:12, bvdp wrote:
Not sure what this is called (and I'm sure it's not normalize). Perhaps
"scaling"?
Anyway, I need to convert various values ranging from around -50 to 50 to an 0
to 12 range (this is part of a MIDI music program). I have a number of places
where I do:
whi
Hello Everyone,
I am installing Pybison from following Source:
https://github.com/smvv/pybison
After installing all required dependencies I am able to run "sodo python
setup.py install" without any errors.
I am getting following error while Running "python -c import bison"
Traceback (most rec
On 2015-07-01 21:51, Peter Otten wrote:
> use a loop:
>
> CHUNKSIZE = 16*1024 # for example
> while True:
>data = response.read(CHUNKSIZE)
>if not data:
>break
>out_file.write(data)
>
>
> This can be simplified:
>
> shutil.copyfileobj(response, out_file)
It's these little
On Wednesday, July 1, 2015 at 7:15:28 PM UTC-7, Steven D'Aprano wrote:
> On Thu, 2 Jul 2015 10:12 am, bvdp wrote:
>
> > Not sure what this is called (and I'm sure it's not normalize). Perhaps
> > "scaling"?
>
>
> Could be normalising, could be scaling.
>
> > Anyway, I need to convert various v
On Wednesday, July 1, 2015 at 7:23:19 PM UTC-7, rand...@fastmail.us wrote:
> On Wed, Jul 1, 2015, at 21:49, bvdp wrote:
> > Interesting that negative values translate properly. That's an
> > non-intuitive result to me. Guess I should have studied that math stuff
> > harder way back when!
>
> There
On Wed, Jul 1, 2015, at 21:49, bvdp wrote:
> Interesting that negative values translate properly. That's an
> non-intuitive result to me. Guess I should have studied that math stuff
> harder way back when!
There are multiple interpretations of the operation, and not all
languages behave the same w
On Thu, 2 Jul 2015 10:12 am, bvdp wrote:
> Not sure what this is called (and I'm sure it's not normalize). Perhaps
> "scaling"?
Could be normalising, could be scaling.
> Anyway, I need to convert various values ranging from around -50 to 50 to
> an 0 to 12 range (this is part of a MIDI music p
On Thursday, 2 July 2015 07:20:03 UTC+5:30, Great Avenger Singh wrote:
> On Wednesday, 1 July 2015 18:33:06 UTC+5:30, beli...@aol.com wrote:
>
> > Are there other groups offering Python courses for pre-college students?
>
> Some months ago I took one course from Edx, They provide very good mat
On Wednesday, 1 July 2015 18:33:06 UTC+5:30, beli...@aol.com wrote:
> Are there other groups offering Python courses for pre-college students?
Some months ago I took one course from Edx, They provide very good material and
every each topic assignment is given,
You can try following:
https://
On Wednesday, July 1, 2015 at 6:27:57 PM UTC-7, rand...@fastmail.us wrote:
> On Wed, Jul 1, 2015, at 20:12, bvdp wrote:
> > Not sure what this is called (and I'm sure it's not normalize). Perhaps
> > "scaling"?
> >
> > Anyway, I need to convert various values ranging from around -50 to 50 to
> > a
On Wed, Jul 1, 2015, at 20:12, bvdp wrote:
> Not sure what this is called (and I'm sure it's not normalize). Perhaps
> "scaling"?
>
> Anyway, I need to convert various values ranging from around -50 to 50 to
> an 0 to 12 range (this is part of a MIDI music program). I have a number
> of places whe
On Wed, 01 Jul 2015 14:57:14 -0700, hinaimran.mehr wrote:
> I am pulling my hair with this problem right now,
>
> I have the following Data structure
>
> [ u'resource_id': u'id', u'timestamp': u'2015-06-30T15:53:55',
> u'counter_volume': 0.043}]
This isn't a print out of any python
I tried scraping a javascript website using two tools, both didn't work. The
website link is: http://xdguo.taobao.com/category-499399872.htm The relevant
text I'm trying to extract is 'GY-68...':
I'm trying to match the class="
On Wed, 01 Jul 2015 17:12:36 -0700, bvdp wrote:
> Not sure what this is called (and I'm sure it's not normalize). Perhaps
> "scaling"?
>
> Anyway, I need to convert various values ranging from around -50 to 50
> to an 0 to 12 range (this is part of a MIDI music program). I have a
> number of plac
bvdp writes:
>while x < 0: x += 12
>while x >= 12: x -= 12
> Okay, that works. Just wondering if there is an easier (or faster) way
> to accomplish this.
x = x % 12
should be the same as the above. But are you sure that's really what
you want?
--
https://mail.python.org/mailman/listinf
On 2015-07-02 01:12, bvdp wrote:
Not sure what this is called (and I'm sure it's not normalize). Perhaps
"scaling"?
Anyway, I need to convert various values ranging from around -50 to 50 to an 0
to 12 range (this is part of a MIDI music program). I have a number of places
where I do:
whi
Not sure what this is called (and I'm sure it's not normalize). Perhaps
"scaling"?
Anyway, I need to convert various values ranging from around -50 to 50 to an 0
to 12 range (this is part of a MIDI music program). I have a number of places
where I do:
while x < 0: x += 12
while x >= 12:
On 01Jul2015 21:51, Peter Otten <__pete...@web.de> wrote:
zljubi...@gmail.com wrote:
But how to read chunks?
Instead of
data = response.read() # a `bytes` object
out_file.write(data)
use a loop:
CHUNKSIZE = 16*1024 # for example
while True:
data = response.read(CHUNKSI
Randall Smith wrote:
Worse case, something that looks like this would land on the disk.
crc32 checksum + translation table + malware
It would be safer to add something to both the
beginning *and* end of the file. Some file formats,
e.g. zip, pdf, are designed to be read starting
from the end
I am pulling my hair with this problem right now,
I have the following Data structure
[http://www.pubnub.com/developers/eon/chart/spline/)
message: {
columns: [
["y": 0.043, "x": "2015-06-30T15:53:55"],
["y": 0.045, "x": "2015-06-30T15:53:55"]
On Wednesday, July 1, 2015 at 6:03:06 AM UTC-7, beli...@aol.com wrote:
> My 11yo son is taking the online class "Intermediate Programming with Python"
> http://www.artofproblemsolving.com/school/course/catalog/python2 offered by
> the Art of Problem Solving company (AoPS). Classes meet for 1.5 ho
zljubi...@gmail.com wrote:
> New version with chunks:
>
> import os
> import urllib.request
>
> def Download(rfile, lfile):
>
> retval = False
>
> if os.path.isfile(lfile):
> lsize = os.stat(lfile).st_size
> else:
> lsize = 0
>
> req = urllib.request.Request(rf
New version with chunks:
import os
import urllib.request
def Download(rfile, lfile):
retval = False
if os.path.isfile(lfile):
lsize = os.stat(lfile).st_size
else:
lsize = 0
req = urllib.request.Request(rfile)
req.add_header('Range', "bytes={}-".format(lsize)
zljubi...@gmail.com wrote:
> But how to read chunks?
Instead of
> data = response.read() # a `bytes` object
> out_file.write(data)
use a loop:
CHUNKSIZE = 16*1024 # for example
while True:
data = response.read(CHUNKSIZE)
if not data:
break
out_file.write(data)
But how to read chunks?
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Jul 2, 2015 at 5:24 AM, wrote:
> with urllib.request.urlopen(req) as response, open(lfile, 'ab') as
> out_file:
> data = response.read() # a `bytes` object
> out_file.write(data)
>
If a file is big enough to want to resume the download once, you
almost certainly want
Currently I am executing the following code:
import os
import urllib.request
def Download(rfile, lfile):
retval = False
if os.path.isfile(lfile):
lsize = os.stat(lfile).st_size
else:
lsize = 0
req = urllib.request.Request(rfile)
req.add_header('Range', "byte
On Wed, 1 Jul 2015 10:55:02 -0600, Ian Kelly wrote:
> On Wed, Jul 1, 2015 at 10:36 AM, Peter Pearson [wrote]:
[snip]
>> Here's a very simple demonstration that either something is wrong
>> or I don't understand how datetime and tzinfo are supposed to work:
>>
>> $ python
>> Python 2.7.3 (default,
On Mon, Jun 29, 2015, at 14:25, Terry Reedy wrote:
> Registry => Windows.
> Did you check [X] Make this my default python?
I didn't see any such checkbox, in any of installers I ran.
(And, yes, I assumed windows was implied by my subject - other systems
python runs on either don't have a notion o
On Thu, Jul 2, 2015 at 2:36 AM, Peter Pearson wrote:
> On Wed, 1 Jul 2015 17:15:38 +1000, Chris Angelico wrote:
>>
>> Interestingly, when I tried this (pytz version 2015.4, Python 2.7.9,
>> Debian Jessie), I saw utcoffset() showing (-1, 58020) for both. That
>> seems... odd. And I can't fault you
On Wed, Jul 1, 2015 at 10:36 AM, Peter Pearson
wrote:
> On Wed, 1 Jul 2015 17:15:38 +1000, Chris Angelico wrote:
>>
>> Interestingly, when I tried this (pytz version 2015.4, Python 2.7.9,
>> Debian Jessie), I saw utcoffset() showing (-1, 58020) for both. That
>> seems... odd. And I can't fault yo
On Wed, 1 Jul 2015 17:15:38 +1000, Chris Angelico wrote:
>
> Interestingly, when I tried this (pytz version 2015.4, Python 2.7.9,
> Debian Jessie), I saw utcoffset() showing (-1, 58020) for both. That
> seems... odd. And I can't fault your dates - those definitely ought to
> be easily inside and e
On 01/07/2015 14:02, beliavsky--- via Python-list wrote:
My 11yo son is taking the online class "Intermediate Programming with
Python"
http://www.artofproblemsolving.com/school/course/catalog/python2
offered by the Art of Problem Solving company (AoPS). Classes meet
for 1.5 hours a week for 12 we
I've written a C-program that embeds Python 2.7.
It has worked fine for several years using MingW or MSVC. Now I'd like
to support the python2.7.exe that comes with CygWin64.
But it seems to fail inside 'Py_InitializeEx(0)' where it just prints:
ImportError: No module named site
What? Does rea
On 01/07/15 13:00, M.-A. Lemburg wrote:
We are pleased to introduce our next keynote speaker for EuroPython
2015: *Carrie Anne Philbin*. She will be giving her keynote on Thursday,
July 23, to start the EuroPython Educational Summit:
*** https://ep2015.europython.eu/en/events/educational-summi
On Wed, Jul 1, 2015 at 8:18 AM, wrote:
> if I understood you correctly (I am not sure about which example you are
> refering), I should do the following:
> 1. check already downloaded file size in bytes = downloaded
> 2. url = 'http://video.hrt.hr/2906/otv296.mp4'
> 3. req = urllib.request.Reque
On 06/30/2015 01:33 PM, Chris Angelico wrote:
From the software's point of view, it has two distinct
modes: server, in which it listens on a socket and receives data, and
client, in which it connects to other people's sockets and sends data.
As such, the "server" mode is the only one that receiv
On Wednesday, 1 July 2015 01:43:19 UTC+2, Cameron Simpson wrote:
> On 30Jun2015 08:34, zljubi...@gmail.com wrote:
> >I would like to download a file (http://video.hrt.hr/2906/otv296.mp4)
> >If the connection is OK, I can download the file with:
> >
> >import urllib.request
> >urllib.request.urlre
On 01/07/2015 12:28, Tim Golden wrote:
On 01/07/2015 12:02, BartC wrote:
Yes, I ended up there at one point, but didn't see a win32print.py file,
Presumably, nowhere on the internet is there a ready-to-use copy of
win32print.py that someone else could just download with little effort?
If
My 11yo son is taking the online class "Intermediate Programming with Python"
http://www.artofproblemsolving.com/school/course/catalog/python2 offered by the
Art of Problem Solving company (AoPS). Classes meet for 1.5 hours a week for 12
weeks. During the classes the instructor "lectures" (types
We are pleased to introduce our next keynote speaker for EuroPython
2015: *Carrie Anne Philbin*. She will be giving her keynote on Thursday,
July 23, to start the EuroPython Educational Summit:
*** https://ep2015.europython.eu/en/events/educational-summit/ ***
About Carrie Anne Philbin
On 01/07/2015 12:02, BartC wrote:
> On 01/07/2015 11:15, Mark Lawrence wrote:
>> On 01/07/2015 09:59, BartC wrote:
>>> I need to print a text file to whatever printer in Windows is called
>>> 'Generic/Text Only'. I looked for a Python solution and come across Tim
>>> Golden's win32print module whic
On 01/07/2015 11:15, Mark Lawrence wrote:
On 01/07/2015 09:59, BartC wrote:
I need to print a text file to whatever printer in Windows is called
'Generic/Text Only'. I looked for a Python solution and come across Tim
Golden's win32print module which looks perfect, eg:
http://timgolden.me.uk/pyw
I’ve made several attempts to download python to my laptop, but every time I
open it, it ask to repair or uninstall. Can you assist me with downloading it?
Sent from Windows Mail--
https://mail.python.org/mailman/listinfo/python-list
I sent this to the wrong list a few hours ago. I hope I've gotten it
right this time...
=
I expect this has been asked before, but I can't find out much about it...
I'm trying to embed Python in a GTK+/C app as a scripting language and
I n
I sent this to the wrong list a few hours ago. I hope I've gotten it
right this time...
=
I expect this has been asked before, but I can't find out much about it...
I'm trying to embed Python in a GTK+/C app as a scripting language and
I n
On 01/07/2015 09:59, BartC wrote:
I need to print a text file to whatever printer in Windows is called
'Generic/Text Only'. I looked for a Python solution and come across Tim
Golden's win32print module which looks perfect, eg:
http://timgolden.me.uk/pywin32-docs/win32print.html
However, that te
I need to print a text file to whatever printer in Windows is called
'Generic/Text Only'. I looked for a Python solution and come across Tim
Golden's win32print module which looks perfect, eg:
http://timgolden.me.uk/pywin32-docs/win32print.html
However, that tells me everything I need to know
On Tue, 30 Jun 2015 23:25:01 +, Jon Ribbens wrote:
> On 2015-06-30, Steven D'Aprano wrote:
>> I don't think there has been much research into keeping at least *some*
>> security even when keys have been compromised, apart from as it relates
>> to two-factor authentication.
>
> That's because
On Wed, Jul 1, 2015 at 3:50 PM, Peter Pearson wrote:
> But look:
>
> >>> from datetime import datetime
> >>> import pytz
> >>> pacific = pytz.timezone("US/Pacific")
> >>> dt1 = datetime(2006, 11, 21, 16, 30, tzinfo=pacific) # no DST
> >>> dt2 = datetime(2006, 6, 14, 13, 0, tzin
53 matches
Mail list logo