[RELEASE] py-sanction 0.1-alpha

2012-07-07 Thread Demian Brecht
py-sanction is an OAuth2 lean client library that can be used with a number of OAuth2 providers (currently *lightly* tested with Facebook, Google and Foursquare). Looking for feedback/bug reports before declaring beta/release. Current version is also available on PyPI.

[RELEASE] sanction 0.1.2 - dead easy OAuth2 client

2012-07-07 Thread Demian Brecht
sanction is a lightweight, dead simple client implementation of the OAuth2 protocol. The major goals of the library are: Support multiple providers -- Most providers have varying levels of diversion from the official spec. The goal with this library is to either handle

Digging into multiprocessing

2013-08-12 Thread Demian Brecht
, -- Demian Brecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Digging into multiprocessing

2013-08-14 Thread Demian Brecht
Awesome, thanks for the detailed response Chris. On Tue, Aug 13, 2013 at 8:03 AM, Chris Angelico ros...@gmail.com wrote: On Tue, Aug 13, 2013 at 12:17 AM, Demian Brecht demianbre...@gmail.com wrote: Hi all, Some work that I'm doing atm is in some serious need of parallelization

Metaclass/abc hackery

2013-10-11 Thread Demian Brecht
if something like that's available... Not likely something that would be used very often, but would likely sometimes be useful. Thanks, -- *Demian Brecht *http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Class construction

2013-10-21 Thread Demian Brecht
insight would help :) Thanks, -- Demian Brecht http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Conditional breakpoints in ceval.c

2013-11-08 Thread Demian Brecht
if [?] Thanks, -- Demian Brecht http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Conditional breakpoints in ceval.c

2013-11-12 Thread Demian Brecht
taken at Python and has been quite enjoyable and fulfilling (my /god/ I'm a nerd ;)). You never /can/ really push the boundaries with your tools without wholly understanding them. -- Demian Brecht http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Re: google api and oauth2

2012-09-25 Thread Demian Brecht
This is a shameless plug, but if you want a much easier to understand method of accessing protected resources via OAuth2, I have a 55 LOC client implementation with docs and examples here: https://github.com/demianbrecht/sanction (Google is one of the tested providers with an access example). Are

Re: google api and oauth2

2012-09-26 Thread Demian Brecht
If you are writing a desktop application, read this: https://developers.google.com/accounts/docs/OAuth2#clientside You mean https://developers.google.com/accounts/docs/OAuth2#installed? Your link discusses client side browser implementations. I'd be curious to know the shortcomings of

Re: google api and oauth2

2012-09-26 Thread Demian Brecht
Yes, dealing with the embedded web server is out of the scope of the library and not something that I'd want to introduce. Having said that, there wouldn't be any harm in a sanction-embedded library that would add that capability. Thanks for the info. --

Re: #!/usr/bin/env python vs. #!/usr/bin/python?

2012-09-28 Thread Demian Brecht
if Python is installed via Windows installers (as long as it's on system PATH). Tremendously useful if you're bouncing between *nix and Windows regularly. -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: REST code-golf: How concisely can you expose and consume services?

2012-09-28 Thread Demian Brecht
win ;) I much prefer code golf that tests algorithmic/core language feature knowledge. Of course, that's entirely only my opinion. -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [fcgi.py] Force cache upgrade?

2012-09-28 Thread Demian Brecht
If you don't have access to restart Apache (or `x` server), then touch fcgi.py *should* work. On Fri, Sep 28, 2012 at 2:57 PM, Gilles nos...@nospam.com wrote: Hello Does someone know if something must be done after editing a FastCGI + WSGI script so that the changes will show in the browser

Re: creating an artificial last element in sort list

2012-09-28 Thread Demian Brecht
Maybe l = filter(a, lambda v: v == a[-1]) sorted(a[:-len(l)]) + l ? On Fri, Sep 28, 2012 at 4:51 PM, dave davidrey...@gmail.com wrote: more clearer, this is a more realistic use case: ['awefawef', 'awefawfsf', 'awefsdf', 'zz', 'zz', 'zz'] and the

Re: creating an artificial last element in sort list

2012-09-28 Thread Demian Brecht
of a, but that's a naive stab at it anyway. -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: creating an artificial last element in sort list

2012-09-28 Thread Demian Brecht
f = filter(lambda s: s == a[-1], a) That line's assuming that the last element may also be found in arbitrary locations in the list. If it's guaranteed that they're all contiguous at the upper bounds, I'd just walk the list backwards until I found one that wasn't matching rather than

Re: creating an artificial last element in sort list

2012-09-28 Thread Demian Brecht
On Fri, Sep 28, 2012 at 8:29 PM, Ian Kelly ian.g.ke...@gmail.com wrote: The slicing operation in the second line assumes that they're all collected at the end of the list anyway. True enough. Hadn't considered otherwise when I first whipped that off with the first example (thinking/trying it

Re: unit testing class hierarchies

2012-10-02 Thread Demian Brecht
[1] in C++ I would call that a mixin Mixins are perfectly valid Python constructs as well and are perfectly valid (imho) for this use case. On a side note, I usually append a Mixin suffix to my mixin classes in order to make it obvious to the reader. -- Demian Brecht @demianbrecht http

Are ABCs an anti-pattern?

2012-10-02 Thread Demian Brecht
essential in non-duck-typed language using strict OOP, but does it *really* belong in Python? -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: unit testing class hierarchies

2012-10-02 Thread Demian Brecht
Am I missing something? Is there something that wasn't answered by my reply about using mixins? from unittest import TestCase class SharedTestMixin(object): def test_shared(self): self.assertNotEquals('foo', 'bar') class TestA(TestCase, SharedTestMixin): def test_a(self):

Re: unit testing class hierarchies

2012-10-02 Thread Demian Brecht
Am I missing something? Is there something that wasn't answered by my reply about using mixins? from unittest import TestCase class SharedTestMixin(object): def test_shared(self): self.assertNotEquals('foo', 'bar') class TestA(TestCase, SharedTestMixin): def test_a(self):

Re: local variable 'a' referenced b

2012-10-02 Thread Demian Brecht
module, then you don't have to worry about documenting the side effects on 'a' so users (including yourself) aren't confused later: def foo(): ... a = 1 ... def bar(n): ... b = 2 ... return n + b ... a = bar(a) ... print a ... foo() 3 -- Demian Brecht

Re: local variable 'a' referenced b

2012-10-03 Thread Demian Brecht
One problem with short examples is they mask the reason for the code to be structured that way. Couldn't agree more (I don't think I've ever written a nested function outside a closure). I made the assumption that the OP wasn't asking about closures based on his code samples. In hindsight,

Re: Are ABCs an anti-pattern?

2012-10-03 Thread Demian Brecht
ABCs were added (fairly recently) in 3.0 for the reasons given in http://python.org/dev/peps/**pep-3119/http://python.org/dev/peps/pep-3119/ It was expected that it would take awhile for them to see good, pythonic uses. We obviously did okay without them up to 2.7. I read the PEP before

Re: How to create a login screen using core python language without using any framework

2012-10-05 Thread Demian Brecht
As well as others. For a comprehensive list of protection that Django offers, check out https://docs.djangoproject.com/en/dev/topics/security/. -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Are ABCs an anti-pattern?

2012-10-06 Thread Demian Brecht
statement, I know :)). Again, please don't misunderstand my intentions here. I'm not arguing the need for abstract base classes in a strict OOP world. I'm arguing them as not genuinely being Pythonic. Thanks for your the feedback so far. -- Demian Brecht @demianbrecht http

Re: Private methods

2012-10-09 Thread Demian Brecht
the function such that it's only accessible strictly by name through the class that it's define in. Note that you *can* still access it if you understand how name mangling works. Nothing in Python is truly private. -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org

Re: Private methods

2012-10-09 Thread Demian Brecht
On 12-10-09 04:51 PM, Steven D'Aprano wrote: Really? I tend to view name mangling as a waste of time, and complex inheritance structures as something to avoid. Yep, I've been coming around to this as of late. -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http

Re: MySQL with Python

2012-10-15 Thread Demian Brecht
-python.sourceforge.net/MySQLdb.html. Another solution is to use SQLAlchemy (http://www.sqlalchemy.org/). The ORM abstracts a lot of the tedious SQL queries out for you and allows you to concentrate more on your application's logic. -- Demian Brecht @demianbrecht http://demianbrecht.github.com -- http

Re: Fastest web framework

2012-10-16 Thread Demian Brecht
Let me say right off the bat that I've taken a brief look through the code and documentation and found that I wouldn't mind trying it out for personal projects. So, the intention here is not to slag the framework. Performance and effectivity are related metrics. Longer feature list can not

Re: OT Questions

2012-10-16 Thread Demian Brecht
On 10/15/2012 9:05 PM, Dwight Hutto wrote: Like a lot of people here, I'm trying to build a web development business. I'm starting off by building a profile on a freelance site. I would like some honest opinions(don't be too harsh), about my approach. I'm looking for a team effort to analyze my

Re: Which book is the best?

2012-10-16 Thread Demian Brecht
On 10/15/2012 9:27 PM, 老爷 wrote: I have strong c++ development experience. But now I want to study the python to do some windows setting task, such as editing file, changing the system setting, doing some network processing. Please help me which book is the best? Thanks. If you're already

Re: OT Questions

2012-10-16 Thread Demian Brecht
On 10/16/2012 8:13 AM, Jean-Michel Pichavant wrote: Search deep inside your heart, and you'll realize you already know the answer to that question :o) JM There's a small light somewhere deep down that says maybe this is just someone quite misdirected. A brief search shows that he has

Re: Fastest web framework

2012-10-16 Thread Demian Brecht
On 10/16/2012 7:47 AM, Andriy Kornatskyy wrote: I think that my first batch of questions were slightly out of context, mostly due to a lack of caffeine first thing in the morning. My understanding at the time was that your an answer to effectivity was, in fact, a list of highlights for

Re: OT Questions

2012-10-17 Thread Demian Brecht
This is my prototype portfolio for freelancing. If you have an honest critique, then what, in your opinion, am I good at? https://www.odesk.com/users/~01710ac049863018eb I can't ascertain what your strengths are as I don't work with you on a daily basis (one of the many benefits of working

Re: A desperate lunge for on-topic-ness

2012-10-18 Thread Demian Brecht
3. Say well, at least it's not a backslash and break the line using parentheses. This. More times than not, there's a function call in that line, which makes sense to me when reading it if the args are on the next line. 4. Spend 45 minutes trying to think up shorter [but still sensible]

len() on mutables vs. immutables

2012-10-18 Thread Demian Brecht
I'm curious as to the implementation (I'd be happy to dig through the source, just don't have the time right now). I've seen various implementations across interpreters in the past (some which have been rather shocking) and I'd like to get some insight into Python (well, CPython at this point

Re: len() on mutables vs. immutables

2012-10-18 Thread Demian Brecht
On 10/18/2012 11:28 AM, Nick Cash wrote: It appears that list has len() complexity of O(1) source: http://wiki.python.org/moin/TimeComplexity It may be worth mentioning that lists in Python are implemented using arrays instead of linked lists. It's reasonable to assume that other built-in

Re: len() on mutables vs. immutables

2012-10-18 Thread Demian Brecht
On 10/18/2012 11:29 AM, Terry Reedy wrote: Or the length could be the difference of two pointers -- address of the first empty slot minus address of first item. That would assume contiguous blocks of memory, which I would find to be rather dangerous (of an assumption that is) in most dynamic

Re: len() on mutables vs. immutables

2012-10-18 Thread Demian Brecht
On Thu, Oct 18, 2012 at 12:43 PM, Daniel Urban urban.d...@gmail.com wrote: The source is usually in Objects/*object.c (e.g., the source for list is in Objects/listobject.c, dict is in dictobject.c and so on). The implementation of __len__ is usually in a method called whatever_length (e.g.,

Re: A desperate lunge for on-topic-ness

2012-10-19 Thread Demian Brecht
On 2012-10-18, at 6:34 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Flame away :) This post made my Friday, even though I'm sitting on a nearly two hour bus ride into work because I missed my commuter train. Just wanted you to know ;) You noted *every* reason (and them

Re: Fast forward-backward (write-read)

2012-10-23 Thread Demian Brecht
640k… Right? Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Split single file into multiple files based on patterns

2012-10-23 Thread Demian Brecht
with: with open('file path', 'w') as f: f.write('data') Not only is it shorter, but it automatically closes the file once you've come out of the inner block, whether successfully or erroneously. Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman

Re: turn list of letters into an array of integers

2012-10-23 Thread Demian Brecht
in s.strip('\n').split()] list_ ['1', '2', '1', '2', '2', '1'] Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: turn list of letters into an array of integers

2012-10-23 Thread Demian Brecht
On 2012-10-23, at 10:45 PM, Demian Brecht demianbre...@gmail.com wrote: list_ = [d[c] for c in s.strip('\n').split()] list_ ['1', '2', '1', '2', '2', '1'] Of course, if you want these to be ints, then you can either change the format of your int list, or map(int, list_) if you don't have

Re: turn list of letters into an array of integers

2012-10-24 Thread Demian Brecht
going to sleep now. :P Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Appending a list using list obtained from a class

2012-10-24 Thread Demian Brecht
the docs: http://docs.python.org/release/2.3/lib/module-UserList.html) Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Appending a list using list obtained from a class

2012-10-24 Thread Demian Brecht
asking how to do.. Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Appending a list using list obtained from a class

2012-10-24 Thread Demian Brecht
the same in the same loop its showing me numbers which i want. Why I dont know ?? If you can, please post the relevant blocks of code. That'll be a tremendous help in figuring out your problem. Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman

Re: turn list of letters into an array of integers

2012-10-24 Thread Demian Brecht
On 2012-10-24, at 10:27 AM, wxjmfa...@gmail.com wrote: Not so sure what you mean by an array of integers. I wasn't entirely sure about that either. I assumed given the subject that it was just a 1-D array and could then be accessed by arr[(y * width) + x]. Demian Brecht @demianbrecht http

Re: SSH Connection with Python

2012-10-25 Thread Demian Brecht
for. I've heard nothing but good things about it. Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Shipping python modules - best practices?

2012-10-27 Thread Demian Brecht
very much in advance. Regards rambius -- http://mail.python.org/mailman/listinfo/python-list Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Shipping python modules - best practices?

2012-10-27 Thread Demian Brecht
requirements. On 2012-10-27, at 2:39 PM, Demian Brecht demianbre...@gmail.com wrote: 1) IMHO, these should be two distinct steps. You will definitely want to run unit tests without sdist and likewise, I'm sure you'll want to sdist without unit tests. Personally, if I wanted to combine the two, I'd

Re: OT Questions

2012-10-28 Thread Demian Brecht
You haven't been on lists long enough then to have seen some real flame warts...no offense. No offense taken, it's why I said it in the first place ;) Having said that, generally engaging in flame wars solves nothing and sheds a negative light on the individuals who take part in it. It's

Multi-dimensional list initialization

2012-11-04 Thread Demian Brecht
off. Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: No more Python support in NetBeans 7.0

2012-11-04 Thread Demian Brecht
On 2012-11-04, at 4:45 PM, bkube...@gmail.com wrote: However I am not happy about having to use different IDEs as I find myself coding in both python and php from project to project. One of the many reasons Vim is my editor of choice. Demian Brecht @demianbrecht http

Re: Multi-dimensional list initialization

2012-11-05 Thread Demian Brecht
On 2012-11-04, at 10:44 PM, Andrew Robinson andr...@r3dsolutions.com wrote: but I think you meant: m = [[None] * 4, [None] * 4, [None] * 4, [None] *4 ] rather than: m = [[None] * 4, [None] * 4, [None] * 4, [None * 4]] Yes, I meant the former, thanks for catching the typo. Demian Brecht

Re: Multi-dimensional list initialization

2012-11-05 Thread Demian Brecht
.. *That's* gotta be why). Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Multi-dimensional list initialization

2012-11-06 Thread Demian Brecht
to be inconsistent to treat expressions such as [[obj]*4]*4 un-semantically (Pythonically speaking) and making it *less* intuitive. I agree that Python would definitely be worse off. Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python

Re: Invalid syntax

2012-11-07 Thread Demian Brecht
(collection[i][0], MAT[0], TSD[0], AnnTMin[0], ANNPREC[0], float(collection[i][2]), float(collection[i][1])) Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Lazy Attribute

2012-11-16 Thread Demian Brecht
with their own implementations on a bi-weekly basis, I am seriously wondering how to improve its visibility. Putting it on PyPI alone does not cut it, apparently. This was a good start ;) Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python

Re: unpacking first few items of iterable

2012-12-13 Thread Demian Brecht
If you're using python3, you can simply do: a, b, c, *rest = myiterable Demian Brecht http://demianbrecht.github.com On 2012-12-13 11:37 AM, Daniel Fetchinson fetchin...@googlemail.com wrote: Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom

ANN: stepford 0.1 release

2013-11-20 Thread Demian Brecht
as possible for apps requiring integration with the Facebook Graph API. Stepford is a Python implementation of the Facebook test user API as defined at https://developers.facebook.com/docs/test_users. Documentation can be found at: http://pythonhosted.org/stepford/ -- Demian Brecht http

ABC hackery

2013-12-12 Thread Demian Brecht
for anything outside of POC :) -- Demian Brecht http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Using a subclass for __dict__

2014-02-13 Thread Demian Brecht
I missing something here, or do I just have to live with what I currently have in my gist? Thanks, -- Demian Brecht http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Using a subclass for __dict__

2014-02-13 Thread Demian Brecht
metaclass *Throws keyboard across the office* FFS. I could have SWORN I tried that (because I /know/ that a class is an instance of its metaclass :/). An instance of looking at something far too long without a fresh set of eyes. Thanks! -- Demian Brecht http://demianbrecht.github.com -- https

Re: OAuth 2.0 implementation

2012-07-05 Thread Demian Brecht
FWIW, this package has undergone a major overhaul (474 LOC down to much happier 66) and is available at https://github.com/demianbrecht/sanction. Also available from PyPI. -- http://mail.python.org/mailman/listinfo/python-list

Re: OAuth 2.0 implementation

2012-07-05 Thread Demian Brecht
On Thursday, 5 July 2012 08:19:41 UTC-7, Alec Taylor wrote: On Fri, Jul 6, 2012 at 12:06 AM, Demian Brecht demianbre...@gmail.com wrote: FWIW, this package has undergone a major overhaul (474 LOC down to much happier 66) and is available at https://github.com/demianbrecht/sanction. Also

Re: OAuth 2.0 implementation

2012-07-06 Thread Demian Brecht
Supported provider list (with example code) is now: * Facebook * Google * Foursquare * bitly * GitHub * StackExchange * Instagram Other providers may also be supported out of the box, but have been untested thus far. -- http://mail.python.org/mailman/listinfo/python-list

RE: OAuth 2.0 implementation

2012-07-06 Thread Demian Brecht
...@gmail.com] Sent: Friday, July 06, 2012 11:42 AM To: Demian Brecht Cc: comp.lang.pyt...@googlegroups.com; python-list@python.org Subject: Re: OAuth 2.0 implementation On Sat, Jul 7, 2012 at 1:38 AM, Demian Brecht demianbre...@gmail.com wrote: Supported provider list (with example code) is now

Re: Python Interview Questions

2012-07-09 Thread Demian Brecht
On Monday, 9 July 2012 10:40:59 UTC-7, Tim Chase wrote: On 07/09/12 08:25, Roy Smith wrote: On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote: - more detailed questions about the std. libraries (such as datetime/email/csv/zipfile/networking/optparse/unittest) You need

Re: Python Interview Questions

2012-07-10 Thread Demian Brecht
I also judge candidates on their beards (http://www.wired.com/wiredenterprise/2012/06/beard-gallery/). If the beard's awesome enough, no questions needed. They're pro. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6 and Sqlite3 - Slow

2012-08-27 Thread Demian Brecht
Is there a reason that you're using SQLite in a network environment rather than a database server? -- http://mail.python.org/mailman/listinfo/python-list

[ANN] JOSE

2014-04-16 Thread Demian Brecht
by the JOSE framework. Code: https://github.com/Demonware/jose Docs: http://jose.readthedocs.org/en/latest PyPI: https://pypi.python.org/pypi/jose -- Demian Brecht http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use SQLite (sqlite3) more efficiently

2014-06-04 Thread Demian Brecht
On Thu, Jun 5, 2014 at 6:27 AM, ps16thypresence wrote: I'm completely new to SQL, and recently started using SQLite in one of my Python programs. Unrelated to Python but as you're new to SQL I figured I'd ask: Do you have an index on the name field? If you don't, you'll incur a full

Token-based authentication (was http.server.BaseHTTPRequestHandler basic auth logout? Django authentication system for REST interface?)

2014-06-07 Thread Demian Brecht
On Jun 6, 2014 6:30 PM, Roy Smith r...@panix.com wrote: We would have to keep state on the server side about every extant valid token (but then again, we need to do that now, for each session). If you didn't want to have to manage such state server side, you could opt to use JWTs

OAuth 2.0 implementation

2012-03-26 Thread Demian Brecht
Hi all, I'm getting close to an alpha release of an OAuth 2.0 implementation (https://github.com/demianbrecht/py-sanction). High level features include: * Support for multiple providers (protocol deviations). This didn't seem to be supported by any library. * Actually an OAuth 2.0

Re: OAuth 2.0 implementation

2012-03-26 Thread Demian Brecht
On Monday, 26 March 2012 21:24:35 UTC-7, Ben Finney wrote: Roy Smith r...@panix.com writes: In article 878vimhfdp@benfinney.id.au, Ben Finney ben+pyt...@benfinney.id.au wrote: So, if I want to be free to choose an identity provider I trust, and it's not Facebook or Google or

Re: OAuth 2.0 implementation

2012-03-27 Thread Demian Brecht
On Tuesday, 27 March 2012 07:18:26 UTC-7, Roy Smith wrote: In article 7909491.0.1332826232743.JavaMail.geo-discussion-forums@pbim5, Demian Brecht demianbre...@gmail.com wrote: OAuth 2.0 is still in draft status (draft 25 is the current one I believe) and yes, unfortunately every

Re: PEP8 and 4 spaces

2014-07-03 Thread Demian Brecht
On Jul 3, 2014 10:31 AM, Tobiah tshep...@rcsreg.com wrote: Just need ammo for when the hammer of code unification comes down. One issue that I've encountered in the past (one of the reasons outside of pep8) that I switched to spaces is when working with libraries other than your own. If you want

From git to hg

2014-08-02 Thread Demian Brecht
with potentially more interested people making the same transition) -- Demian Brecht http://demianbrecht.github.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Thought of the day

2013-01-14 Thread Demian Brecht
I love getting that what's up with this guy when I start chuckling so hard that I nearly spit out my coffee first thing Monday morning. Thank you sir, this has given my week a bright start :) Demian Brecht http://demianbrecht.github.com On 2013-01-13 8:16 PM, Steven D'Aprano steve

Re: Thought of the day

2013-01-14 Thread Demian Brecht
Š And I hope you don't mindŠ I may very well borrow this as my e-mail sig. Comedic gold imo. Demian Brecht http://demianbrecht.github.com On 2013-01-13 8:16 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: A programmer had a problem, and thought Now he has I know, I'll solve

ANN - bold, a Pelican theme

2013-02-04 Thread Demian Brecht
Looking for a new Pelican theme? Look no further than https://github.com/demianbrecht/pelican-bold Still a little rough around the edges, feel free to fork and contribute. (Using it for my personal blog, and yes, I'm very much aware that the content needs some lovin' :)) Demian Brecht http

Re: Curious to see alternate approach on a search/replace via regex

2013-02-06 Thread Demian Brecht
with the result of: alongnameofasite1234567_com_q_sports_run_a_1_b_1 1288 function calls in 0.004 seconds Compared to regex method: 498 function calls (480 primitive calls) in 0.000 seconds I'd prefer the regex method myself. Demian Brecht http://demianbrecht.github.com On 2013-02-06 1

Re: Curious to see alternate approach on a search/replace via regex

2013-02-06 Thread Demian Brecht
python -m cProfile [script_name].py http://docs.python.org/2/library/profile.html#module-cProfile Demian Brecht http://demianbrecht.github.com On 2013-02-06 2:30 PM, richard_hubbe11 richard_hubb...@lavabit.com wrote: I see that urlparse uses split and not re at all and, in my tests

Re: Curious to see alternate approach on a search/replace via regex

2013-02-07 Thread Demian Brecht
On 2013-02-06 7:04 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I dispute those results. I think you are mostly measuring the time to print the result, and I/O is quite slow. Good call, hadn't even considered that. My tests show that using urlparse is 33% faster than using

Re: len() on mutables vs. immutables

2013-02-07 Thread Demian Brecht
to be reporting the shape of the 0th dim at the moment.. Or is there something that I'm missing altogether? Thanks, Demian Brecht http://demianbrecht.github.com On 2012-10-18 5:26 PM, Terry Reedy tjre...@udel.edu wrote: On 10/18/2012 2:42 PM, Demian Brecht wrote: Awesome. Pretty much what I figured

memoryview (was len() on mutables vs. immutables)

2013-02-07 Thread Demian Brecht
On 2013-02-07 8:30 PM, Terry Reedy tjre...@udel.edu wrote: So you may assume I've been bitten far too many times by incorrect assumptions about implementations that ended up actually doing something quite silly. Having said that, I felt fairly safe in making that assumption with Python, but

Re: memoryview (was len() on mutables vs. immutables)

2013-02-08 Thread Demian Brecht
This helped clarify, thanks. I also went through PEP 3118 in detail (as I should have in the first place) which also helped. Thanks, Demian Brecht http://demianbrecht.github.com On 2013-02-08 6:50 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: This is in keeping with the way

buffers and memoryviews

2013-02-12 Thread Demian Brecht
. In this post, I hope to give the reader a brief overview of what each is, detail some of the ugliness in 2.7 and provide useful information for those wanting to incorporate them into their work. http://demianbrecht.github.com/posts/2013/02/10/buffer-and-memoryview/ Demian Brecht http

Re: buffers and memoryviews

2013-02-12 Thread Demian Brecht
I guess I /should/ have written it with current releases.. My 3 is current dev source :P Demian Brecht http://demianbrecht.github.com On 2013-02-12 7:42 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 2013-02-12 15:25, Demian Brecht wrote: I didn't know a whole lot (read: nothing) about

Re: backporting PEP 3134 Exception Chaining and Embedded Tracebacks to Python 2.7

2013-02-19 Thread Demian Brecht
Zero. There are no new features being added to 2.7. Demian Brecht http://demianbrecht.github.com On 2013-02-19 12:54 PM, Piotr Dobrogost p...@google-groups-2013.dobrogost.net wrote: Hi! What is a chance of backporting PEP 3134 Exception Chaining and Embedded Tracebacks to Python 2.7

Re: webbrowser.open(./documentation/help.html)-- No Go in Windows

2013-02-24 Thread Demian Brecht
a Google search, returning nothing but useless noise. My default browser on Windows is Chrome, so my intention is getting undermined right from the start. How do I get a local html file to open properly from Python in Windows? -- http://mail.python.org/mailman/listinfo/python-list -- Demian

Re: webbrowser.open(./documentation/help.html)-- No Go in Windows

2013-02-24 Thread Demian Brecht
For the record, I completely misread and misunderstood the question. I should stop posting that late at night :P On Sun, Feb 24, 2013 at 1:25 AM, Demian Brecht demianbre...@gmail.com wrote: Rather than using a relative path, try using webbrowser.open('{}/documentation/help.html'.format

Re: Breaking into descriptors

2013-02-28 Thread Demian Brecht
trying it in a newly created term, cannot repro it. Gremlins. -- Demian Brecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter

2013-04-02 Thread Demian Brecht
not understand? Questions with that kind of information and showing that you've done /some/ work will likely get you helpful answers. -- Demian Brecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list

Re: im.py: a python communications tool

2013-04-05 Thread Demian Brecht
Thanks for sharing some of your work with the community. However... Speaking to the sharing aspect: Why would you post a block of code in an email? If you're looking for people to contribute, it would likely be a much better idea to post it on github (which was built for collaborative work). As

Re: im.py: a python communications tool

2013-04-09 Thread Demian Brecht
in a commercial agreement. (re: must vs. should) Legally, you are right, but I was speaking from the point of view of a judge, rather than a lawyer. Like the sheriff says: I make the law around here! lol. Mark -- http://mail.python.org/mailman/listinfo/python-list -- Demian Brecht http

  1   2   3   4   5   6   >