468,765 Members | 1,458 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Where to go from here? newbee

Just downloaded python for the fun of it.
What do I run to begin coding with?
Version 2.3.3

When I run the "command line" thing, I get a dos window.
Now what?

The built in tutor explains some basics about programming but zilch on where
to begin.
BTW, you have 357 days left to do your christmas shopping.

Jul 18 '05 #1
8 1318
On Wed, 31 Dec 2003 23:22:43 -0600, in article
<news:bt*********@enews1.newsguy.com>, Richard wrote:
Just downloaded python for the fun of it.
What do I run to begin coding with?
Version 2.3.3
Yes, unless you have some reason to use an older release.
When I run the "command line" thing, I get a dos window.
Now what?


Type some commands and see how the interpreter works.

Go to http://www.cs.unm.edu/~ej and click on these links.

Python Hacking I (Just do it!)
Python Hacking II (types, functions, exceptions)
Python Hacking III

Type the commands and see what happens.

Go to http://www.python.org/ and find some more advanced tutorials.
Jul 18 '05 #2
If you are sure you're up to it, here's a good place to start...
http://www.ibiblio.org/obp/thinkCSpy/

Wil
my 2
"When everything seems to be going well, you have obviously overlooked
something."
Richard wrote:
Just downloaded python for the fun of it.
What do I run to begin coding with?
Version 2.3.3

When I run the "command line" thing, I get a dos window.
Now what?

The built in tutor explains some basics about programming but zilch on where
to begin.
BTW, you have 357 days left to do your christmas shopping.

Jul 18 '05 #3
Wil Schultz wrote:
If you are sure you're up to it, here's a good place to start...
http://www.ibiblio.org/obp/thinkCSpy/
All nice and good for somebody with no knowledge of what a computer language
is and does.
It's like teaching 1st grade stuff to a college grad.
This tells me nothing on how to get started.
But I understand that the actual coding can be written in a text editor then
compiled?
Wil
my 2
"When everything seems to be going well, you have obviously overlooked
something."
Richard wrote:
Just downloaded python for the fun of it.
What do I run to begin coding with?
Version 2.3.3

When I run the "command line" thing, I get a dos window.
Now what?

The built in tutor explains some basics about programming but zilch on
where to begin. BTW, you have 357 days left to do your christmas
shopping.

Jul 18 '05 #4
Jules Dubois wrote:
On Wed, 31 Dec 2003 23:22:43 -0600, in article
<news:bt*********@enews1.newsguy.com>, Richard wrote:
Just downloaded python for the fun of it.
What do I run to begin coding with?
Version 2.3.3 Yes, unless you have some reason to use an older release. When I run the "command line" thing, I get a dos window.
Now what?

Type some commands and see how the interpreter works. Go to http://www.cs.unm.edu/~ej and click on these links. Python Hacking I (Just do it!)
Python Hacking II (types, functions, exceptions)
Python Hacking III Type the commands and see what happens. Go to http://www.python.org/ and find some more advanced tutorials.


Ok. Now I'm slowly understanding. I guess you could say that python is
similar to visual basic and c++ in coding.
I have a program written in python which has several "py" files included.
How do I view these for the coding examples?
Jul 18 '05 #5
On Thu, 1 Jan 2004 09:45:00 -0600, rumours say that "Richard"
<an*******@127.000> might have written:
I have a program written in python which has several "py" files included.
How do I view these for the coding examples?


..py files are the source of python programs --plain text files. Use
your favourite text editor.
--
TZOTZIOY, I speak England very best,
Ils sont fous ces Redmontains! --Harddix
Jul 18 '05 #6
Richard ....

A good way to get started with Python
is to use the interpreter in command-line mode
and experiment with it just by trying different things ....

Anything that works using the interpreter interactively
will also work by coding the commands in a text editor
and saving as a Python source file with the .py extension ....

To execute a saved program, open a DOS window,
and enter ....

python someProg.py

You may have to include your python installation directory
in the Windows path environment variable ....

set path=%path%;x:\yourPath\PythonXXX

A sample interactive session follows ....

You can copy/paste it into a text editor,
whack out the >>> and ... prompt characters,
save it as a .py file, and then execute
for a test ....

--
Cousin Stanley
Human Being
Phoenix, Arizona

# Lines beginning with the pound sign .... # are comments ....
.... #
.... # Create some named objects
.... # and bind these names
.... # to their values
.... root2 = 2**0.5
r = 42.0
x = r / root2
y = x
z = ( x**2 + y**2 )**0.5
# Define a function to print objects .... def fprint( arg ) : .... print ' ' , arg
.... # Create a list of objects .... list_objects = [ r , x , y , z ]

# Print the objects .... for this_object in list_objects : .... fprint( this_object )
....
42.0
29.6984848098
29.6984848098
42.0


Jul 18 '05 #7
Richard,

Being a newbie to Python myself, I can relate.

One way...assuming windows
Click on the python command line thing you evidently found. This gives you a dos box showing the
Python prompt...>>>
Just type Python commands: print "Hello World", for example
Control Z to exit

Another way....
Bring up a 'real' dos box, cd to Python23, or whatever your install named it, and enter python
This again shows the Python prompt >>>

From the dos prompt, you can run a Python script by entering:
python myscript.py
where myscript is a text file with an extension of py, and located in the C:\python23 dir.

If you make a sub-directory myfiles (adviable) under C:\python23, to hold your test scripts, you
need to enter:
python myfiles\myscript.py

A third way...
Use a text editor to manage files and directories, and which may be able to launch dos commands.
There are dozens of editors out there, some good, some not so good. I use PFE, and have for years.

Hope this helps a bit.

Norm

On Thu, 1 Jan 2004 09:45:00 -0600, "Richard" <an*******@127.000> wrote:
Jules Dubois wrote:
On Wed, 31 Dec 2003 23:22:43 -0600, in article
<news:bt*********@enews1.newsguy.com>, Richard wrote:

Just downloaded python for the fun of it.
What do I run to begin coding with?
Version 2.3.3
Yes, unless you have some reason to use an older release.

When I run the "command line" thing, I get a dos window.
Now what?

Type some commands and see how the interpreter works.

Go to http://www.cs.unm.edu/~ej and click on these links.

Python Hacking I (Just do it!)
Python Hacking II (types, functions, exceptions)
Python Hacking III

Type the commands and see what happens.

Go to http://www.python.org/ and find some more advanced tutorials.


Ok. Now I'm slowly understanding. I guess you could say that python is
similar to visual basic and c++ in coding.
I have a program written in python which has several "py" files included.
How do I view these for the coding examples?


Jul 18 '05 #8
On Thu, 1 Jan 2004 09:45:00 -0600, in article
<news:bt*********@enews1.newsguy.com>, Richard wrote:
Jules Dubois wrote:
> Go to http://www.cs.unm.edu/~ej and click on these links.
> Python Hacking I (Just do it!)
> Python Hacking II (types, functions, exceptions)
> Python Hacking III

> Type the commands and see what happens.


Ok. Now I'm slowly understanding.


In an earlier article, you said "It's like teaching 1st grade stuff to a
college grad." These files were created by a university senior and were
intended as quick-and-dirty "tutorials", introducing Python to a
senior-level engineering class. All were new to Python.

What I liked about the tutorials was they were instructive but required the
user to determine the correspondence between the input and output. If you
or anyone else wants the tutorials, download them now before the account is
removed. I believe the author graduated in December.
I guess you could say that python is
similar to visual basic and c++ in coding.
It's not much like Visual Basic and is perhaps somewhat similar to C++. As
I learn Smalltalk, what I'm noticing more and more is how similar they are
-- less Smalltalk's integrated environment.

Further, if you're an experienced programmer, I recommend _Python in a
Nutshell_ by Alex Martelli. I've read it cover to cover about a dozen
times now and my conclusion is that it's one of the very best programming
language books I've read (and I've read many in the last 25 years.)

Finally, download the Python documentation from Python.org.
I have a program written in python which has several "py" files included.
How do I view these for the coding examples?


..py files are source code, so load them into your favorite text editor. I
use XEmacs.
Jul 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Newbee | last post: by
2 posts views Thread by Mel | last post: by
reply views Thread by Martin Arvidsson, Visual Systems AB | last post: by
2 posts views Thread by Rene | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.