Thanks! - I figured there was an easy answer, but somehow I didnt find it in the web2py book.
On Mar 2, 2:36 pm, Anthony <abasta...@gmail.com> wrote: > On Wednesday, March 2, 2011 1:53:32 PM UTC-5, Martin.Mulone wrote: > > Yes I do with this command: > > > python web2py.py -S appname -M -N -R > > /home/martin/web2py/applications/appname/private/myscript.py > > You can also just do: > > python web2py.py -S appname -M -N > > which will launch an interactive Python shell, and then type in commands you > want to run (including importing a module, etc.). For more details about > command line options and the shell, > seehttp://web2py.com/book/default/chapter/04#Command-Line-Options. > > Another option is to use the web-based interactive shell in the admin > interface. On the Edit Application page, it's the "Shell" button under > "Controllers". It's discussed in the book > here:http://web2py.com/book/default/chapter/03#More-on-admin > > Anthony > > > > > > > > > > > 2011/3/2 Philip <philip...@gmail.com> > > >> This may be a dumb question - Is there a way to type a short python > >> script into a prompt to execute within an application? I want to > >> import (once) a number of csv files with a shared dictionary (so > >> uploading them one at a time through app admin won't work). It seems > >> a little strange to write a new function within a controller and then > >> navigate to that url to cause it to execute, so I'm just curious if > >> there is a simpler way to execute a function that operates within an > >> app (i.e. interfaces with the database), but doesnt require a web > >> interaction or view. > > >> Thanks > > > -- > > Pablo Martín Mulone (mar...@tecnodoc.com.ar) > >http://www.tecnodoc.com.ar/ > > > My blog:http://martin.tecnodoc.com.ar > > Expert4Solution Profile: > >http://www.experts4solutions.com/e4s/default/expert/6