On 06/08/2011 01:09 PM, Cathy James wrote:
I am almost there, but I need a little help:
I would like to
a) print my dogs in the format index. name: breed as follows:
0. Mimi:Poodle
1.Sunny: Beagle
2. Bunny: German Shepard
I am getting
(0, ('Mimi', 'Poodle')) . Mimi : Poodle instead-what have
On Thu, Jun 9, 2011 at 12:37 AM, Ben Finney wrote:
> Eric Snow writes:
>
>> p.s. Am I missing something or can you really not change the docstring
>> of a class? I was thinking about the idea of inheriting class
>> docstrings too.
>
> The docstring of an object (whether function or class or modul
On Thursday, June 9, 2011 12:13:06 AM UTC-7, Eric Snow wrote:
> On Thu, Jun 9, 2011 at 12:37 AM, Ben Finney wrote:
> > So, it's even possible to do what you ask without decorators at all:
> >
> > class Foo(object):
> > def frob(self):
> > """ Frobnicate thyself. """
> >
> >
Eric Snow writes:
> AttributeError: attribute '__doc__' of 'type' objects is not writable
>
> That is on 3.3.
Well, that sucks :-(
Where can we see the discussion of that change before it was
implemented?
> I'm just looking for a way to do it with decorators in the class body
> without using m
Hi Guru's,
I'm working on a solution to find the prime factor of the number
This part of the code works.. http://www.pastie.org/2041584
When the number gets bigger, the range cannot iterate through bigger number
and it does not work.
When I googled , I came across creating our own range function
On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium
wrote:
> Hi Guru's,
> I'm working on a solution to find the prime factor of the number
> This part of the code works.. http://www.pastie.org/2041584
For the archives, that code is:
num = 13195
#num = 600851475143L
prime_numbers = [2]
prime_fa
On 09/06/2011 09:31, Ganapathy Subramanium wrote:
Hi Guru's,
I'm working on a solution to find the prime factor of the number
This part of the code works.. http://www.pastie.org/2041584
When the number gets bigger, the range cannot iterate through bigger
number and it does not work.
When I g
On Thu, Jun 9, 2011 at 7:06 PM, Chris Rebert wrote:
> On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium
> wrote:
>> Hi Guru's,
>> I'm working on a solution to find the prime factor of the number
>> This part of the code works.. http://www.pastie.org/2041584
>
> For the archives, that code is:
On 01/-10/-28163 02:59 PM, harrismh777 wrote:
Looks like my 2.7 test_popen failure is an open issue7671... since Jan
2010. Looks like it really does function ok.
At any rate, I was able to test Popen myself today, and it ran fine. I
needed to write a script that will disable the touch pad on thi
Ben Finney wrote:
> Eric Snow writes:
>
>> AttributeError: attribute '__doc__' of 'type' objects is not writable
>>
>> That is on 3.3.
>
> Well, that sucks :-(
>
> Where can we see the discussion of that change before it was
> implemented?
>
Change? What change?
C:\Python27>python
Python 2
On Wed, 2011-06-08 at 17:18 -0300, Josias L.G wrote:
> Hi for all,
> I'm very newbie in python and is very good language.
> I'm trying to adopt a example:
> import smtpd
> import asyncore
> server = smtpd.PureProxy(('127.0.0.1', 1025), ('mail', 25))
> asyncore.loop()
> I'm trying to copy the email
If your business has huge databases of client details and other
information, maintenance these records as accurate and current as
possible should be a top priority,
learn more
http://worldupdateinformation.com/2011/06/08/investing-in-data-management-services-could-have-vast-benefits/
--
http://m
On 01/-10/-28163 02:59 PM, Chris Rebert wrote:
On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium
wrote:
Hi Guru's,
I'm working on a solution to find the prime factor of the number
This part of the code works.. http://www.pastie.org/2041584
For the archives, that code is:
num =3195
#num
Christopher Head wrote:
> It is. Until Linux capabilities, EUID==0 used to be special-cased in the
> kernel
Thank you all, I got a good learning *and* something to rememeber.
--
goto /dev/null
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 8, 6:56 pm, "Gabriel Genellina" wrote:
> En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako
> escribi :
>
> > I have been trying to get PyODBC to work with Python 2.6 (the latest
> > version it is known to be compatible with) and Django, but have run
> > into a problem which, according to the
Hello,
originally with python 2.4 ~ 2.7 (I think) iterating a maildir I was using
++Code+
try:
mbox= mailbox.PortableUnixMailbox(open(mbox,'r'))
except IOError:
# if file not found default is None
mbox= None
while mbox:
msg
Larry Hudson wrote:
On 06/08/2011 01:09 PM, Cathy James wrote:
Dog Breed: "))
while not dogs:
print("Goodbye!!")
sys.exit()
else:
else does not belong with while.
else works just fine with while; it is the path taken when the while is
exhausted, but not broken ou
Ethan Furman wrote:
Larry Hudson wrote:
On 06/08/2011 01:09 PM, Cathy James wrote:
Dog Breed: "))
while not dogs:
print("Goodbye!!")
sys.exit()
else:
else does not belong with while.
else works just fine with while; it is the path taken when the while is
exhaust
On 08.06.2011 12:29, News123 wrote:
> Hi,
>
>
> Do you have any recommendations for a good book about Web design with
> Django?
You can do web design with HTML, CSS and Javascript. There are a lot
of books about this.
Django is a good web framework. It does not care much about CSS and Javascrip
I am looking for some information about Gnumeric scripting licensing.
Here is my question:
"If I script for Gnumeric using Python, must I release the script
code?"
I am unable to draw a line where Gnumeric GPL ends and where
proprietary nature of macros start.
Thanks in advance,
-Bhushit
--
http:
On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote:
> Eric Snow writes:
>
>> AttributeError: attribute '__doc__' of 'type' objects is not writable
>>
>> That is on 3.3.
>
> Well, that sucks :-(
>
> Where can we see the discussion of that change before it was
> implemented?
It goes back to P
Eric Snow wrote:
p.s. Am I missing something or can you really not change the docstring
of a class? I was thinking about the idea of inheriting class
docstrings too.
8<
"""module level docstring"""
def func():
"""function level docst
I ran into a similar problem. I found throttling self.sh.delaybeforesend works
for me. I'm on ubuntu.
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
Please let me know which one is GOOD whether Python 2.6 OR 3.2.
Please let me know the difference between them.
Please give some refernce site or books to know the difference
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 8, 9:20 pm, hisan wrote:
> HI All,
>
> I have created an application for Mac OS using py2app module, in my
> python script i have external modules such as MySQLdb and other ,
> while trying to run on Mac OS i get an error saying unable to import
> the module MySQLdb.
> On Windows i convert
In <9037ef5f-53c5-42c6-ac5d-8f942df6c...@x38g2000pri.googlegroups.com> hisan
writes:
> Hi All,
> Please let me know which one is GOOD whether Python 2.6 OR 3.2.
> Please let me know the difference between them.
> Please give some refernce site or books to know the difference
If you're starting
Il Tue, 7 Jun 2011 19:25:43 -0700 (PDT), mud ha scritto:
> Hi All,
>
> Does anybody know what the following error means with paramiko, and
> how to fix it.
>
> I don't know what is causing it and why. I have updated paramiko to
> version 1.7.7.1 (George) but still has the same issue.
>
> Also I
On Thu, Jun 9, 2011 at 4:38 AM, Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, Chris Rebert wrote:
>>
>> On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium
>> wrote:
>>>
>>> Hi Guru's,
>>> I'm working on a solution to find the prime factor of the number
>>> This part of the code works.. http:
Hi,
I was wondering what the difference or advantages to using an
opendirector with handlers or using a request object?
I am having an issue where when I use the open director and I try to
add headers it adds them after the connection-close header, but when I
use the request object it does not.
In article
<1167f414-8901-4f9c-9d51-2723213fd...@k3g2000prl.googlegroups.com>,
hisan wrote:
> On Jun 8, 9:20 pm, hisan wrote:
> > I have created an application for Mac OS using py2app module, in my
> > python script i have external modules such as MySQLdb and other ,
> > while trying to run on
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 06/09/2011 01:18 PM, hisan wrote:
> Hi All,
>
> Please let me know which one is GOOD whether Python 2.6 OR 3.2.
> Please let me know the difference between them.
> Please give some refernce site or books to know the difference
http://wiki.python.o
Hi,
I think you can also use scipy.sparse.linalg.eigen.arpack in addition to
scipy.sparse.linalg.eigen.lobpcg
Also, from my experience with this routines I can tell you that they
don't like to be asked a small number of eigenvalues.
Contrary to common sense I have found these routines to prefer
Hello kids and parents !! I just want to announce the release of
JSONBOT 0.7.1.
This release consists of minor bug fixes and new xmpp auth code (SASL)
which support DIGEST-MD5 and PLAIN authing.
JSONBOT should run well again on systems with python2.5 installed.
You can fetch it at http://jsonbot
Benjamin Kaplan wrote:
> 2011/6/8 Sérgio Monteiro Basto :
>> hi,
>> cat test.py
>> #!/usr/bin/env python
>> #-*- coding: utf-8 -*-
>> u = u'moçambique'
>> print u.encode("utf-8")
>> print u
>>
>> chmod +x test.py
>> ./test.py
>> moçambique
>> moçambique
>>
>> ./test.py > output.txt
>> Traceback (m
Ben Finney wrote:
> Sérgio Monteiro Basto writes:
>
>> ./test.py
>> moçambique
>> moçambique
>
> In this case your terminal is reporting its encoding to Python, and it's
> capable of taking the UTF-8 data that you send to it in both cases.
>
>> ./test.py > output.txt
>> Traceback (most recent
This is a contract/hourly 6-24 month on-site Python Programming job
located in Newport Beach, CA paying $50.00 to $80.00 per hour
depending on experience. Local candidates preferred, but all
considered. Relocation expenses covered.
Our Newport Beach, CA client is seeking a Python programmer with
Bhushit Joshipura writes:
> I am looking for some information about Gnumeric scripting licensing.
You're asking in the wrong place; that's a question for the authors of
the GPL, and for the copyright holders in Gnumeric.
The authors of the GPL have an FAQ document you will likely find
informati
Steven D'Aprano writes:
> On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote:
>
> > Eric Snow writes:
> >
> >> AttributeError: attribute '__doc__' of 'type' objects is not writable
> >>
> >> That is on 3.3.
> >
> > Well, that sucks :-(
> >
> > Where can we see the discussion of that change
On Thu, 09 Jun 2011 22:14:17 +0100, Sérgio Monteiro Basto wrote:
> Exactly the opposite , if python don't know the encoding should not try
> decode to ASCII.
What should it decode to, then?
You can't write characters to a stream, only bytes.
> I want python don't care about encoding terminal a
On Fri, Jun 10, 2011 at 12:47 AM, Bhushit Joshipura wrote:
> I am looking for some information about Gnumeric scripting licensing.
> Here is my question:
> "If I script for Gnumeric using Python, must I release the script
> code?"
> I am unable to draw a line where Gnumeric GPL ends and where
> pr
IMO, it shouldn't be necessary to explicitly copy docstrings
around like this in the first place. Either it should happen
automatically, or help() should be smart enough to look up
the inheritance hierarchy when given a method that doesn't
have a docstring of its own.
Unfortunately, since unbound
Chris Angelico wrote:
Rather than find all prime numbers up to num, stop at sqrt(num) - it's
not possible to have any prime factors larger than that.
That's not quite true -- the prime factors of 26 are 2 and 13,
and 13 is clearly greater than sqrt(26).
However, once you've divided out all th
On Fri, Jun 10, 2011 at 8:39 AM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>
>> Rather than find all prime numbers up to num, stop at sqrt(num) - it's
>> not possible to have any prime factors larger than that.
>
> That's not quite true -- the prime factors of 26 are 2 and 13,
> and 13 is clear
On Fri, Jun 10, 2011 at 3:18 AM, hisan wrote:
> Hi All,
>
> Please let me know which one is GOOD whether Python 2.6 OR 3.2.
As a side point, you should probably use 2.7 rather than 2.6. With
regard to 2.x versus 3.x, Corey already posted a link to an excellent
article.
Chris Angelico
--
http://
On Thu, Jun 9, 2011 at 4:27 PM, Gregory Ewing
wrote:
> IMO, it shouldn't be necessary to explicitly copy docstrings
> around like this in the first place. Either it should happen
> automatically, or help() should be smart enough to look up
> the inheritance hierarchy when given a method that doesn
Sérgio Monteiro Basto writes:
> Ben Finney wrote:
>
> > In this case your shell has no preference for the encoding (since
> > you're redirecting output to a file).
>
> How I say to python that I want that write in utf-8 to files ?
You already did:
> > In the first print statement you specify t
Gregory Ewing writes:
> IMO, it shouldn't be necessary to explicitly copy docstrings around
> like this in the first place. Either it should happen automatically,
> or help() should be smart enough to look up the inheritance hierarchy
> when given a method that doesn't have a docstring of its own
On Thu, Jun 9, 2011 at 10:10 AM, Ethan Furman wrote:
> Eric Snow wrote:
>>
>> p.s. Am I missing something or can you really not change the docstring
>> of a class? I was thinking about the idea of inheriting class
>> docstrings too.
>
> 8<
>
On Thu, Jun 9, 2011 at 5:23 PM, Ben Finney wrote:
> Gregory Ewing writes:
>
>> IMO, it shouldn't be necessary to explicitly copy docstrings around
>> like this in the first place. Either it should happen automatically,
>> or help() should be smart enough to look up the inheritance hierarchy
>> wh
On 6/9/2011 5:46 PM, Nobody wrote:
On Thu, 09 Jun 2011 22:14:17 +0100, Sérgio Monteiro Basto wrote:
Exactly the opposite , if python don't know the encoding should not try
decode to ASCII.
What should it decode to, then?
You can't write characters to a stream, only bytes.
I want python don
"Sérgio Monteiro Basto" wrote in message
news:4df137a7$0$30580$a729d...@news.telepac.pt...
How I change sys.stdout.encoding always to UTF-8 ? at least have a
consistent sys.stdout.encoding
There is an environment variable that can force Python I/O to be a specfic
encoding:
PYTHONIOEN
On Thu, Jun 9, 2011 at 10:55 AM, geremy condra wrote:
> On Thu, Jun 9, 2011 at 4:38 AM, Dave Angel wrote:
> > On 01/-10/-28163 02:59 PM, Chris Rebert wrote:
> >>
> >> On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium
> >> wrote:
> >>>
> >>> Hi Guru's,
> >>> I'm working on a solution to fin
On Thursday, June 9, 2011 3:27:36 PM UTC-7, Gregory Ewing wrote:
> IMO, it shouldn't be necessary to explicitly copy docstrings
> around like this in the first place. Either it should happen
> automatically, or help() should be smart enough to look up
> the inheritance hierarchy when given a method
Nobody wrote:
>> Exactly the opposite , if python don't know the encoding should not try
>> decode to ASCII.
>
> What should it decode to, then?
UTF-8, as in tty, how I change this default ?
> You can't write characters to a stream, only bytes.
>
ok got the point .
Thanks,
--
http://mail.p
Mark Tolonen wrote:
>
> "Sérgio Monteiro Basto" wrote in message
> news:4df137a7$0$30580$a729d...@news.telepac.pt...
>
>> How I change sys.stdout.encoding always to UTF-8 ? at least have a
>> consistent sys.stdout.encoding
>
> There is an environment variable that can force Python I/O to be a
If your dependencies are satisfiable with 3.2, you're better off with 3.2.
If not, use 2.7, or consider porting the dependencies yourself (assuming
those dependencies have code available).
Both 2.x and 3.x are good, but 3.x is clearly the way forward.
3.x has some annoyances corrected: more cent
Carl Banks writes:
> Presumably, the reason you are overriding a method in a subclass is to
> change its behavior; I'd expect an inherited docstring to be
> inaccurate more often than not.
In which case the onus is on the programmer implementing different
behaviour to also override the docstring
Sérgio Monteiro Basto writes:
> Nobody wrote:
>
> >> Exactly the opposite , if python don't know the encoding should not
> >> try decode to ASCII.
Are you advocating that Python should refuse to write characters unless
the encoding is specified? I could sympathise with that, but currently
that's
Ben Finney wrote:
>> >> Exactly the opposite , if python don't know the encoding should not
>> >> try decode to ASCII.
>
> Are you advocating that Python should refuse to write characters unless
> the encoding is specified? I could sympathise with that, but currently
> that's not what Python does
On Thu, Jun 9, 2011 at 7:12 PM, Carl Banks wrote:
> On Thursday, June 9, 2011 3:27:36 PM UTC-7, Gregory Ewing wrote:
>> IMO, it shouldn't be necessary to explicitly copy docstrings
>> around like this in the first place. Either it should happen
>> automatically, or help() should be smart enough to
On Thursday, June 9, 2011 6:42:44 PM UTC-7, Ben Finney wrote:
> Carl Banks
> writes:
>
> > Presumably, the reason you are overriding a method in a subclass is to
> > change its behavior; I'd expect an inherited docstring to be
> > inaccurate more often than not.
>
> In which case the onus is on
On Thursday, June 9, 2011 7:37:19 PM UTC-7, Eric Snow wrote:
> When I write ABCs to capture an interface, I usually put the
> documentation in the docstrings there. Then when I implement I want
> to inherit the docstrings. Implicit docstring inheritance for
> abstract base classes would meet my n
John Gordon wrote:
In <9037ef5f-53c5-42c6-ac5d-8f942df6c...@x38g2000pri.googlegroups.com> hisan
writes:
Hi All,
Please let me know which one is GOOD whether Python 2.6 OR 3.2.
Please let me know the difference between them.
Please give some refernce site or books to know the difference
I
On 6/9/2011 11:41 PM, Kyle T. Jones wrote:
Library support.
I urge people who use 2.x only for library support to let library
authors that they would have preferred a 3.x compatible library. I have
library authors say "Why port when none of my users have asked for a port?"
A couple of year
On 6/9/2011 9:12 PM, Carl Banks wrote:
Presumably, the reason you are overriding a method in a subclass is to change
its behavior; I'd expect an inherited docstring to be inaccurate more often
than not. So I'd be -1 on automatically inheriting them.
However, I'd be +1 easily on a little help
On 2011.06.09 12:18 PM, hisan wrote:
> Hi All,
>
> Please let me know which one is GOOD whether Python 2.6 OR 3.2.
> Please let me know the difference between them.
> Please give some refernce site or books to know the difference
I'm just a beginner, but AFAICT, there are three reasons to learn Pyt
On Thu, Jun 9, 2011 at 9:59 PM, Terry Reedy wrote:
> On 6/9/2011 9:12 PM, Carl Banks wrote:
>
>> Presumably, the reason you are overriding a method in a subclass is to
>> change its behavior; I'd expect an inherited docstring to be inaccurate more
>> often than not. So I'd be -1 on automatically
Thank you.
The question is that. Get the messages that was sended and save in
maildir format.
One more question... testing here, has the smtpd.pureproxy support
stream username and password for smtp authentication ?. I read some
doc and don't find anything about.
--
http://mail.python.org/mailman/
Carl Banks writes:
> On Thursday, June 9, 2011 7:37:19 PM UTC-7, Eric Snow wrote:
> > When I write ABCs to capture an interface, I usually put the
> > documentation in the docstrings there. Then when I implement I want
> > to inherit the docstrings. Implicit docstring inheritance for
> > abstract
Ben Finney writes:
> class Square(Shape):
> """ An equal-sided quadrilateral polygon. """
That this docstring is imprecise (it describes any rhombus, not
necessarily a square) is something I hope no-one else notices or draws
attention to.
Oh, darn.
--
\ “The sun never sets on the B
On Fri, Jun 10, 2011 at 3:25 PM, Ben Finney wrote:
> Ben Finney writes:
>
>> class Square(Shape):
>> """ An equal-sided quadrilateral polygon. """
>
> That this docstring is imprecise (it describes any rhombus, not
> necessarily a square) is something I hope no-one else notices or draws
> att
Le 09/06/2011 04:18, Sérgio Monteiro Basto a écrit :
> hi,
> cat test.py
> #!/usr/bin/env python
> #-*- coding: utf-8 -*-
> u = u'moçambique'
> print u.encode("utf-8")
> print u
>
> chmod +x test.py
> ../test.py
> moçambique
> moçambique
The following tries to encode before to print. If you pass
Le 09/06/2011 04:18, Sérgio Monteiro Basto a écrit :
> hi,
> cat test.py
> #!/usr/bin/env python
> #-*- coding: utf-8 -*-
> u = u'moçambique'
> print u.encode("utf-8")
> print u
>
> chmod +x test.py
> ../test.py
> moçambique
> moçambique
The following tries to encode before to print. If you pass
Le 09/06/2011 04:18, Sérgio Monteiro Basto a écrit :
> hi,
> cat test.py
> #!/usr/bin/env python
> #-*- coding: utf-8 -*-
> u = u'moçambique'
> print u.encode("utf-8")
> print u
>
> chmod +x test.py
> ../test.py
> moçambique
> moçambique
The following tries to encode before to print. If you pass
Terry Reedy wrote:
A couple of years ago, users were people who were already programming
with 2.x. That is changing now.
... big time !
:)
--
http://mail.python.org/mailman/listinfo/python-list
Andrew Berg wrote:
AFAICT, there are three reasons to learn Python 2:
... there is a fourth reason.
The linux distro you are using currently was customized with python 2.x
I ran into this problem this week in fact... on my HP g6 ubuntu notebook
running 10.04 lucid. It ships with the 2.6.5
On 06/08/2011 11:59 PM, Larry Hudson wrote:
On 06/08/2011 01:09 PM, Cathy James wrote:
I am almost there, but I need a little help:
I would like to
...
Here's one possible replacement. There are many other approaches as well.
(This leaves the individual dogs as a (name, breed) tuple. It co
77 matches
Mail list logo