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


Groups > comp.lang.python > #8110

Re: running an existing script

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <bsk16@case.edu>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'url:sourceforge': 0.02; 'python.': 0.04; 'python?': 0.05; 'typing': 0.05; 'script,': 0.07; 'python': 0.08; '21,': 0.09; 'matlab': 0.09; 'path.': 0.09; 'am,': 0.14; 'wrote:': 0.14; '10:45': 0.16; 'adam': 0.16; 'friends)': 0.16; 'toolbox': 0.16; 'tue,': 0.17; 'perl': 0.19; 'script.': 0.19; 'shell': 0.19; 'command': 0.19; 'java,': 0.19; 'header:In- Reply-To:1': 0.21; 'java': 0.21; 'trying': 0.23; 'pieces': 0.23; 'code': 0.24; 'url:doc': 0.26; 'url:mailman': 0.26; 'windows': 0.26; 'script': 0.27; 'example': 0.27; "i'm": 0.27; 'message- id:@mail.gmail.com': 0.28; 'installed': 0.28; 'url:listinfo': 0.30; 'parent': 0.30; 'changes': 0.30; 'hi,': 0.31; 'seem': 0.32; "can't": 0.32; 'to:addr:python-list': 0.33; "isn't": 0.33; 'source': 0.34; 'file': 0.34; 'however,': 0.34; 'there': 0.35; 'probably': 0.36; 'uses': 0.36; 'rules': 0.37; 'received:google.com': 0.37; 'hack': 0.37; 'perform': 0.37; 'put': 0.37; 'think': 0.38; 'url:python': 0.38; 'received:74.125': 0.38; 'url:org': 0.38; 'run': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'called': 0.39; 'either': 0.39; 'to:addr:python.org': 0.39; 'listed': 0.40; 'current': 0.40; 'unix': 0.40; 'url:net': 0.63; 'link': 0.64; 'show': 0.66; 'chapman': 0.84; 'activex': 0.93
MIME-Version 1.0
In-Reply-To <e7c49eba-987f-4192-bfb6-afe0b0eddfbd@l6g2000vbn.googlegroups.com>
References <e7c49eba-987f-4192-bfb6-afe0b0eddfbd@l6g2000vbn.googlegroups.com>
Date Tue, 21 Jun 2011 11:25:16 -0700
Subject Re: running an existing script
From Benjamin Kaplan <benjamin.kaplan@case.edu>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-Junkmail-Status score=10/49, host=mpv1.tis.cwru.edu
X-Junkmail-Signature-Raw score=unknown, refid=str=0001.0A020209.4E00E20D.0161,ss=1,fgs=0, ip=74.125.83.182, so=2010-12-23 16:51:53, dmn=2009-09-10 00:05:08, mode=single engine
X-Junkmail-IWF false
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>
Newsgroups comp.lang.python
Message-ID <mailman.236.1308680727.1164.python-list@python.org> (permalink)
Lines 45
NNTP-Posting-Host 82.94.164.166
X-Trace 1308680727 news.xs4all.nl 49048 [::ffff:82.94.164.166]:51740
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:8110

Show key headers only | View raw


On Tue, Jun 21, 2011 at 10:45 AM, Adam Chapman
<adamchapman1985@hotmail.co.uk> wrote:
> Hi,
>
> I'm trying to put together a lot of pieces of source code in matlab,
> java, perl and python.
>
> Im an expert when it comes to matlab, but novice in all the others
> listed above. However, I have integrated the java and perl code so
> they can be called from matlab.
>
> I know that there is a toolbox out there called Pymat but i think that
> uses 32bit activex so rules my configuration out.
>
> However I think I can hack in to the python command prompt from
> matlab.
>
> Basically I just want to run a single script from the python command
> window. Once I know how to do that I can be off on my way to perform
> the matlab interfacing.
>
> there is an example of the command I need in the python prompt at
> http://jboost.sourceforge.net/doc.html#cv .
>
> however, I can't seem to run the python script by typing the command
> on that link in the python prompt.
>

That command they show isn't run from a Python shell. It's run from
either a Unix shell (bash and friends) or a Windows command prompt
(cmd). If you want to run a script, you have to give the path to that
script. ./ means the current directory and .. is the parent directory
if you want to give relative paths, or you can just write out the
whole file path.

> Can I please ask how to set the current duirectory in python?
>

os.chdir changes the current directory, but you probably don't need to do that.

> the script I want to run is in a different directory to the one python
> is installed to
> --
> http://mail.python.org/mailman/listinfo/python-list
>

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


Thread

running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-21 10:45 -0700
  Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-21 11:32 -0700
  Re: running an existing script Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-06-21 11:25 -0700
  Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-21 12:00 -0700
    Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-21 13:12 -0700
      Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 08:54 -0700
        Re: running an existing script Chris Rebert <clp2@rebertia.com> - 2011-06-22 09:13 -0700
        Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 09:35 -0700
        Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 09:15 -0700
          Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 09:51 -0700
            Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 09:51 -0700
              Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 10:13 -0700
                Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 10:46 -0700
                Re: running an existing script Adam Chapman <adamchapman1985@hotmail.co.uk> - 2011-06-22 10:54 -0700
                Re: running an existing script Ethan Furman <ethan@stoneleaf.us> - 2011-06-22 11:50 -0700

csiph-web