I am just starting on Python 2.6.2 on Ubuntu 9.04 and I am slightly
confused with the numerous tutorials and books available for learning
the language. Is there any good recommendation for a good but easy
tutorial on the Internet to learn Python?
Ken
wesley chun wrote:
On Mon, Oct 5, 2009 a
On Mon, Oct 5, 2009 at 3:37 PM, Sander Sweers wrote:
> Thanks Wesly/Vern for the replies.
>
> On Mon, 2009-10-05 at 21:56 +0200, Luke Paireepinart wrote:
> > if not n == 0
> >
> > if b == True can be written as if b.
> >
> >
> > However,
> > if not n == 0 can be written as if n != 0 but NO
On Tue, Oct 6, 2009 at 7:59 AM, Ken G. wrote:
> I am just starting on Python 2.6.2 on Ubuntu 9.04 and I am slightly
> confused with the numerous tutorials and books available for learning the
> language. Is there any good recommendation for a good but easy tutorial on
> the Internet to learn Py
Hi,
I am using the following code to check for the Python version -
import os
t = os.sys.version_info[0:2]
if (t[0] + t[1]) < 6:
os.sys.exit("Need at least Python 2.4")
del t
This snippet is put at the beginning of the single script file before
the rest of the code.
I need to check for the
As someone who learned (about) programming by copying and pasting code,
I really appreciate," Python for software design - how to think like a
computer scientist" by Allen Downey. It really talks you through the
workflow of programming, rather than just give you a long list of things
that you c
Didar Hossain wrote:
Hi,
I am using the following code to check for the Python version -
import os
t = os.sys.version_info[0:2]
if (t[0] + t[1]) < 6:
os.sys.exit("Need at least Python 2.4")
del t
This snippet is put at the beginning of the single script file before
the rest of the code.
I
On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts wrote:
> Didar Hossain wrote:
>
>> Hi,
>>
>> I am using the following code to check for the Python version -
>>
>> import os
>>
>> t = os.sys.version_info[0:2]
>> if (t[0] + t[1]) < 6:
>>os.sys.exit("Need at least Python 2.4")
>> del t
>>
>> This
On Tue, Oct 06, 2009 at 09:42:04AM -0500, Wayne wrote:
> On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts wrote:
> if sys.version < '2.4':
>sys.exit("Need at least Python 2.4")
>
> AFAIK the string comparison is reliable
Not quite. What happens when you compare '2.4' and '2.10'?
--
Steve Wi
On Tue, Oct 6, 2009 at 9:46 AM, Steve Willoughby wrote:
> On Tue, Oct 06, 2009 at 09:42:04AM -0500, Wayne wrote:
> > On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts >wrote:
> > if sys.version < '2.4':
> >sys.exit("Need at least Python 2.4")
> >
> > AFAIK the string comparison is reliable
>
>
On Tue, Oct 06, 2009 at 09:47:43AM -0500, Wayne wrote:
> On Tue, Oct 6, 2009 at 9:46 AM, Steve Willoughby wrote:
>
> > On Tue, Oct 06, 2009 at 09:42:04AM -0500, Wayne wrote:
> > > On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts > >wrote:
> > > if sys.version < '2.4':
> > >sys.exit("Need at l
Wayne wrote:
On Mon, Oct 5, 2009 at 3:37 PM, Sander Sweers wrote:
Thanks Wesly/Vern for the replies.
On Mon, 2009-10-05 at 21:56 +0200, Luke Paireepinart wrote:
if not n == 0
if b == True can be written as if b.
However,
if not n == 0 can be written as if n != 0 but NOT as
Christian Witts wrote:
> Your version will fail if the person is running Python 3.0, 3.1 up
> until the 3.3 series which is not good. Neater looking (imo) code
> below.
>
> from sys import version_info, exit
>
> if version_info[0] == 1 or (version_info[0] == 2 and version_info[1] < 4):
>exit("
On Tue, Oct 6, 2009 at 9:57 AM, Steve Willoughby wrote:
> On Tue, Oct 06, 2009 at 09:47:43AM -0500, Wayne wrote:
> > On Tue, Oct 6, 2009 at 9:46 AM, Steve Willoughby
> wrote:
> >
> > > On Tue, Oct 06, 2009 at 09:42:04AM -0500, Wayne wrote:
> > > > On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts
Didar Hossain wrote:
Hi,
I am using the following code to check for the Python version -
import os
t = os.sys.version_info[0:2]
if (t[0] + t[1]) < 6:
os.sys.exit("Need at least Python 2.4")
del t
This snippet is put at the beginning of the single script file before
the rest of the code.
I
Todd Zullinger wrote:
Christian Witts wrote:
Your version will fail if the person is running Python 3.0, 3.1 up
until the 3.3 series which is not good. Neater looking (imo) code
below.
from sys import version_info, exit
if version_info[0] == 1 or (version_info[0] == 2 and version_info[1] <
On Tue, Oct 6, 2009 at 9:58 AM, Dave Angel wrote:
>
No, because you're not assured that all integers that are equal are the same
> object. Python optimizes that for small integers, but there's no documented
> range that you can count on it.
>
>
But for this specific case - checking a return co
On Tue, Oct 6, 2009 at 5:08 PM, Wayne wrote:
> On Tue, Oct 6, 2009 at 9:58 AM, Dave Angel wrote:
>>
>>
>>
>> No, because you're not assured that all integers that are equal are the
>> same object. Python optimizes that for small integers, but there's no
>> documented range that you can count on
On Tue, Oct 6, 2009 at 4:47 PM, Wayne wrote:
>
> On Tue, Oct 6, 2009 at 9:46 AM, Steve Willoughby wrote:
>
>> On Tue, Oct 06, 2009 at 09:42:04AM -0500, Wayne wrote:
>> > On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts > >wrote:
>> > if sys.version < '2.4':
>> >sys.exit("Need at least Python 2
Hi everyone,
I was wondering if anyone could offer advice as I try to simplify a
project I've been working on.
I have a set of classes that I've named models.py (following the
Django convention, though it's not technically a Django project or
app).
Inside that file, I had initially grouped toget
Excuse me for the mistake, this list is a little different with respect
to Yahoo Groups. Below my comments:
Now I think I could begin with some simple script to come into the
Python world, so I'll start building the easiest components of final
tool (perhaps opening the image and rot
On Tue, Oct 6, 2009 at 8:59 AM, Ken G. wrote:
> I am just starting on Python 2.6.2 on Ubuntu 9.04 and I am slightly confused
> with the numerous tutorials and books available for learning the language.
> Is there any good recommendation for a good but easy tutorial on the
> Internet to learn Pytho
I'm now fairly familiar with Python, so I'm thinking about starting to learn
a second programming language. The problem is, I don't know which to learn.
I want a language that will be good for me to learn, but is not so different
from python that I will be totally confused. I tried learning C++ and
Hi Mark,
I recently started dabbling with Java, which has some great texts on
object-oriented design and patterns (a skill that I'm finding helps
with Python).
If you have time on your hands, you might want to consider learning a
programming language that has a different philosophy or approach th
> programming language. The problem is, I don't know which to learn. I want a
> language
> that will be good for me to learn,
Good for you in what way? Is there a general "good for you" for programming,
or do you need to achieve a certain goal? From a jobs point of view, Java
seems prett
Thanks all for the informative discussion. To re-confirm it was mostly
for boolean checks like "if b == True".
Greets
Sander
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/t
> I don't think there is a "right" answer to this question. It depends
> on how the classes are used and related to each other. If the Auto
> classes are related or if they are useful to more than one client,
> perhaps you should make an auto_models.py to hold them. If they are
> only useful to ind
I have no real need to learn anything for a job, it's just a hobby right
now. I mostly just want "a programming language that has a different
philosophy or approach than
Python". However, you guys are right, if I just learn a language without a
reason, it will be worthless.
When I tried to learn
Well, it's admirable that you're wiling to stick with it and learn
something new.
One other resource that I've personally been meaning to look into but
just haven't had time is Programming from the Ground Up. It teaches
computer science using Assembly language, quite literally from the
"ground up.
Sorry, forgot the link:
Programming from the Ground Up
http://savannah.nongnu.org/projects/pgubook/
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Tue, Oct 6, 2009 at 9:39 PM, Mark Young wrote:
> I'm now fairly familiar with Python, so I'm thinking about starting to
> learn a second programming language. The problem is, I don't know which to
> learn. I want a language that will be good for me to learn, but is not so
> different from pyth
On Tue, Oct 6, 2009 at 2:26 PM, Serdar Tumgoren wrote:
> I have a set of classes that I've named models.py (following the
> Django convention, though it's not technically a Django project or
> app).
>
> Inside that file, I had initially grouped together a number of
> classes, subclasses and mixin
On Tue, Oct 6, 2009 at 12:39 PM, Mark Young wrote:
> I'm now fairly familiar with Python, so I'm thinking about starting to
> learn a second programming language. The problem is, I don't know which to
> learn. I want a language that will be good for me to learn, but is not so
> different from pyt
On Tue, Oct 6, 2009 at 11:08 AM, Wayne wrote:
> On Tue, Oct 6, 2009 at 9:58 AM, Dave Angel wrote:
>>
>>
>>
>> No, because you're not assured that all integers that are equal are the
>> same object. Python optimizes that for small integers, but there's no
>> documented range that you can count o
On Tue, Oct 6, 2009 at 9:04 AM, Wayne wrote:
> If it's checking the returncode against a value, Vern makes a good point:
> if returncode != 0 makes a whole lot more sense than "if not returncode ==
> 0"
> Though when dealing with an integer return code, doesn't it make more sense
> to use the "is
"Mark Young" wrote
I have no real need to learn anything for a job, it's just a hobby right
now. I mostly just want "a programming language that has a different
philosophy or approach
In that case consider Lisp (probably via Scheme) or SmallTalk.
Both are apparemtly different to Python but on
On Tue, Oct 06, 2009 at 03:39:36PM -0400, Mark Young wrote:
> I'm now fairly familiar with Python, so I'm thinking about starting to learn a
> second programming language. The problem is, I don't know which to learn. I
You have already got a lot of healthy advice in this thread.
I would like to su
Ok, thanks alot everybody. I think I'll start with either Scheme or C, I
haven't decided yet. I was pleasantly surprised by how Scheme looks, it's
much prettier than some other languages I looked at.
Contributing to a project actually sounds like a good idea, I've never done
a project with other p
Mark Young wrote:
I have no real need to learn anything for a job, it's just a hobby right
now. I mostly just want "a programming language that has a different
philosophy or approach than
Python". However, you guys are right, if I just learn a language without a
reason, it will be worthless.
W
Want another functional language besides scheme? Haskell.
It looks pretty cool, and I want to learn it too.
Here's some resources:
A speach about haskell
http://www.infoq.com/interviews/armstrong-peyton-jones-erlang-haskell
Beginner's book
http://learnyouahaskell.com/introduction
Another book
39 matches
Mail list logo