Re: Python education survey

2011-12-20 Thread Ashton Fagg
On 20 December 2011 13:51, Raymond Hettinger
 wrote:
> Students may not be experienced with the command-line and may be
> running Windows, Linux, or Macs.  Ideally, the tool or IDE will be
> easy to install and configure (startup directory, path, associated
> with a particular version of Python etc).

I tutor people (usually fellow students) in programming occasionally,
and I've always recommended a simple text editor and a command line
(this correlates with most languages, not just Python). My personal
set up (using Linux) is vim (with line numbers and syntax
highlighting) + shell, no matter which language I'm working with.
However for people I'm tutoring, particularly if they're new to
programming in general and would find vim intimidating, I recommend
gedit (for Linux) or Notepad++ (for Windows), executing/compiling from
the command line.

As long as the text editor has line numbers and syntax highlighting
it's sufficient in my book. I don't like obfuscating what's going on
in the background (i.e. interacting with the Python/C/ interpreter/compiler/whatever) with a fancy IDE. However that is
my personal (strong) opinion.

Hope that helps.

-- 
Ashton Fagg
E-mail: ash...@fagg.id.au
Web: http://www.fagg.id.au/~ashton/

Keep calm and call Batman.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Learning Python 2.4

2011-12-20 Thread Ashton Fagg
On 21 December 2011 10:31, Rick Johnson  wrote:
> Kimma, don't listen to either of these guys. Anything before Python
> 3.0 is now obsolete. We are currently at 3.2.2 for a stable release.
> If a tutorial writer is too lazy to update his tutorial to AT LEAST
> Python 3.0, THEN he is a fool and should be banished from not only
> this community, but from the Internets also.

I got the impression the OP was learning programming in general (i.e.
from scratch) and not merely "learning Python". If this is the case it
shouldn't matter if they're merely learning the concepts as you can
always get up to speed on the differences later on as they get more
experienced.

If they are "learning Python" (i.e. have programmed previously and are
learning this as a new language), learning the basics from the book
would be fine and it shouldn't be too hard to get up to speed on the
newer stuff later on. Although I'd recommend starting on the latest
iteration if possible, as it will alleviate some of the leg work of
catching up on the newer features.

Cheers.


-- 
Ashton Fagg
E-mail: ash...@fagg.id.au
Web: http://www.fagg.id.au/~ashton/

Keep calm and call Batman.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Learning Python 2.4

2011-12-21 Thread Ashton Fagg
On 21 December 2011 20:06, DJC  wrote:
>
> In which case the most important thing is the quality of the book as a
> text on Programming. If you find the the author's style to your taste,
> then use that book rather than struggle with a text based on a recent
> version that you personally find unreadable.

This is very good advice.

-- 
Ashton Fagg
E-mail: ash...@fagg.id.au
Web: http://www.fagg.id.au/~ashton/

Keep calm and call Batman.
-- 
http://mail.python.org/mailman/listinfo/python-list


Setting an environment variable.

2012-01-02 Thread Ashton Fagg

Hi list.

A bit new to Python so please forgive my potential ignorance.

I'm working with an embedded machine, which is using a Python script to 
oversee the acquisition of some data. The supervisor script, which is 
run by crontab every 5 minutes, relies on an environment variable to be 
set. I've tried to set the environment variable inside crontab, however 
this doesn't work when the script runs.


Is there a nice way to do this inside the supervisor script itself? 
Would an os.system("export foo=/bar/foo/bar") at the very beginning of 
the script do what I want? I would just like to check before I make 
changes, as being an embedded machine it's a bit of a pain to update 
things like this...(read only file system)


Note: This is for Python 2.4. I have no ability to update to anything 
newer as this is what our codebase relies upon.


Thanks and regards,
Ashton.

--
Ashton Fagg (ash...@fagg.id.au)
Web: http://www.fagg.id.au/~ashton/

Keep calm and call Batman.
--
http://mail.python.org/mailman/listinfo/python-list