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


Groups > comp.lang.python > #8127

Re: running an existing script

From Adam Chapman <adamchapman1985@hotmail.co.uk>
Newsgroups comp.lang.python
Subject Re: running an existing script
Date 2011-06-21 13:12 -0700
Organization http://groups.google.com
Message-ID <44f694fd-c075-41a3-a044-c1b05f2a1463@x38g2000pri.googlegroups.com> (permalink)
References <4E00E3DB.9040900@stoneleaf.us> <SNT109-W44DCBD6223E4A2C5492ECAE6510@phx.gbl> <mailman.238.1308682012.1164.python-list@python.org>

Show all headers | View raw


On Jun 21, 8:00 pm, Ethan Furman <et...@stoneleaf.us> wrote:
> Adam Chapman wrote:
> > Thanks Ethan
>
> > No way could I have worked that out in my state of stress!
>
> > For your second idea, would I need to type that into the python command
> > line interface (the one that looks like a DOS window?
>
> If you are actually in a python CLI, at the top of that screen does it
> say something like
>
> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
> ?
>
> If yes, then what I wrote earlier should actually work (I downloaded
> jBoost and looked at the nfold.py script).  Here it is again:
>
> --> import os
> --> os.chdir('path/to/nfold.py') # don't include nfold.py  ;)
> --> import nfold
> --> import sys
> --> sys.argv = ["nfold.py", "--folds=5", "--data=spambase.data",
> ... "--spec=spambase.spec", "--rounds=500", "--tree=ADD_ALL",
> ... "--generate" ]
> ...
> --> nfold.main()
>
> I fixed the sys.argv line from last time.
>
> Good luck!
>
> ~Ethan~

Thanks to both of you for your help.

It's getting late here, I'll give it another try tomorrow

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