起動

□未翻訳

□翻訳中

□翻訳完了(細田謙二)

■レビュー(Omi Chiba)

起動

Microsoft WindowsやMac版のweb2pyのバイナリ配布は、Pythonのインタープリターを同梱しています。

The binary distributions of web2py for Microsoft Windows or Apple OS X come packaged with the Python interpreter built into the distribution file itself.

以下のように(DOSプロンプトで)入力するとWindows上で起動することができます。

You can start it on Windows with the following command (type at the DOS prompt):

1.

web2py.exe -S welcome

Mac OSXでは、ターミナルウィンドウで以下のコマンドを入力します(web2py.appと同じフォルダにいる必要があります)。

On Apple OS X, enter the following command type in a Terminal window (assuming you're in the same folder as web2py.app):

1.

./web2py.app/Contents/MacOS/web2py -S welcome

Linuxや他のUnixコンピュータでは、Pythonがすでにインストールされているかを確認し、以下のようにシェルコマンドを入力してください。

On a Linux or other Unix box, chances are that you have Python already installed. If so, at a shell prompt type:

1.

python web2py.py -S welcome

もしPython2.5以降がインストールされていない場合は、web2pyを起動する前にpythonのダウンロードとインストールが必要です。

If you do not have Python 2.5 (or later 2.x) already installed, you will have to download and install it before running web2py.

-S welcomeは、welcomeアプリケーションのコントローラー内でコマンドが実行されているかのように、対話型のシェルを動作することをweb2pyに指示します。web2pyの対話型のコマンドラインと通常のPythonコマンドラインの違いはこれだけです。

The -S welcome command line option instructs web2py to run the interactive shell as if the commands were executed in a controller for the welcome application, the web2py scaffolding application. This exposes almost all web2py classes, objects and functions to you. This is the only difference between the web2py interactive command line and the normal Python command line.

管理インターフェースはアプリケーション毎にWebベースのシェルを提供します。 次のURLでwelcomeアプリケーション用のシェルにアクセスできます。

The admin interface also provides a web-based shell for each application. You can access the one for the "welcome" application at.

http://127.0.0.1:8000/admin/shell/index/welcome

本章におけるすべての例題は、通常のシェルかWebベースのシェルで試すことができます。

You can try all the examples in this chapter using the normal shell or the web-based shell.