On Tuesday, September 2, 2014 9:43:52 PM UTC+3, Chris Kaynor wrote:
> Also, depending on the use-case, binascii.crc32 might also work fine:
> https://docs.python.org/2/library/binascii.html#binascii.crc32
>
>
>
>
> import binascii
> def calc_crc(data):
> return binascii.crc32(data)
>
>
>
Steven D'Aprano writes:
> ...
> I'm not an expert, but that sounds like a fault at the server end. I just
> tried it in Chrome, and it worked, and then with wget, and I get the same
> sort of error:
> ...
> Sounds like if the server doesn't recognise the browser, it gets
> confused and ends up in
On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > I have trouble to implement crc algorithm in python 3.3
>
> >
>
> > c version work perfect. I try to use bytes, int and c_types without any
>
> > success can some who help me:
>
>
>
On Wednesday, September 3, 2014 7:14:14 AM UTC+5:30, Steven D'Aprano wrote:
> Grant Edwards wrote:
> > I missed the beginning of the thread, but Why are you comparing things
> > to True and False?
> I don't understand why people do it, but it's *incredibly* common. A couple
> of weeks ago at work
On Tue, Sep 2, 2014 at 3:45 AM, Chris Angelico wrote:
> Considering how easy it is to deploy a multi-line edit widget in any
> GUI toolkit, it shouldn't be too hard to write a GUI text editor.
Coincidentally, I was annoyed enough to write the following program
sometime last week. I was sick of m
On 9/2/2014 8:34 PM, Curtis Clauson wrote:
On 8/29/2014 10:13 PM, Terry Reedy wrote:
Please file an issue on the tracker reporting the problem (you are not
the first!) and your suggested solutions and add steve.dower as nosy. He
is a MS employee - Python volunteer who has very recently assumed
m
On 9/2/2014 5:36 PM, Chris Angelico wrote:
On Wed, Sep 3, 2014 at 7:14 AM, Terry Reedy wrote:
import tkinter as tk
root = tk.Tk()
text = tk.Text()
text.pack()
root.mainloop()
I tested tested the functions and wrote the following.
This is a test text entry.
Enter and Tab work as expected.
The
Grant Edwards wrote:
> I missed the beginning of the thread, but Why are you comparing things
> to True and False?
I don't understand why people do it, but it's *incredibly* common. A couple
of weeks ago at work, I had to (gently, in a friendly manner) mock one of
our most senior and accomplished
On Tuesday, September 2, 2014 8:29:32 PM UTC-4, Fabio Zadrozny wrote:
> On Tue, Sep 2, 2014 at 2:27 PM, Wanderer wrote:
>
>
>
>
> I'm trying to set up Eclipse with PyDev and I can't get the code analysis to
> work the way I want.
>
>
>
> Whenever I type 'def' it generates an error before I
On 8/29/2014 10:13 PM, Terry Reedy wrote:
Please file an issue on the tracker reporting the problem (you are not
the first!) and your suggested solutions and add steve.dower as nosy. He
is a MS employee - Python volunteer who has very recently assumed
maintenance of the msi installer. He wants t
On Tue, Sep 2, 2014 at 2:27 PM, Wanderer wrote:
>
> I'm trying to set up Eclipse with PyDev and I can't get the code analysis
> to work the way I want.
>
> Whenever I type 'def' it generates an error before I finish the line. I
> don't want to see errors until I finish typing. It's not an error I
On Wed, Sep 3, 2014 at 7:14 AM, Terry Reedy wrote:
> import tkinter as tk
> root = tk.Tk()
> text = tk.Text()
> text.pack()
> root.mainloop()
>
> I tested tested the functions and wrote the following.
>
> This is a test text entry.
> Enter and Tab work as expected.
> The Arrow (Cursor) keys work a
On 9/2/2014 4:45 AM, Chris Angelico wrote:
On Tue, Sep 2, 2014 at 6:35 PM, alister
wrote:
if edlin is your only option then it would be better to spend you time
writhing your own text editor!
Heh!
Considering how easy it is to deploy a multi-line edit widget in any
GUI toolkit, it shouldn't
On Tue, 02 Sep 2014 16:13:39 -0400, Seymore4Head
wrote:
>I still can't get the syntax
>test='Hey buddy get away from my car'
>if test[0].alpha():
>return True
I have a huge head cold right now. Never mind the question.
Sorry
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Sep 2, 2014 at 3:13 PM, Seymore4Head
wrote:
> I still can't get the syntax
> test='Hey buddy get away from my car'
> if test[0].alpha():
> return True
>
My guess is you meant isalpha(), as Mark indicated. Here's a cheap way to
see what an object can do:
>>> test='Hey buddy get away
On 02/09/2014 21:13, Seymore4Head wrote:
I still can't get the syntax
test='Hey buddy get away from my car'
if test[0].alpha():
return True
isalpha?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.p
On Wed, Sep 3, 2014 at 6:13 AM, Seymore4Head
wrote:
> I still can't get the syntax
> test='Hey buddy get away from my car'
> if test[0].alpha():
> return True
If that's not in a function, "return" makes no sense, as the
SyntaxError will have told you. As to the actual check, that's
isalpha(),
On 9/2/14 4:13 PM, Seymore4Head wrote:
I still can't get the syntax
test='Hey buddy get away from my car'
if test[0].alpha():
return True
A really good skill to learn early on is how to ask for help. You need
to tell us what you expected it to do, and also what it did that
displeased y
I still can't get the syntax
test='Hey buddy get away from my car'
if test[0].alpha():
return True
--
https://mail.python.org/mailman/listinfo/python-list
Also, depending on the use-case, binascii.crc32 might also work fine:
https://docs.python.org/2/library/binascii.html#binascii.crc32
import binascii
def calc_crc(data):
return binascii.crc32(data)
Much simpler.
Chris
On Tue, Sep 2, 2014 at 11:24 AM, Peter Otten <__pete...@web.de> wrote:
dream4s...@gmail.com wrote:
> I have trouble to implement crc algorithm in python 3.3
>
> c version work perfect. I try to use bytes, int and c_types without any
> success can some who help me:
ctypes is for interfacing with C; don't use it in regular code.
> c version:
>
> unsigned short cal
On Tuesday 02 September 2014 12:30:58 Rob Gaddi did opine
And Gene did reply:
> On Sat, 30 Aug 2014 23:39:01 -0700 (PDT)
>
> Nicholas Cannon wrote:
> > I really enjoy engineering at school and we make like fighting robots
> > and stuff(simple stuff of course) and i really enjoy it. I have got
> >
Dear all,
I have trouble to implement crc algorithm in python 3.3
c version work perfect. I try to use bytes, int and c_types without any success
can some who help me:
c version:
unsigned short calc_crc(const void *p_dat, int l_dat){
unsigned char *dat_ptr;
int loopc;
I'm trying to set up Eclipse with PyDev and I can't get the code analysis to
work the way I want.
Whenever I type 'def' it generates an error before I finish the line. I don't
want to see errors until I finish typing. It's not an error I'm just not done
yet. So I try to turn this off by going
On Tue, 2 Sep 2014 16:43:09 + (UTC), Grant Edwards
wrote:
>On 2014-08-30, Tim Chase wrote:
>> On 2014-08-30 14:27, Seymore4Head wrote:
>>> I really tried to get this without asking for help.
>>>
>>> mylist = ["The", "earth", "Revolves", "around", "Sun"]
>>> print (mylist)
>>> for e in mylis
On 2014-08-30, Tim Chase wrote:
> On 2014-08-30 14:27, Seymore4Head wrote:
>> I really tried to get this without asking for help.
>>
>> mylist = ["The", "earth", "Revolves", "around", "Sun"]
>> print (mylist)
>> for e in mylist:
>>
>> # one of these two choices should print something. Since ne
On 2014-08-29, Joel Goldstick wrote:
> On this list I use reply all (using gmail) because reply takes the
> first recipient, which is the poster. I am on another list where this
> isn't true.
It's because of people like you that people like me post with invalid
addresses in the headers. But th
On Sat, 30 Aug 2014 23:39:01 -0700 (PDT)
Nicholas Cannon wrote:
> I really enjoy engineering at school and we make like fighting robots and
> stuff(simple stuff of course) and i really enjoy it. I have got a raspberry
> pi and a decent understanding of python and i want to do make stuff like RC
14 aug 2014 kl. 19:54 skrev Chris “Kwpolska” Warrick :
> On 14 August 2014 18:51 "Richard Prosser" wrote:
> >
> > I "need" one for use with Flask, as I don't really have time to implement
> > my own.
>
> You should not implement things on your own if there are existing and same
> implementati
On Tue, Sep 2, 2014 at 6:35 PM, alister
wrote:
> if edlin is your only option then it would be better to spend you time
> writhing your own text editor!
Heh!
Considering how easy it is to deploy a multi-line edit widget in any
GUI toolkit, it shouldn't be too hard to write a GUI text editor. Now
On Mon, 01 Sep 2014 15:06:04 -0500, Tim Chase wrote:
> On 2014-09-02 04:23, Steven D'Aprano wrote:
>> Read $VISUAL, if it exists, otherwise $EDITOR, if it exists, otherwise
>> fall back on something hard coded. Or read it from an ini file. Or
>> create an entry in the register. Whatever. That's up
On Tue, 02 Sep 2014 02:08:47 -0400, Sumit Ray wrote:
> Hi,
>
> I've tried versions of the following but continue to get errors:
>
> - snip -
> url = 'https://www.usps.com/send/official-abbreviations.htm'
> request = urllib2.build_opener(urllib2.HTTPRedirectHandler).open
On 02/09/2014 04:02, Chris Angelico wrote:
These tips may help. (Though on Windows, where port 80 requires no
special privileges, it's more likely for a proxy to use that than it
is under Unix. So it's entirely possible it is actually on 80.) But
what I'm seeing is a problem with environment var
33 matches
Mail list logo