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


Groups > comp.lang.python > #84554

Re: Hello World in Python

From "Christopher J. Pisz" <cpisz@austin.rr.com>
Newsgroups comp.lang.python
Subject Re: Hello World in Python
Date 2015-01-24 22:53 -0600
Organization A noiseless patient Spider
Message-ID <54C476B8.2040100@austin.rr.com> (permalink)
References <ma1b8f$pgf$1@dont-email.me> <mailman.18118.1422148393.18130.python-list@python.org>

Show all headers | View raw


On 1/24/2015 7:12 PM, Terry Reedy wrote:
> On 1/24/2015 6:53 PM, Christopher J. Pisz wrote:
>> I am trying to help a buddy out. I am a C++ on Windows guy. This buddy
>> of mine is learning Python at work on a Mac. I figured I could
>> contribute with non language specific questions and such.
>>
>> When learning any new language, I said, the first step would be a Hello
>> World program. Let's see if we can get that to work.
>>
>> 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.
>
> It should.  In a Windows console, using 3.4:
> C:\Programs\Python34>type tem.py  # cat on Mac?
> print('Hello World!')
>
> C:\Programs\Python34>python tem.py
> Hello World!
>
>  > Can anyone explain why there is no output?
>
> Without a copy of the file and command, as above, no.
>
>  > Can anyone recommend a good walkthrough of getting set up and doing
> basics?
>
> Since you used 2.x  print syntax: https://docs.python.org/2.7/
>
> "Python Setup and Usage
> how to use Python on different platforms"
>
> "Tutorial
> start here"
>
>  > I'll probably end up learning python myself, just to help out.
>
> You might possibly enjoy Python as a complement to C++.  Some people
> prototype in Python and rewrite time critical functions in C++.  One can
> access .dlls either directly (via the ctypes module) and write a wrapper
> file in C or C++.  I believe Python has also been used to write tests
> for C++ functions (I know this is true for Python and Java, via Jython).
>

Good docs. I got setup in Windows in 10 minutes.

Back to comp.lang.python | Previous | NextPrevious 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