Who can give me some practical tutorials on django 1.4 or 1.5?
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
In article <509441cb$0$29967$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
>On Fri, 02 Nov 2012 04:20:20 -0700, Jason Benjamin wrote:
>>
>> Anybody know of the appropriate place to troll and flame about various
>> Python related issues? I'm kind of mad about some Python stuff and I
In article ,
wrote:
>
>def options( heaps ):
>
>if heaps == []: return []
>
>head, tail = heaps[:1], heaps[1:]
>
># Calculate all possible moves which is the sum of
># prepending all possible head "moves" to the tail
># and appending all possible tail "moves" to the
In article <50959154$0$6880$e4fe5...@news2.news.xs4all.nl>,
Hans Mulder wrote:
>On 3/11/12 20:41:28, Aahz wrote:
>> In article <50475822$0$6867$e4fe5...@news2.news.xs4all.nl>,
>> Hans Mulder wrote:
>>> On 5/09/12 15:19:47, Franck Ditter wrote:
- I should have said that I work with Pyt
In article <50959827$0$29967$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
>
>Actually, for many applications, the space "savings" may actually be
>*costs*, since interning forces Python to hold onto strings even after
>they would normally be garbage collected.
That's old news,
In article ,
Chris Angelico wrote:
>On Sun, Nov 4, 2012 at 2:10 PM, Steven D'Aprano
> wrote:
>>
>> /* Shortcut for empty or interned objects */
>> if (v == u) {
>> Py_DECREF(u);
>> Py_DECREF(v);
>> return 0;
>> }
>> result = unicode_compare(u, v);
>>
>> where v and u are pointers to t
Le 04/11/12 03:27, kapetanovic.zer...@gmail.com a écrit :
> Hi,
>
> I'm using Qt Designer to create a GUI that reads data from a file and plots
> in on a graph. I downloaded the Qt Developer and followed the directions in
> the readme.txt to add the plugins. My issue is that when I open Qt Design
On Sun, Nov 4, 2012 at 2:10 PM, Steven D'Aprano
wrote:
> /* Shortcut for empty or interned objects */
> if (v == u) {
> Py_DECREF(u);
> Py_DECREF(v);
> return 0;
> }
> result = unicode_compare(u, v);
>
> where v and u are pointers to the unicode object.
There's a shortcut if they're t
On Sun, 04 Nov 2012 01:14:29 +, Oscar Benjamin wrote:
> On 3 November 2012 22:50, Chris Angelico wrote:
>> This one I haven't checked the source for, but ISTR discussions on this
>> list about comparison of two unequal interned strings not being
>> optimized, so they'll end up being compared
Hi,
I'm using Qt Designer to create a GUI that reads data from a file and plots in
on a graph. I downloaded the Qt Developer and followed the directions in the
readme.txt to add the plugins. My issue is that when I open Qt Designer the
graphing widgets are not there to use.
I was hoping to ge
On Sun, Nov 4, 2012 at 12:14 PM, Oscar Benjamin
wrote:
> On 3 November 2012 22:50, Chris Angelico wrote:
>> This one I haven't checked the source for, but ISTR discussions on
>> this list about comparison of two unequal interned strings not being
>> optimized, so they'll end up being compared cha
On 3 November 2012 22:50, Chris Angelico wrote:
> This one I haven't checked the source for, but ISTR discussions on
> this list about comparison of two unequal interned strings not being
> optimized, so they'll end up being compared char-for-char. Using 'is'
> guarantees that the check stops with
On Sun, Nov 4, 2012 at 9:18 AM, Steven D'Aprano
wrote:
> On Sat, 03 Nov 2012 22:49:07 +0100, Hans Mulder wrote:
> Actually, for many applications, the space "savings" may actually be
> *costs*, since interning forces Python to hold onto strings even after
> they would normally be garbage collected
In article <50959154$0$6880$e4fe5...@news2.news.xs4all.nl>,
Hans Mulder wrote:
> That's a matter of perspective: in my book, the primary advantage of
> working with interned strings is that I can use 'is' rather than '=='
> to test for equality if I know my strings are interned. The space
> sav
Forwarded to python list:
Original Message
Subject:Re: Negative array indicies and slice()
Date: Sat, 03 Nov 2012 15:32:04 -0700
From: Andrew Robinson
Reply-To: andr...@r3dsolutions.com
To: Ian Kelly <>
On 11/01/2012 05:32 PM, Ian Kelly wrote:
On Thu,
On Sat, 03 Nov 2012 22:49:07 +0100, Hans Mulder wrote:
> On 3/11/12 20:41:28, Aahz wrote:
>> [got some free time, catching up to threads two months old]
>>
>> In article <50475822$0$6867$e4fe5...@news2.news.xs4all.nl>, Hans Mulder
>> wrote:
>>> On 5/09/12 15:19:47, Franck Ditter wrote:
>>>
On 3/11/12 20:41:28, Aahz wrote:
> [got some free time, catching up to threads two months old]
>
> In article <50475822$0$6867$e4fe5...@news2.news.xs4all.nl>,
> Hans Mulder wrote:
>> On 5/09/12 15:19:47, Franck Ditter wrote:
>>>
>>> - I should have said that I work with Python 3. Does that matte
[got some free time, catching up to threads two months old]
In article <50475822$0$6867$e4fe5...@news2.news.xs4all.nl>,
Hans Mulder wrote:
>On 5/09/12 15:19:47, Franck Ditter wrote:
>>
>> - I should have said that I work with Python 3. Does that matter ?
>> - May I reformulate the queston : "a i
Ian Kelly wrote:
> On Fri, Nov 2, 2012 at 1:19 PM, wrote:
>> Is there anything anyone could recommend to make it more "Pythonic"
>> or more functional. It looks clumsy next to the Haskell.
>
> def options(heaps):
> for i, heap in enumerate(heaps):
> head = heaps[:i]
> tai
Tim,
Good point. b32decode seems to be capable to understand such common mistakes
(see map01 argument to b32decode), I haven't tried:
http://docs.python.org/2/library/base64.html
Thanks.
Andriy
> Date: Sat, 3 Nov 2012 10:34:26 -0500
> From: python.l..
On Sat, 03 Nov 2012 10:24:15 -0400, Dave Angel wrote:
> For the DOS world, real programmers have written a "complete" *.com
> program using only echo.
Echo? Wimps. Real programmers write their code directly on the surface of
the hard drive using only a magnetised needle.
--
Steven
--
http:/
Roy,
Per your advise:
>>> from base64 import b32encode
>>> human_format = lambda n: 'Z%s-%s' % (b32encode(chr((n >> 24) & 255) +
>>> chr((n >> 16) & 255))[:4], b32encode(chr((n >> 8) & 255) + chr(n &
>>> 255))[:4])
>>> human_format(5738521581)
'ZKYFA-4PWQ'
>>> human_format(17888279480)
'ZFI4Q-
On Sun, Nov 4, 2012 at 1:24 AM, Dave Angel wrote:
> For the DOS world, real programmers have written a "complete" *.com
> program using only echo.
Only as an exercise. It was satisfying to prove to myself that I could
do it, but pretty useless. Normally I used DEBUG.EXE to build my code
- it has
On 11/03/12 08:22, Roy Smith wrote:
> Even better might be base-32 encoding the value. Strings of
> digits have an information density of about 3.2 bits/char.
> Base-32 is just about as readable, but gives you 5 bits/char, so
> you end up with a few less characters (which you still want to
> chunk
On 11/02/2012 03:13 PM, Andriy Kornatskyy wrote:
>
> Requirements for `account number` generator:
>
> 1. Issue pseudo random consistent number (must be unique for dozen millions
> of records)
> 2. Easy check validity (without a need to make a database call)
>
> Interested? Read more here:
>
>
On 11/03/2012 03:44 AM, Bob Martin wrote:
>
>>
> Real programmers (can) write in assembler.
Real programmers can (and have) write in hex/octal or binary. For my
first project at a permanent job, I had to write code for a machine with
no assembler. Near the end of the project, I wrote a text edi
What is Islam?
In this episode Shaikh Yusuf Estes Explains the meaning of Islam in
detail.
http://youtube.googleapis.com/v/Gl-wuhzOkpo?rel=0
thank you
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Andriy Kornatskyy wrote:
> 'Z05738521581'
> 'Z17888279480'
> 'Z07395350007'
>
> Short, human readable and satisfy original requirements.
>
> Andriy
If you really want human readable, it's better to chunk the data up into
3 or 4 digit groups. So, instead of Z05738521581, maybe
OK, the story so far:
import gdata
import gdata.auth
import gdata.gauth
import gdata.docs.service
import OpenSSL.crypto
tokenfile = "privatekey.p12"
#f = open(tokenfile, 'r')
#blob = f.read()
#f.close()
#if blob:
p12 = OpenSSL.crypto.load_pkcs12(file(tokenfile, 'rb').read(), 'notasecret')
print
OK, maybe the p12 file is useful after all (?) I've got the following code:
import gdata
tokenfile = "my-privatekey.p12"
f = open(tokenfile, 'r')
blob = f.read()
f.close()
token = gdata.gauth.token_from_blob(blob)
When I run that I get:
Traceback (most recent call last):
File "/home/mcarter/wa
I want to mess around with my online Google spreadsheets from my Linux box
programmatically. I am TOTALLY confused.
I've got gdata installed, and it appears that the best way to access the
spreadsheets is to authenticate with Oauth2.
Here's the main thing: how do I get an Oauth2 key to use with
Hi Stefan
On 2012-W44-5, at 19:23, Stefan H. Holek wrote:
> That said, there are ways to avoid import cycles. One is to very carefully
> craft your modules so they do not have to import from each other. Another is
> to not have imports at the module level, but move them into the functions
> wh
i have install pyOpenSSL-0.11 in python2.7 this way:
download pyOpenSSL-0.11.tar.gz
#tar -zvxf pyOpenSSL-0.11.tar.gz
#cd pyOpenSSL-0.11
#python setup.py install
>>> import OpenSSL
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/OpenS
Hi Terry
On 2012-W44-5, at 18:56, Terry Reedy wrote:
>> or would you maybe structure the library entirely different?
>
> Based on my limited experience with subpackages* plus reports on this list
> about problems, such as yours, I have concluded that subpackages are an
> attractive nuisance th
Steven, see below, please.
> From: steve+comp.lang.pyt...@pearwood.info
> Subject: Re: How to generate account number?
> Date: Fri, 2 Nov 2012 22:39:31 +
> To: python-list@python.org
>
> On Sat, 03 Nov 2012 00:13:19 +0300, Andriy Kornatskyy wrote:
>
>>
>>> from hashlib import sha1
>>> sha1('GangGreene-20120203-1012').hexdigest()
'ef764a2fe44532008dc9a99c391c70cd85ec9d82'
It is too long and not verifiable.
>>> from uuid import uuid4
>>> uuid4()
UUID('2c14484b-5a0c-4f4b-b7bc-8187548b4888')
Pretty much the same what you suggest but simpler and
Steven D'Aprano schreef op de 2e dag van de slachtmaand van het jaar 2012:
> On Fri, 02 Nov 2012 23:22:53 +0100, Peter Kleiweg wrote:
>
> > In Python 3.1 and 3.2
> >
> > At start-up, the value of sys.stdin.newlines is None, which means,
> > universal newline should be enabled. But it isn't.
>
>
Jose, absolutely, let me know should you have any issues.
Andriy
> Date: Fri, 2 Nov 2012 15:29:13 -0600
> Subject: Re: How to generate account number?
> From: josen.figue...@unixmexico.org
> To: andriy.kornats...@live.com
> CC: python-list@python.org
>
> Hello An
Steven D'Aprano wrote:
> On Fri, 02 Nov 2012 23:22:53 +0100, Peter Kleiweg wrote:
>
>> In Python 3.1 and 3.2
>>
>> At start-up, the value of sys.stdin.newlines is None, which means,
>> universal newline should be enabled. But it isn't.
>
> What makes you think it is not enabled?
$ python3 -c '
On Saturday, 27 October 2012 03:12:31 UTC+5:30, Tycho Andersen wrote:
> On Fri, Oct 26, 2012 at 05:36:50PM -0400, Dave Angel wrote:
>
> > On 10/26/2012 05:26 PM, Tycho Andersen wrote:
>
> > > Assuming it's the length of the list that's the problem, not the
>
> > > length of the strings in the l
in 684220 20121102 093654 Jamie Paul Griffin wrote:
>/ ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:08:26 -0700 /
>
>> On 11/01/2012 03:55 AM, Jamie Paul Griffin wrote:
>> > Anybody serious about programming should be using a form of
>> > UNIX/Linux if you ask me. It's inconceivable that these sys
41 matches
Mail list logo