Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #84527

Re: Hello World in Python

References <ma1b8f$pgf$1@dont-email.me>
Date 2015-01-25 11:05 +1100
Subject Re: Hello World in Python
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.18114.1422144321.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, Jan 25, 2015 at 10:53 AM, Christopher J. Pisz
<cpisz@austin.rr.com> wrote:
> So my buddy creates opens the IDE they gave at the workplace, creates a new
> project, adds a demo.py file, writes one line : print "Hello World", hits
> Run in the IDE and indeed the display is shown at the bottom when it
> executes.
>
> I say the next step would be to get that to run on the command line. So
> (keep in mind I know nothing about macs) my buddy opens a "zsh?" window, cd
> to the directory, and I say the command i most likely: python demo.py
>
> It looks like it executes but there is no output to the command line window.
>
> Can anyone explain why there is no output?
> Can anyone recommend a good walkthrough of getting set up and doing basics?

Your broad methodology is fine! I'd normally expect that to work
correctly. Was the file properly saved? Ask him to display the file
(cat demo.py) to make sure it's what he thinks. Or maybe he's in a
different directory to the one he thinks he's in; again, catting the
file will help. Otherwise, it might be a weird problem with his shell,
but that's hard to diagnose.

One thing that I really like doing with my Python students (full
disclosure: I'm a mentor with www.thinkful.com and am thus at times
paid to help people learn Python) is some form of screen-sharing, so I
can watch him/her trying things. There are a number of zero-dollar
ways to do this, and it helps enormously. Flip on screen-share, ask
him to run the script, and see where that leads.

Good luck!

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Hello World in Python "Christopher J. Pisz" <cpisz@austin.rr.com> - 2015-01-24 17:53 -0600
  Re: Hello World in Python Chris Angelico <rosuav@gmail.com> - 2015-01-25 11:05 +1100
    Re: Hello World in Python Rustom Mody <rustompmody@gmail.com> - 2015-01-24 23:14 -0800
      Re: Hello World in Python Chris Angelico <rosuav@gmail.com> - 2015-01-25 18:27 +1100
  Re: Hello World in Python Terry Reedy <tjreedy@udel.edu> - 2015-01-24 20:12 -0500
    Re: Hello World in Python "Christopher J. Pisz" <cpisz@austin.rr.com> - 2015-01-24 22:53 -0600

csiph-web