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


Groups > comp.lang.python > #24470

Re: Executing Python Scripts on Mac using Python Launcher

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <dthomas86@me.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'source,': 0.04; 'syntax': 0.04; 'subject:Python': 0.05; 'to:addr:comp.lang.python': 0.09; 'python': 0.10; 'cc:addr:python-list': 0.10; '11:19': 0.16; 'benjamin': 0.16; 'binary,': 0.16; 'from:addr:me.com': 0.16; 'intended.': 0.16; 'subject:using': 0.16; 'usenet': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'typing': 0.18; 'windows': 0.20; 'own.': 0.22; 'header:In-Reply-To:1': 0.23; 'error.': 0.24; "i've": 0.24; 'installed': 0.25; 'header:User-Agent:1': 0.26; 'tried': 0.26; 'command': 0.26; 'host': 0.26; 'cc:2**0': 0.27; 'post': 0.27; 'monday,': 0.27; 'window': 0.27; 'seems': 0.28; 'error': 0.28; 'script': 0.28; 'cc:no real name:2**0': 0.28; 'cc:addr:python.org': 0.29; 'image,': 0.29; 'piece': 0.29; 'run': 0.29; 'included': 0.30; 'am,': 0.30; 'compiled': 0.30; 'code': 0.31; 'feature': 0.32; 'list.': 0.33; 'running': 0.34; 'file': 0.34; 'open': 0.34; "can't": 0.34; 'received:google.com': 0.34; 'thanks': 0.35; 'python.org': 0.35; 'received:209.85': 0.35; 'question,': 0.35; 'version': 0.35; 'beginning': 0.36; 'mac': 0.36; 'but': 0.36; 'google': 0.37; 'subject:: ': 0.37; 'received:209': 0.37; 'mailing': 0.38; 'hello,': 0.39; 'easy': 0.60; 'link': 0.61; 'provide': 0.62; 'first': 0.62; 'cause': 0.64; 'photo': 0.79; 'application?': 0.84; 'mac.': 0.84; 'received:209.85.214.184': 0.84; 'received:mail- ob0-f184.google.com': 0.84
Newsgroups comp.lang.python
Date Tue, 26 Jun 2012 10:19:45 -0700 (PDT)
In-Reply-To <mailman.1494.1340653759.4697.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=81.96.195.171; posting-account=1lcE3woAAAB8YdS7bHcWjAZeCDFa_kp3
References <8b352333-23b5-4cfb-843d-29ffe1ef0905@googlegroups.com> <mailman.1494.1340653759.4697.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 81.96.195.171
MIME-Version 1.0
Subject Re: Executing Python Scripts on Mac using Python Launcher
From David Thomas <dthomas86@me.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.1520.1340731189.4697.python-list@python.org> (permalink)
Lines 37
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1340731190 news.xs4all.nl 6848 [2001:888:2000:d::a6]:56296
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:24470

Show key headers only | View raw


I have installed Python 2.7.3 from Python.org also in Terminal it states that I have 2.7.3.
How can I execute the script from Terminal?  I've tried typing python into the window and then dragging the file to terminal but I get a syntax error.  Sorry I am new to Python and just want to know how I can open such a file using 10.7.

Thanks

http://www.freeimagehosting.net/ilbqt
http://www.freeimagehosting.net/r5ars
On Monday, June 25, 2012 8:49:07 PM UTC+1, Benjamin Kaplan wrote:
> On Mon, Jun 25, 2012 at 11:19 AM, David Thomas <dthomas86@me.com> wrote:
> > Hello,
> > This is my first post so go easy on me.  I am just beginning to program using Python on Mac.  When I try to execute a file using Python Launcher my code seems to cause an error in terminal, when I execute the exact same piece of code and run it in windows it seems to execute as exactly intended.
> >  How can I make my python script to open up correctly using Python Launcher?  I am running 10.7 on my Mac.  I would upload a photo with the error I get but I can't seem to find the upload feature in this group.
> >
> > Thanks
> > --
> 
> You can't find the upload feature because this isn't a Google Group.
> It's a Usenet newsgroup that Google Groups provides access to that's
> also available as a mailing list. If you want to provide an image, use
> an image host and link to the image.
> 
> As to your question, I have a few questions of my own. What version of
> Python are you using? Is it the version included in Mac OS X,
> installed from a python.org binary, compiled by source, or installed
> through a package manager? What happens if you call the script from
> the command line instead of using the Launcher application?

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


Thread

Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-25 11:19 -0700
  Re: Executing Python Scripts on Mac using Python Launcher Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-06-25 12:49 -0700
    Re: Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-26 10:19 -0700
      Re: Executing Python Scripts on Mac using Python Launcher Dave Angel <d@davea.name> - 2012-06-26 13:37 -0400
        Re: Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-26 11:09 -0700
        Re: Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-26 11:09 -0700
        Re: Executing Python Scripts on Mac using Python Launcher Dave Angel <d@davea.name> - 2012-06-26 14:32 -0400
      Re: Executing Python Scripts on Mac using Python Launcher Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-06-26 11:56 -0700
      Re: Executing Python Scripts on Mac using Python Launcher Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-06-26 15:51 -0400
        Re: Executing Python Scripts on Mac using Python Launcher Hans Mulder <hansmu@xs4all.nl> - 2012-06-26 22:12 +0200
          Re: Executing Python Scripts on Mac using Python Launcher Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-06-26 18:35 -0400
          Re: Executing Python Scripts on Mac using Python Launcher Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-06-27 00:13 +0100
    Re: Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-26 10:19 -0700
  Re: Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-26 11:11 -0700
    Re: Executing Python Scripts on Mac using Python Launcher Hans Mulder <hansmu@xs4all.nl> - 2012-06-26 21:16 +0200
      Re: Executing Python Scripts on Mac using Python Launcher Dave Angel <d@davea.name> - 2012-06-26 16:41 -0400
        Re: Executing Python Scripts on Mac using Python Launcher Hans Mulder <hansmu@xs4all.nl> - 2012-06-26 23:48 +0200
          Re: Executing Python Scripts on Mac using Python Launcher Dave Angel <d@davea.name> - 2012-06-26 22:38 -0400
          Re: Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-27 10:05 -0700
            Re: Executing Python Scripts on Mac using Python Launcher Hans Mulder <hansmu@xs4all.nl> - 2012-06-27 20:29 +0200
              Re: Executing Python Scripts on Mac using Python Launcher David Thomas <dthomas86@me.com> - 2012-06-27 13:45 -0700
                Re: Executing Python Scripts on Mac using Python Launcher Hans Mulder <hansmu@xs4all.nl> - 2012-06-27 23:33 +0200

csiph-web