Ian,
Thank you for mentioning about this research, really appreciate that.
Thanks.
Andriy Kornatskyy
> From: ian.g.ke...@gmail.com
> Date: Thu, 15 Nov 2012 15:46:19 -0700
> Subject: Re: Lazy Attribute
> To: python-list@python.org
>
> On Thu, Nov 15, 20
Ian,
Thank you for the comments.
> The name "attribute" is not very descriptive. Why not "lazy_attribute"
> instead?
It just shorter and still descriptive.
> If accessing the descriptor on the class object has no special
> meaning, then the custom is to return the descriptor object itself, as
Can someone explain the below behavior please?
>>> re1 = re.compile(r'(?:((?:1000|1010|1020))[ ]*?[\,]?[ ]*?){1,3}')
>>> re.findall(re_obj,'1000,1020,1000')
['1000']
>>> re.findall(re_obj,'1000,1020, 1000')
['1020', '1000']
However when I use "[\,]??" instead of "[\,]?" as below, I see a differen
On Fri, Nov 16, 2012 at 5:37 PM, Chris Angelico wrote:
> Spam filtering is nothing unique.
>
(Don't get me wrong though, that doesn't stop it from being a good
thing. It's just not a reason to use GG above all else.)
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Nov 16, 2012 at 3:10 PM, rusi wrote:
> One small addition: GG allows spam posts to be marked as spam.
>
> This feature costs a few seconds and can help everyone (if a few more
> GG users would use it)
And Gmail lets you do the exact same thing, but I almost never need to
do it, because th
Emile van Sebille wrote:
brucegoodst...@gmail.com wrote:
Using a decorator works when named arguments are not used. When named
arguments are used, unexpected keyword error is reported. Is there a
simple fix?
Extend def wrapper(*args) to handle *kwargs as well
Emile
Code:
-
from funct
On Nov 16, 2:29 am, ru...@yahoo.com wrote:
> But of course, our genius doesn't keep any records
> and the cases where he is wrong don't make as much
> impression on his memory. Further, he doesn't bother
> to check the headers on the non-crap posts. Even a
> junior-high science student could see
On 2012-11-15, Mark Lawrence wrote:
> On 15/11/2012 21:29, ru...@yahoo.com wrote:
>
> All I'll say is that when I read something on gmane via Thunderbird on
> Windows Vista on any of the 25 Python mailing lists that I subscribe to,
> I don't want to read the double spaced crap that comes from G$
On Nov 16, 3:05 am, Steven D'Aprano wrote:
> > ``1/0`` is shorter. ;-)
>
> It is also guaranteed to run, unlike assert.
Only if they actively pass the command line switch to turn it off,
which I'd assume someone intentionally using an assertion wouldn't do.
--
http://mail.python.org/mailman/li
In article ,
Nobody wrote:
> That's because the high-level routines aren't tied to DNS.
This is true.
>> gethostbyname() and getaddrinfo() use the NSS (name-service switch)
> mechanism, which is configured via /etc/nsswitch.conf. Depending upon
> configuration, hostnames can be looked up via a
brucegoodst...@gmail.com wrote:
Using a decorator works when named arguments are not used. When named arguments
are used, unexpected keyword error is reported. Is there a simple fix?
Extend def wrapper(*args) to handle *kwargs as well
Emile
Code:
-
from functools import wraps
def fix
On Saturday, November 10, 2012 10:35:12 AM UTC-5, Aahz wrote:
> In article ,
>
> Peter Otten <__pete...@web.de> wrote:
>
> >Miki Tebeka wrote:
>
> >
>
> >>> Is there a simpler way to modify all arguments in a function before using
>
> >>> the arguments?
>
> >>
>
> >> You can use a decorator
On Wed, 14 Nov 2012 20:49:19 -0500, Roy Smith wrote:
>> I'm slightly surprised that there's no way with the Python stdlib to
>> point a DNS query at a specific server
>
> Me too, including the "only slightly" part. The normal high-level C
> resolver routines (getaddrinfo/getnameinfo, or even t
On Thu, Nov 15, 2012 at 12:33 PM, Andriy Kornatskyy
wrote:
>
> A lazy attribute is an attribute that is calculated on demand and only once.
>
> The post below shows how you can use lazy attribute in your Python class:
>
> http://mindref.blogspot.com/2012/11/python-lazy-attribute.html
>
> Comments
On Thu, Nov 15, 2012 at 12:33 PM, Andriy Kornatskyy
wrote:
>
> A lazy attribute is an attribute that is calculated on demand and only once.
>
> The post below shows how you can use lazy attribute in your Python class:
>
> http://mindref.blogspot.com/2012/11/python-lazy-attribute.html
>
> Comments
On 15/11/2012 21:29, ru...@yahoo.com wrote:
All I'll say is that when I read something on gmane via Thunderbird on
Windows Vista on any of the 25 Python mailing lists that I subscribe to,
I don't want to read the double spaced crap that comes from G$.
I hence perceive a problem.
1) G$ are to
On 11/15/2012 1:48 PM, Eric Frederich wrote:
Thanks for the idea.
sys.path was the same before and after the login
Too bad. That seems to be a typical cause of import failure.
What else should I be checking?
No idea. You are working beyond my knowledge. But I might either look at
the foo-l
On 11/14/2012 04:07 PM, Steven D'Aprano wrote:
> On Wed, 14 Nov 2012 10:20:13 -0800, rurpy wrote:
I'll skip the issues already addressed by Joshua Landau.
>[...]
> I don't understand why you suggest counting setup time for the
> alternatives to Google Groups, but *don't* consider setup time for
On 15 November 2012 01:47, su29090 <129k...@gmail.com> wrote:
> I brought a python book and i'm a beginner and I read and tried to do the
> questions and I still get it wrong.
>
> How to create a program that reads an uspecified number of integers, that
> determines how many positive and negative
On 15 November 2012 17:13, Chris Kaynor wrote:
> On Thu, Nov 15, 2012 at 8:04 AM, Kevin Gullikson
> wrote:
> > Hi all,
> >
> > I am trying to make a dictionary of functions, where each entry in the
> > dictionary is the same function with a few of the parameters set to
> specific
> > parameters.
A lazy attribute is an attribute that is calculated on demand and only once.
The post below shows how you can use lazy attribute in your Python class:
http://mindref.blogspot.com/2012/11/python-lazy-attribute.html
Comments or suggestions are welcome.
Thanks.
Andriy Kornatskyy
Sorry, only saw your first response, didn't see the others.
I compiled Python 2.7.2 myself with --enable-shared
To create standalone applications that interact with this 3rd party program
your main C file instead of having a "main" function has a FOO_user_main
function.
When you link your program
Thanks for the idea.
sys.path was the same before and after the login
What else should I be checking?
On Thu, Nov 15, 2012 at 11:57 AM, Terry Reedy wrote:
> On 11/15/2012 9:38 AM, Eric Frederich wrote:
>
>> Hello,
>>
>> I created some bindings to a 3rd party library.
>> I have found that when I
I can already say that "smtplib" is not to blame. It is (mostly) unconcerned
with the internal structure of the message -- and by itself
will not empty attachments.
On the advice of a co-worker, I tried using web2py's gluon.tools.Mail. It
was easier to accomplish the attachment, and Thunderbird
On Thu, Nov 15, 2012 at 8:04 AM, Kevin Gullikson
wrote:
> Hi all,
>
> I am trying to make a dictionary of functions, where each entry in the
> dictionary is the same function with a few of the parameters set to specific
> parameters. My actual use is pretty complicated, but I managed to boil down
On Thu, 15 Nov 2012 07:56:17 -0800, Aahz wrote:
> In article , Roy Smith
> wrote:
>>In article ,
>> Dave Angel wrote:
>>>
>>> I'd also add a print statement, just to assure yourself that it's
>>> running.
>>
>>My trick to make sure something is running is to add "assert 0".
>
> ``1/0`` is shor
On 11/15/2012 9:38 AM, Eric Frederich wrote:
Hello,
I created some bindings to a 3rd party library.
I have found that when I run Python and import smtplib it works fine.
If I first log into the 3rd party application using my bindings however
I get a bunch of errors.
What do you think this 3rd p
On 2012-11-15 16:04, Kevin Gullikson wrote:
Hi all,
I am trying to make a dictionary of functions, where each entry in the
dictionary is the same function with a few of the parameters set to
specific parameters. My actual use is pretty complicated, but I managed
to boil down the issue I am havin
In article ,
Tim Golden wrote:
>On 14/11/2012 00:33, Ali Akhavan wrote:
>>
>> I am trying to open a file in 'w' mode open('file', 'wb'). open()
>> will throw with IOError with errno 13 if the file is locked by
>> another application or if user does not have permission to open/write
>> to the file
In article ,
Roy Smith wrote:
>In article ,
> Dave Angel wrote:
>>
>> I'd also add a print statement, just to assure yourself that it's running.
>
>My trick to make sure something is running is to add "assert 0".
``1/0`` is shorter. ;-)
--
Aahz (a...@pythoncraft.com) <*> htt
Hello,
I created some bindings to a 3rd party library.
I have found that when I run Python and import smtplib it works fine.
If I first log into the 3rd party application using my bindings however I
get a bunch of errors.
What do you think this 3rd party login could be doing that would affect the
On Thursday, November 15, 2012 3:21:52 PM UTC+1, Alister wrote:
> doing it that way means that it will only call test when executed
> directly & not when imported as a module
I see, thanks!
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, November 15, 2012 2:43:26 PM UTC+1, Ulrich Eckhardt wrote:
> Should that be "return c" instead of "c" on a line?
oh it is just a silly example function, the functionality is not important. It
does not have to return anything...
> For a start, I would try to actually call the functio
On Thu, 15 Nov 2012 05:46:49 -0800, chip9munk wrote:
> On Thursday, November 15, 2012 2:44:22 PM UTC+1, Martin P. Hellwig
> wrote:
>> I assume you have at the end of the debugTest.py file something like
>> this:
>> if __name__ == '__main__':
>>test()
>
> no i did not have it...
>
> is main r
Am 15.11.2012 13:29, schrieb chip9m...@gmail.com:
I have a python module, lets call it debugTest.py.
and it contains:
def test():
a=1
b=2
c=a+b
c
so as simple as possible.
Should that be "return c" instead of "c" on a line?
Now I would like to debug it in eclipse.. (I h
In article ,
Dave Angel wrote:
> I'd also add a print statement, just to assure yourself that it's running.
My trick to make sure something is running is to add "assert 0".
To be fair, I usually start by adding a print statement, as Dave
suggests. If I see the output, I know it ran. But if
On Thursday, November 15, 2012 2:44:22 PM UTC+1, Martin P. Hellwig wrote:
> I assume you have at the end of the debugTest.py file something like this:
> if __name__ == '__main__':
>test()
no i did not have it...
is main really necessary?
--
http://mail.python.org/mailman/listinfo/python-li
On Thursday, November 15, 2012 2:42:09 PM UTC+1, Dave Angel wrote:
> Add a call to test() to the end of the file, and it might do better.
>
> I'd also add a print statement, just to assure yourself that it's running.
>
>
thanks, that is it, (stupid me) now if I have many functions in the model
On Thursday, November 15, 2012 1:49:22 PM UTC+1, Roy Smith wrote:
> Heh. It took me a while to realize that the subject line was not
> referring to
> http://en.wikipedia.org/wiki/Solar_eclipse_of_November_13,_2012
:))
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, 15 November 2012 12:29:04 UTC, chip...@gmail.com wrote:
> Hi all!
>
>
>
> I have a stupid problem, for which I cannot find a solution...
>
>
>
> I have a python module, lets call it debugTest.py.
>
>
>
> and it contains:
>
> def test():
>
> a=1
>
> b=2
>
> c=a
On 11/15/2012 07:29 AM, chip9m...@gmail.com wrote:
> Hi all!
>
> I have a stupid problem, for which I cannot find a solution...
>
> I have a python module, lets call it debugTest.py.
>
> and it contains:
> def test():
> a=1
> b=2
> c=a+b
> c
>
> so as simple as possible.
>
> Now I w
In article ,
chip9m...@gmail.com wrote:
> Now I would like to debug it in eclipse..
Heh. It took me a while to realize that the subject line was not
referring to
http://en.wikipedia.org/wiki/Solar_eclipse_of_November_13,_2012
--
http://mail.python.org/mailman/listinfo/python-list
Hi all!
I have a stupid problem, for which I cannot find a solution...
I have a python module, lets call it debugTest.py.
and it contains:
def test():
a=1
b=2
c=a+b
c
so as simple as possible.
Now I would like to debug it in eclipse.. (I have pydev and all)
so the question is h
Am 17.09.2012 04:28 schrieb Jadhav, Alok:
Thanks Dave for clean explanation. I clearly understand what is going on
now. I still need some suggestions from you on this.
There are 2 reasons why I was using self.rawfile.read().split('|\n')
instead of self.rawfile.readlines()
- As you have seen, t
- Original Message -
> Hi,
> I have a question about Django. I easy_installed Django1.4 and
> psycopg2, and python manage.py syncdb. And gave me a error; No
> module named psycopg2.extensions. posgre9.1 is installed.
> It works fine on my MAC but not my Windows. Does anyone know about
> t
On Wednesday, November 7, 2012 5:52:36 PM UTC+1, Martha Morrigan wrote:
> Hi guys,
>
>
>
> Using python, wxpython and sqlite in a windows system, Im trying to
>
> print some certificates/diplomas/cards with a image at background with
>
> the name of person/text over it.
>
>
>
> I know the b
46 matches
Mail list logo