On 2016-03-08, justin walters wrote:
> Well, from that error message, it seems like you may have a permissions
> issue.
If that's true then it means the Python 3.5 installer is broken.
However, I don't think it is true as actually running Python presents
no problems. There's some bug in virtualen
On 08/03/2016 02:45, Mark Lawrence wrote:
On 08/03/2016 01:47, BartC wrote:
The Python timing for that file is around 20 seconds, time enough to
read 1 copies from the disk.
And a C program reads /and decodes/ the same file from the same disk in
between 0.1 and 0.2 seconds.
So how much
On 08/03/2016 02:47, MRAB wrote:
On 2016-03-08 01:33, BartC wrote:
Compared with 2.7, 3.4 above is spending nearly an extra ten seconds
doing what? I can't understand why someone just wouldn't care.
Part of it will be that Python 2 has 2 integer types: 'int' (fixed
length) and 'long' (v
BartC writes:
> On 08/03/2016 02:47, MRAB wrote:
>> On 2016-03-08 01:33, BartC wrote:
>
>>> Compared with 2.7, 3.4 above is spending nearly an extra ten seconds
>>> doing what? I can't understand why someone just wouldn't care.
>>>
>> Part of it will be that Python 2 has 2 integer types: 'int
On 08/03/2016 02:12, Steven D'Aprano wrote:
On Tue, 8 Mar 2016 09:39 am, BartC wrote:
I'm using it because this kind of file reading in Python is a mess. If I
do a read, will I get a string, a byte sequence object, a byte-array, or
array-array, or what?
Calling it "a mess" is an exaggeration
On 08/03/2016 11:45, Jussi Piitulainen wrote:
BartC writes:
On 08/03/2016 02:47, MRAB wrote:
On 2016-03-08 01:33, BartC wrote:
Compared with 2.7, 3.4 above is spending nearly an extra ten seconds
doing what? I can't understand why someone just wouldn't care.
Part of it will be that P
On 08.03.16 04:12, Steven D'Aprano wrote:
[steve@ando ~]$ python3.3 -m timeit -s 'from fp import
Float' 'Float("1234.567")'
10 loops, best of 3: 13.6 usec per loop
[steve@ando ~]$ python/python-dev/3.5/python -m timeit -s 'from fp import
Float' 'Float("1234.567")'
1 loops, best of 3: 54
On 08.03.16 03:34, Steven D'Aprano wrote:
Chris, I think that's exactly what BartC has done: he has a program that he
actually uses, one which processes JPG files. It's written in pure Python,
so he's not comparing the quality of C libraries, he's comparing Python
versus Python.
I haven't looked
On 03/07/2016 11:51 PM, Fillmore wrote:
learning Python from Perl here. Want to do things as Pythonicly as
possible.
I am reading a TSV, but need to skip the first 5 lines. The following
works, but wonder if there's a more pythonc way to do things. Thanks
ctr = 0
with open(prfile,mode="rt",enc
On 08/03/2016 04:40, Steven D'Aprano wrote:
On Tuesday 08 March 2016 12:41, BartC wrote:
On 08/03/2016 01:19, Steven D'Aprano wrote:
On Tue, 8 Mar 2016 07:19 am, BartC wrote:
I don't have to hand a jpeg file that it can't
decode.
Run this under Python 2:
from random import randint
blob =
Although I've enabled setting the path when installing 3.5.1 (Win7 x64) I can't
run Python from the command line in a terminal window. It works OK on a
Raspberry Pi 3!
Leon
--
Leon Heller
G1HSM
--
https://mail.python.org/mailman/listinfo/python-list
On 08/03/2016 11:09, BartC wrote:
On 08/03/2016 02:45, Mark Lawrence wrote:
On 08/03/2016 01:47, BartC wrote:
The Python timing for that file is around 20 seconds, time enough to
read 1 copies from the disk.
And a C program reads /and decodes/ the same file from the same disk in
between
On 08/03/2016 13:49, BartC wrote:
On 08/03/2016 04:40, Steven D'Aprano wrote:
On Tuesday 08 March 2016 12:41, BartC wrote:
Nevertheless, in the real world, you have to deal with corrupt JPGs and
files mislabelled as JPGs. And "crashing" doesn't count as "deal with"
:-)
OK, I changed the 'rais
Hello
lst = [(1,2,3), (4, 5,6)]
sum(lst, ())
(1, 2, 3, 4, 5, 6)
Any explanations ?
thx
--
https://mail.python.org/mailman/listinfo/python-list
ast writes:
> Hello
>
lst = [(1,2,3), (4, 5,6)]
sum(lst, ())
> (1, 2, 3, 4, 5, 6)
>
> Any explanations ?
(() + (1,2,3)) + (4,5,6)
--
https://mail.python.org/mailman/listinfo/python-list
"Jussi Piitulainen" a écrit dans le message de
news:lf58u1t53sb@ling.helsinki.fi...
ast writes:
Hello
lst = [(1,2,3), (4, 5,6)]
sum(lst, ())
(1, 2, 3, 4, 5, 6)
Any explanations ?
(() + (1,2,3)) + (4,5,6)
yes, ty
--
https://mail.python.org/mailman/listinfo/python-list
"ast" a écrit dans le message de
news:56defc8e$0$3341$426a7...@news.free.fr...
Hello
lst = [(1,2,3), (4, 5,6)]
sum(lst, ())
(1, 2, 3, 4, 5, 6)
Any explanations ?
thx
OK, sorry, I finally understand.
This is because adding tuple (or list or string ...) is a concatenation
() + (1,2,3) + (
My apologies, but I really don't want to argue with you. You may want to be
a bit more humble when asking for help.
On Mar 8, 2016 2:31 AM, "Jon Ribbens" wrote:
> On 2016-03-08, justin walters wrote:
> > Well, from that error message, it seems like you may have a permissions
> > issue.
>
> If th
Correct me if I'm wrong, but don't python generators usually use the yield
statement so they can be used in list comprehensions?
On Mar 8, 2016 5:27 AM, "jmp" wrote:
> On 03/07/2016 11:51 PM, Fillmore wrote:
>
>>
>> learning Python from Perl here. Want to do things as Pythonicly as
>> possible.
>
On 2016-03-08, justin walters wrote:
> My apologies, but I really don't want to argue with you.
That's nice to know. I didn't ask you to, but it's great to have your
input anyway.
> You may want to be a bit more humble when asking for help.
I wasn't asking for help. HTH.
--
https://mail.python
On 08/03/2016 16:49, justin walters wrote:
Correct me if I'm wrong, but don't python generators usually use the yield
statement so they can be used in list comprehensions?
Please don't top post on this list, thanks.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what y
On 03/08/2016 05:49 PM, justin walters wrote:
Correct me if I'm wrong, but don't python generators usually use the yield
statement so they can be used in list comprehensions?
Hello,
Please don't top post.
Generator expressions are different from generator functions. They are
both generators
Sorry about the top posting. I'm new to mailing lists. I should just reply
to the python-list@python.org address then?
Also, thank you for the generator clarification.
On Mar 8, 2016 9:09 AM, "jmp" wrote:
> On 03/08/2016 05:49 PM, justin walters wrote:
>
>> Correct me if I'm wrong, but don't pyt
On Mon, Mar 7, 2016 at 6:41 PM, Jon Ribbens
wrote:
> On 2016-03-07, Ian Kelly wrote:
>> On Mon, Mar 7, 2016 at 11:51 AM, Jon Ribbens
>> wrote:
>>> I must say that Python on Windows was a very poor experience indeed,
>>> "virtualenv" does not work and "venv" refuses to create the 'activate'
>>> sh
justin walters writes:
> Sorry about the top posting. I'm new to mailing lists. I should just reply
> to the python-list@python.org address then?
>
> Also, thank you for the generator clarification.
> On Mar 8, 2016 9:09 AM, "jmp" wrote:
^ that's top posting always reply inline or at the bo
On 2016-03-08, Ian Kelly wrote:
> On Mon, Mar 7, 2016 at 6:41 PM, Jon Ribbens
> wrote:
>> It's not activate.bat, it's activate (no file extension) the posix
>> shell script. I installed Git for Windows which provides bash (or
>> something that looks like it). Python venv doesn't cope with this
>>
On Tue, Mar 8, 2016 at 10:56 AM, Jon Ribbens
wrote:
> The only things I can think of that are at all 'weird' are that there
> are spaces in the filenames, and there's more than one drive. But
> the former of those is utterly standard for Windows, and the latter
> doesn't really even rise to the le
On 2016-03-08, Ian Kelly wrote:
> On Tue, Mar 8, 2016 at 10:56 AM, Jon Ribbens
> wrote:
>> The only things I can think of that are at all 'weird' are that there
>> are spaces in the filenames, and there's more than one drive. But
>> the former of those is utterly standard for Windows, and the latt
On 08/03/2016 16:15, Mark Lawrence wrote:
On 08/03/2016 13:49, BartC wrote:
On 08/03/2016 04:40, Steven D'Aprano wrote:
On Tuesday 08 March 2016 12:41, BartC wrote:
Nevertheless, in the real world, you have to deal with corrupt JPGs and
files mislabelled as JPGs. And "crashing" doesn't count a
On 08/03/2016 16:09, Mark Lawrence wrote:
On 08/03/2016 11:09, BartC wrote:
On 08/03/2016 02:45, Mark Lawrence wrote:
On 08/03/2016 01:47, BartC wrote:
The Python timing for that file is around 20 seconds, time enough to
read 1 copies from the disk.
And a C program reads /and decodes/ t
We are happy to announce a program for people in need of financial aid
to attend EuroPython.
You can find all the details on our financial aid page:
*** https://ep2016.europython.eu/en/registration/financial-aid/ ***
Financial Aid Program
In short, we will be givin
On 08/03/2016 19:15, BartC wrote:
On 08/03/2016 16:09, Mark Lawrence wrote:
On 08/03/2016 11:09, BartC wrote:
On 08/03/2016 02:45, Mark Lawrence wrote:
On 08/03/2016 01:47, BartC wrote:
The Python timing for that file is around 20 seconds, time enough to
read 1 copies from the disk.
An
Were you able to solve this problem? I am also seeing this
On Thursday, March 20, 2014 at 2:22:19 PM UTC-4, lagu...@mail.com wrote:
> Portable Python 2.7 for Windows, the Python application have dependency on
> ssdeep-2.10, which is a binary exe.
>
> The ssdeep (libfuzzy) installation example wa
On 08/03/2016 20:44, Mark Lawrence wrote:
On 08/03/2016 19:15, BartC wrote:
Surely the start-up time would be the same no matter what the input.
Unless all of the background jobs are kicking in when you're testing. I
assume that you do take such factors into account, by repeating your
test
On Tue, 8 Mar 2016 10:53 pm, BartC wrote:
> On 08/03/2016 02:12, Steven D'Aprano wrote:
>> On Tue, 8 Mar 2016 09:39 am, BartC wrote:
>
>>> I'm using it because this kind of file reading in Python is a mess. If I
>>> do a read, will I get a string, a byte sequence object, a byte-array, or
>>> arra
On Wed, 9 Mar 2016 04:19 am, Ian Kelly wrote:
> On Mon, Mar 7, 2016 at 6:41 PM, Jon Ribbens
> wrote:
>> On 2016-03-07, Ian Kelly wrote:
>>> On Mon, Mar 7, 2016 at 11:51 AM, Jon Ribbens
>>> wrote:
I must say that Python on Windows was a very poor experience indeed,
Indeed. Development on Wi
On Wed, 9 Mar 2016 06:15 am, BartC wrote:
[...]
> But this was hardly necessary as it was so obvious: it takes 150ms to
> process a 300-pixel image, 20 seconds for a 2Mpixel one, and (I have to
> switch to PyPy here as I've never had time to hang about for it) 180
> seconds for 80Mpixel file.
>
>
On Wed, 9 Mar 2016 12:49 am, BartC wrote:
>> Nevertheless, in the real world, you have to deal with corrupt JPGs and
>> files mislabelled as JPGs. And "crashing" doesn't count as "deal with"
>> :-)
>
> OK, I changed the 'raise' line to 'exit(0)'. Job done!
Possibly a really amateurish, lazy job
On Wed, Mar 9, 2016 at 10:52 AM, Steven D'Aprano wrote:
>> Well, running bash on Windows is decidedly non-standard. This is like
>> installing a Python package on a Linux system and then complaining
>> that it won't run under wine. I don't think that Python should be
>> expected to provide an acti
On 08/03/2016 23:28, Steven D'Aprano wrote:
On Tue, 8 Mar 2016 10:53 pm, BartC wrote:
Python 2 Python 3
Text mode 'str' 'str'
Binary mode 'bytes''str'
That table is incorrect. In Python 2, bytes is just an alias for str:
[steve@ando ~]$ python2.7
On Wed, Mar 9, 2016 at 11:09 AM, BartC wrote:
> On 08/03/2016 23:28, Steven D'Aprano wrote:
>>
>> Here it is in a table form:
>>
>>
>> Mode Python 2 Python 3
>>
>> Text bytes text
>> Binarybytes bytes
>> ---
On 03/07/2016 05:45 PM, Chris Angelico wrote:
> On Tue, Mar 8, 2016 at 11:22 AM, BartC wrote:
>>
>> (Is a byte string the same as a byte array? Is a byte array the same as an
>> array.array? If I remove this line from my code, where 'data' has just been
>> read from a file:
>>
>>data=array.arr
On Wed, Mar 9, 2016 at 11:34 AM, Michael Torrie wrote:
> On 03/07/2016 05:45 PM, Chris Angelico wrote:
>> On Tue, Mar 8, 2016 at 11:22 AM, BartC wrote:
>>>
>>> (Is a byte string the same as a byte array? Is a byte array the same as an
>>> array.array? If I remove this line from my code, where 'da
On 03/07/2016 11:34 AM, BartC wrote:
> (I'm quite pleased with my version: smaller, faster, works on all the
> Pythons, supports all 3 colour formats and no decoding bugs that I'm
> aware of, and it's the first Python program I've written that does
> something useful.)
I think you should be com
On 3/8/2016 8:47 AM, leon_heller--- via Python-list wrote:
Although I've enabled setting the path when installing 3.5.1 (Win7
x64) I can't run Python from the command line in a terminal window.
It works OK on a Raspberry Pi 3!
If you type 'PATH' at the command prompt, what is the response?
--
On Tue, Mar 8, 2016 at 5:13 PM, Chris Angelico wrote:
> On Wed, Mar 9, 2016 at 10:52 AM, Steven D'Aprano wrote:
>>> Well, running bash on Windows is decidedly non-standard. This is like
>>> installing a Python package on a Linux system and then complaining
>>> that it won't run under wine. I don'
On 09/03/2016 00:04, Steven D'Aprano wrote:
On Wed, 9 Mar 2016 12:49 am, BartC wrote:
Nevertheless, in the real world, you have to deal with corrupt JPGs and
files mislabelled as JPGs. And "crashing" doesn't count as "deal with"
:-)
OK, I changed the 'raise' line to 'exit(0)'. Job done!
Po
Hello -
This may seem like an odd request for the main python google group, but I
thought this question might have answers coming from different backgrounds that
utilize python.
I'm trying to find a way of rendering an optical distortion on a video I will
be presenting through the use of a hea
semeon.ri...@gmail.com writes:
> This may seem like an odd request for the main python google group
(Note that this is not a Google group. Google may be presenting this
forum to you, but it's not exclusive to Google and many of us don't
participate there.)
> but I thought this question might hav
On Wed, Mar 9, 2016 at 12:32 PM, wrote:
> This may seem like an odd request for the main python google group, but I
> thought this question might have answers coming from different backgrounds
> that utilize python.
>
> I'm trying to find a way of rendering an optical distortion on a video I wi
On Wed, 9 Mar 2016 11:34 am, Michael Torrie wrote:
> There are some interesting differences I found between a Python 2 string
> (composed of bytes) and a Python 3 byte string, such as what you'd get
> from calling read() on a file handle opened in binary mode. That is in
> Python 2, indexing a st
On Wed, 9 Mar 2016 12:28 pm, BartC wrote:
> (Which wasn't as painful as I'd expected. However the next project I
> have in mind is 20K lines rather than 0.7K. For that I'm looking at some
> mechanical translation I think. And probably some library to wrap around
> Python's i/o.)
You almost certai
Dear Group,
I am trying to write a code for pulling data from MySQL at the backend and
annotating words and trying to put the results as separated sentences with each
line. The code is generally running fine but I am feeling it may be better in
the end of giving out sentences, and for small dat
On Wednesday 09 March 2016 12:52, Chris Angelico wrote:
> On Wed, Mar 9, 2016 at 12:32 PM, wrote:
>> This may seem like an odd request for the main python google group, but I
>> thought this question might have answers coming from different
>> backgrounds that utilize python.
>>
>> I'm trying to
On Wednesday 09 March 2016 15:18, subhabangal...@gmail.com wrote:
> I am trying to copy the code here, for your kind review.
>
> import MySQLdb
> import nltk
> def sql_connect_NewTest1():
This function says that it connects to the SQL database, but actually does
much more. It does too much. Spl
What is the return value of `exec`? Would that object be then used to
iterate the sequence in 'a'? I'm reading this:
https://www.python.org/download/releases/2.2.3/descrintro/
--
https://mail.python.org/mailman/listinfo/python-list
"Veek. M" writes:
> What is the return value of `exec`?
You can refer to the documentation for questions like that.
https://docs.python.org/3/library/functions.html#exec>
> Would that object be then used to iterate the sequence in 'a'?
The ‘for’ or ‘while’ statements are correct for iteration.
On Wednesday 09 March 2016 16:27, Veek. M wrote:
> What is the return value of `exec`? Would that object be then used to
> iterate the sequence in 'a'? I'm reading this:
> https://www.python.org/download/releases/2.2.3/descrintro/
exec is a statement, not a function, so it doesn't have a return
Steven D'Aprano :
> Possibly a really amateurish, lazy job, but still done.
>
> [...] Brilliant! I love helpful tools like that!
>
> How many years did you say you have been programming?
Let's keep it civil, please.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
> "Veek. M" writes:
>
>> What is the return value of `exec`?
>
> You can refer to the documentation for questions like that.
> https://docs.python.org/3/library/functions.html#exec>
>
>> Would that object be then used to iterate the sequence in 'a'?
>
> The ‘for’ or ‘while’
Steven D'Aprano wrote:
> On Wednesday 09 March 2016 16:27, Veek. M wrote:
>
>> What is the return value of `exec`? Would that object be then used to
>> iterate the sequence in 'a'? I'm reading this:
>> https://www.python.org/download/releases/2.2.3/descrintro/
>
>
> exec is a statement, not a f
On Wed, Mar 9, 2016 at 5:25 PM, Veek. M wrote:
> ah, okay - i'm familiar with the py3 syntax where you do:
> eval('whatever stmt', globals={}, locals={})
> I suppose this: exec " " in NS; syntax is strictly py2?
>
> Many thanks :)
Yeah, that's one of the things that was cleaned up in Py3. Several
Hello
Python path may be read with:
import sys
sys.path
There is an environnement variable $PYTHONPATH (windows)
to set if you want to add some additionnal directories to the
path.
But the default path seems not to be stored in any environnement
variable. Is it correct ? Is it stored somewhe
hi ,
l would like to ask a question as l m a little bit confused .l do practice in
"how to think like a computer scientist:learning with python3.l installed
python 2.7.10 and upper version 3.5 python.when l run example code in the book
, it gave me error.you can find the code , below.
""
impor
While MySQL doesn't have server side cursor, MySQLdb has SSCursor class.
https://github.com/PyMySQL/mysqlclient-python/blob/master/MySQLdb/cursors.py#L551
Default cursor fetches MySQL response at once and convert them into Python
object.
SSCursor fetches MySQL response row by row. So it saves Pyt
65 matches
Mail list logo