Am 24.05.2012 01:45, schrieb hsa...@gmail.com:
> I am trying to join an online class that uses python. I need to brush
> up on the language quickly. Is there a good book or resource that
> covers it well but does not have to explain what an if..then..else
> statement is?
First thing to check first
Fayaz Yusuf Khan wrote:
> ***TRIVIAL ISSUE***, but this has been irking me for a while now.
> The main logging.Handler class' __init__ accepts a level argument while
> none of its children do. The poor minions seem to be stuck with the
> setLevel method which considerably lengthens the code.
>
>
Hi,
I've a list of python objects with dates attributes. This list is ordered
by one of these date. Elements mandatory follow each other :
Element #1 Element #2 Element #3
|-|--|--|
Now, I want to "insert" an
>From the Zen of Python ("import this"):
Namespaces are one honking great idea -- let's do more of those!
Inspired by this, I have a decorator that abuses function closures to
create a namespace type with the following properties:
- all methods are static methods that do not take a "self" para
Thibaut DIRLIK wrote:
> Hi,
>
> I've a list of python objects with dates attributes. This list is ordered
> by one of these date. Elements mandatory follow each other :
>
> Element #1 Element #2 Element #3
> |-|--|--
Am 23.05.2012 11:30, schrieb 20_feet_tall:
> I have a problem with the visualization of korean fonts on Python.
> When I try to type in the characters only squares come out.
> I have tried to install the CJK codec, the hangul 1.0 codec but still
> no result.
What exactly do you mean with "visualiz
Fayaz Yusuf Khan wrote:
Jean-Michel Pichavant wrote:
Meanwhile you can shorten the code this way:
root.addHandler(FileHandler('debug.log'))
root.handlers[-1].setLevel(DEBUG)
Eh? Readability was the aim.
I fail to see how it's not readable, code is short and no magic is
involved pr
Jean-Michel Pichavant wrote:
> Fayaz Yusuf Khan wrote:
>> Jean-Michel Pichavant wrote:
>>
>>> Meanwhile you can shorten the code this way:
>>>
>>> root.addHandler(FileHandler('debug.log'))
>>> root.handlers[-1].setLevel(DEBUG)
>>>
>>>
>> Eh? Readability was the aim.
>>
> I fail to see h
Peter Otten wrote:
Jean-Michel Pichavant wrote:
Fayaz Yusuf Khan wrote:
Jean-Michel Pichavant wrote:
Meanwhile you can shorten the code this way:
root.addHandler(FileHandler('debug.log'))
root.handlers[-1].setLevel(DEBUG)
Eh? Readability was the aim.
Jean-Michel Pichavant wrote:
> Peter Otten wrote:
>> Jean-Michel Pichavant wrote:
>>
>>
>>> Fayaz Yusuf Khan wrote:
>>>
Jean-Michel Pichavant wrote:
> Meanwhile you can shorten the code this way:
>
> root.addHandler(FileHandler('debug.log'))
> root.
Hello,
A vendor provided a C, C++ and Java API for a application. They dont
support python so I would like to create a library for it. My question is,
how hard/easy would it be to create something like this? Is there a simple
HOWTO or examples I can follow? Can someone shed home light on this?
TI
On May 23, 5:10 pm, no1 wrote:
> Hi, we're investigating transitioning our company from matlab to python. We
> found OMPC as a MATLAB m-file-to Python translator, but we're encountering a
> problem using the translated code to import MATLAB data structures into
> Python. For example, when we sa
On Thu, May 24, 2012 at 9:58 PM, Rita wrote:
> Hello,
>
> A vendor provided a C, C++ and Java API for a application. They dont support
> python so I would like to create a library for it. My question is, how
> hard/easy would it be to create something like this? Is there a simple HOWTO
> or exampl
Hello everyone..
I am new to asp.net...
I want to use Regular Expression validator in Email id verification..
Can anyone tell me how to use this and what is the meaning of
this
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, May 24, 2012 at 10:32 PM, niks wrote:
> Hello everyone..
> I am new to asp.net...
> I want to use Regular Expression validator in Email id verification..
> Can anyone tell me how to use this and what is the meaning of
> this
> \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
This is a mailing
On May 23, 2012, at 7:45 PM, hsa...@gmail.com wrote:
> I am trying to join an online class that uses python. I need to brush up on
> the language quickly. Is there a good book or resource that covers it well
> but does not have to explain what an if..then..else statement is?
>
> Thanks.
> --
>
On Thu, 24 May 2012 05:32:16 -0700, niks wrote:
> Hello everyone..
> I am new to asp.net...
> I want to use Regular Expression validator in Email id verification..
> Can anyone tell me how to use this and what is the meaning of this
> \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
this is not reall
On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote:
> I am trying to join an online class that uses python. I need to brush up
> on the language quickly. Is there a good book or resource that covers it
> well but does not have to explain what an if..then..else statement is?
>
> Thanks.
Dive into p
> >From the Zen of Python ("import this"):
>
> Namespaces are one honking great idea -- let's do more of those!
>
>
> Inspired by this, I have a decorator that abuses function closures to
> create a namespace type with the following properties:
>
> - all methods are static methods that do not take
On 2012-05-24, alister wrote:
> On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote:
>
>> I am trying to join an online class that uses python. I need to brush up
>> on the language quickly. Is there a good book or resource that covers it
>> well but does not have to explain what an if..then..else st
On Thu, May 24, 2012 at 8:28 AM, Javier Novoa C.
wrote:
> On 2012-05-24, alister wrote:
>> On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote:
>>
>>> I am trying to join an online class that uses python. I need to brush up
>>> on the language quickly. Is there a good book or resource that covers it
I would like to pass something like this into a function
test(val1,val2,'>=')
and it should come back with True or False.
Is there a way to dynamically compare 2 values like this or will I have to code
each operator individually?
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
You can pass an operator as an argument to your function.
See :
http://docs.python.org/library/operator.html
Regards,
-- Forwarded message --
From:
Date: 2012/5/24
Subject: Dynamic comparison operators
To: python-list@python.org
I would like to pass something like thi
mlangenho...@gmail.com writes:
> I would like to pass something like this into a function
> test(val1,val2,'>=')
>
> and it should come back with True or False.
def test(x,y,c):
return c(x,y)
Call with: test(v1,v2, lambda x,y:x<=y ). A bit noisy imho.
If you have a finite number of comparis
On 05/24/12 09:32, Phil Le Bienheureux wrote:
>> I would like to pass something like this into a function
>> test(val1,val2,'>=')
>
> You can pass an operator as an argument to your function.
>
> See :
> http://docs.python.org/library/operator.html
And if you want to use strings, you can map them
Alain Ketterlin writes:
> mlangenho...@gmail.com writes:
>
> > I would like to pass something like this into a function
> > test(val1,val2,'>=')
> >
> > and it should come back with True or False.
>
> def test(x,y,c):
> return c(x,y)
>
> Call with: test(v1,v2, lambda x,y:x<=y ). A bit noisy
On Thu, May 24, 2012 at 11:45 PM, Dennis Lee Bieber
wrote:
> And maybe follow-up with a review of this monster:
> http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
That is awesome. Epic. Eyeball-bleeding.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
On 24/05/2012 10:14 AM, mlangenho...@gmail.com wrote:
I would like to pass something like this into a function
test(val1,val2,'>=')
and it should come back with True or False.
Is there a way to dynamically compare 2 values like this or will I have to code
each operator individually?
Would so
Dzien dobry!
Dziekujemy bardzo za zainteresowanie pozycja regionalnego przedstawiciela dostepna obecnie w Polsce i krajach Europy Srodkowej.
Chcialem by przedstawic, bardzo krotko - nasza wybitna firme.
W.U.G. Inc zostala zalozona w 1992 roku i obecnie stala sie jedna z najbardziej
uznawanych
On Thu, May 24, 2012 at 08:34:24AM -0500, boB Stepp wrote:
> On Thu, May 24, 2012 at 8:28 AM, Javier Novoa C.
> wrote:
> > On 2012-05-24, alister wrote:
> >> On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote:
> >>
> >>> I am trying to join an online class that uses python. I need to brush up
> >>>
Hello,
I'm a relative python newbie but I've been tasked to figure out how to
embed calls to a python library in an Excel XLL add-in.
The Python/C API for doing this seems pretty straightforward, but I
seem to have read somewhere online that it's important that the C++
program or DLL linking to a
On 5/24/2012 5:32 AM, niks wrote:
Hello everyone..
I am new to asp.net...
I want to use Regular Expression validator in Email id verification..
Can anyone tell me how to use this and what is the meaning of
this
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
Not a Python question.
It matche
On 05/23/2012 07:45 PM, hsa...@gmail.com wrote:
> I am trying to join an online class that uses python. I need to brush up on
> the language quickly. Is there a good book or resource that covers it well
> but does not have to explain what an if..then..else statement is?
>
> Thanks.
My opinion:
Hello,
I am an experienced programmer but a beginner to python. As such, I can figure
out a way to code most algorithms using more "C" style syntax.
I am doing something now that I am sure is a more python way but i can't quite
get it right. I was hoping someone might help.
So I have a list
Scott Siegler wrote:
> Hello,
>
> I am an experienced programmer but a beginner to python. As such, I
> can figure out a way to code most algorithms using more "C" style
> syntax.
>
> I am doing something now that I am sure is a more python way but i
> can't quite get it right. I was hoping
Scott Siegler writes:
> is there a way to do something like:
>[(x,y-1), (x,y+1) for zzz in coord_list]
> or something along those lines?
You should read the docs of the itertools module on general principles,
since they are very enlightening in many ways. Your particular problem
can be hand
On 05/24/2012 04:22 PM, Scott Siegler wrote:
> Hello,
>
> I am an experienced programmer but a beginner to python. As such, I can
> figure out a way to code most algorithms using more "C" style syntax.
>
> I am doing something now that I am sure is a more python way but i can't
> quite get it ri
Paul Rubin writes:
> new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list )
Sorry:
new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list))
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, May 24, 2012 5:06:41 AM UTC-7, Tim Williams wrote:
> On May 23, 5:10 pm, no1 wrote:
> > Hi, we're investigating transitioning our company from matlab to python. We
> > found OMPC as a MATLAB m-file-to Python translator, but we're encountering
> > a problem using the translated code
John Nagle writes:
>It matches anything that looks like a mail user name followed by
> an @ followed by anything that looks more or less like a domain name.
> The domain name must contain at least one ".", and cannot end with
> a ".", which is not strictly correct but usually works.
It will
On 24May2012 12:48, Jean-Michel Pichavant wrote:
| Peter Otten wrote:
| > Jean-Michel Pichavant wrote:
| >> Fayaz Yusuf Khan wrote:
| >>> Jean-Michel Pichavant wrote:
| Meanwhile you can shorten the code this way:
| root.addHandler(FileHandler('debug.log'))
| root.handlers[-1].setLe
On 25May2012 01:20, Chris Angelico wrote:
| On Thu, May 24, 2012 at 11:45 PM, Dennis Lee Bieber
| wrote:
| > And maybe follow-up with a review of this monster:
| > http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
|
| That is awesome. Epic. Eyeball-bleeding.
+1 !!
I hope someone
On 24May2012 05:32, niks wrote:
| Hello everyone..
| I am new to asp.net...
Time to run away fast before you're commited then:-)
You're aware this is a _python_ list/group, yes?
| I want to use Regular Expression validator in Email id verification..
You can't. Valid addresses including nesting
On 5/24/2012 2:30 PM Paul Rubin said...
Paul Rubin writes:
new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list )
Sorry:
new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list))
>>> from itertools import chain
>>> coord_list = zip(range(20,30),range(30,40))
>>> a =
On Fri, May 25, 2012 at 9:03 AM, Cameron Simpson wrote:
> On 24May2012 05:32, niks wrote:
> | Hello everyone..
> | I am new to asp.net...
>
> Time to run away fast before you're commited then:-)
> You're aware this is a _python_ list/group, yes?
Committed to an asylum or to source control?
Pyth
On Thu, 24 May 2012 05:32:16 -0700, niks wrote:
> Hello everyone..
> I am new to asp.net...
> I want to use Regular Expression validator in Email id verification..
Why do you want to write buggy code that makes your users hate your
program? Don't do it! Write good code, useful code! Validating e
On 25/05/2012 00:03, Cameron Simpson wrote:
On 24May2012 05:32, niks wrote:
| Hello everyone..
| I am new to asp.net...
Time to run away fast before you're commited then:-)
You're aware this is a _python_ list/group, yes?
| I want to use Regular Expression validator in Email id verification..
On Thu, 24 May 2012 11:22:37 -0400, Colin J. Williams wrote:
> On 24/05/2012 10:14 AM, mlangenho...@gmail.com wrote:
>> I would like to pass something like this into a function
>> test(val1,val2,'>=')
>>
>> and it should come back with True or False.
>>
>> Is there a way to dynamically compare 2 v
def adder():
s = 0
def a(x):
s += x
return sum
return a
pos, neg = adder(), adder()
for i in range(10):
print pos(i), neg(-2*i)
This should work, right? Why does it not?
Checkout slide no. 37 of a Tour of Go to know inspiration. Just wanted
Steven D'Aprano writes:
> Why do you want to write buggy code that makes your users hate your
> program? ...
> The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO
> IT.
Of course spamming people will make them hate you even more. Insisting
that people give you a valid em
mlangenho...@gmail.com writes:
> I would like to pass something like this into a function
> test(val1,val2,'>=')
>
> and it should come back with True or False.
import operator
test(val1, val2, operator.ge)
--
http://mail.python.org/mailman/listinfo/python-list
On 25/05/2012 02:23, SherjilOzair wrote:
def adder():
s = 0
def a(x):
s += x
return sum
return a
pos, neg = adder(), adder()
for i in range(10):
print pos(i), neg(-2*i)
This should work, right? Why does it not?
Checkout slide no. 37 of a
On Thu, 24 May 2012 18:35:21 -0700, Paul Rubin wrote:
> Steven D'Aprano writes:
>> Why do you want to write buggy code that makes your users hate your
>> program? ...
>> The only way to validate an email address is to ACTUALLY SEND AN EMAIL
>> TO IT.
>
> Of course spamming people will make them
On Thu, 24 May 2012 18:23:18 -0700, SherjilOzair wrote:
> def adder():
> s = 0
> def a(x):
> s += x
> return sum
> return a
I think you mean "return s", not sum.
> This should work, right? Why does it not?
No, it shouldn't. When you have an assignment, suc
On Thu, May 24, 2012 at 6:23 PM, SherjilOzair wrote:
> def adder():
> s = 0
> def a(x):
Add a "nonlocal s" declaration right here.
See http://www.python.org/dev/peps/pep-3104/
> s += x
> return sum
> return a
>
> pos, neg = adder(), adder()
> for i in r
On 25/05/2012 2:10 AM, Stephen Lin wrote:
Hello,
I'm a relative python newbie but I've been tasked to figure out how to
embed calls to a python library in an Excel XLL add-in.
The Python/C API for doing this seems pretty straightforward, but I
seem to have read somewhere online that it's import
On 05/24/2012 09:23 PM, SherjilOzair wrote:
> def adder():
> s = 0
> def a(x):
> s += x
> return sum
> return a
>
> pos, neg = adder(), adder()
> for i in range(10):
> print pos(i), neg(-2*i)
>
> This should work, right? Why does it not?
>
Guess that dep
On Fri, May 25, 2012 at 11:35 AM, Paul Rubin wrote:
> Steven D'Aprano writes:
>> Why do you want to write buggy code that makes your users hate your
>> program? ...
>> The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO
>> IT.
>
> Of course spamming people will make them hat
On 5/24/2012 8:59 PM, Dave Angel wrote:
> so I fixed that, and got
> inconsistent use of tabs and spaces in indentation
>
> because you mistakenly used tabs for indentation.
Not to start another tabs-vs.-spaces discussion, but tabs are perfectly
legal indentation in Python. That exception is
Pardon me for breaking threading, but Daniel's response is not available
on my ISP's news server, and I only discovered it by accident.
On Thu May 24 15:04:34 CEST 2012, Daniel Fetchinson wrote:
> > On Thu, 24 May 2012 08:50:59 +, Steven D'Aprano wrote:
> > From the Zen of Python ("import t
I want to find a plugin of django what it can custom fields in the form. The
functions include custom fields in web page and create the fields in database.
plugin's flow like these:
1.we can define fields in web page
--> 2.create the table in database(table includes all custom fields)
--> 3.
On 5/24/2012 4:53 PM, Duncan Booth wrote:
Scott Siegler wrote:
Hello,
I am an experienced programmer but a beginner to python. As such, I
can figure out a way to code most algorithms using more "C" style
syntax.
Hi, welcome to Python. I came here from C also.
I am doing something now tha
On 05/24/2012 10:27 PM, Andrew Berg wrote:
> On 5/24/2012 8:59 PM, Dave Angel wrote:
>> so I fixed that, and got
>> inconsistent use of tabs and spaces in indentation
>>
>> because you mistakenly used tabs for indentation.
> Not to start another tabs-vs.-spaces discussion, but tabs are perfect
Paul Rubin writes:
> Steven D'Aprano writes:
> > Why do you want to write buggy code that makes your users hate your
> > program? ...
> > The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO
> > IT.
>
> Of course spamming people will make them hate you even more.
Use the
[Default] On 25 May 2012 02:47:11 GMT, Steven D'Aprano
wrote:
>Do you object to the ability to write standard Python modules?
>
># module.py
>def spam(obj, n):
>return len(obj) + n
>
>def ham(obj):
>return spam(obj, 23)
>
>
>By your apparent misunderstanding of the Zen, you think that thi
Ben Finney writes:
> The point is that, having collected the email address, it's useless
> unless one actually uses it *as an email address*, by sending a message
> to it. Before then, “validating” it tells you nothing.
Right, the only legitimate use of an email address is sending legitimate
emai
On Fri, May 25, 2012 at 1:02 PM, Temia Eszteri wrote:
> But then we've got "Simple is better than complex", and "Complex is
> better than complicated". Of course if we decided to start iterating
> through the zen of Python's verses and continually modifying the
> example code to fit, it would get
67 matches
Mail list logo