I figured I'd post it here before posting it in the Programming the Site forum. Setting up the Smogon development environment This tutorial will help you install the dependencies needed for running the SVN checkout on your computer. Step 0a. Choosing an IDE. Worthy candidates are SciTE, which is pretty lightweight, Komodo Edit, somewhat heavy, based around the Mozilla code and with support for debugging and syntax autocompletion, and emacs. Step 0b. An informal introduction to the Windows Command Shell. This will be really important so read this if you do not know how to use the Windows Command prompt. A non-issue for Linux users since they universally know how to use their shell anyway. -> How to start: Start > Run, enter cmd and hit Enter or click OK. -> Commands you'll need to know for this tutorial: cd: changes the directory. Code: C:\Programming>cd smogon C:\Programming\smogon>_ Instead of the directory name, a complete path can be entered. For instance, entering cd programming\smogon on C:\ will take you to C:\Programming\smogon. To go to the parent directory, enter cd ... To go to the drive root, enter cd \. An important note, File and directory names are case-insensitive. Another important note, You can use TAB to auto-complete directory names, e.g. cd pro<TAB> completes pro to programming. If there are more than one files or directories that match, then TAB cycles through them in alphabetical order. You can also hit TAB if there is nothing to autocomplete, in which case it simply cycles through the files and directories in an alphabetical order. Finally, you can copy output from the command prompt. To do that, right-click in the black region and select 'Mark'. Select the region you want to copy with the mouse and hit Enter to copy it to the clipboard. Step 1. Installing Python and MySQL Download Python 2.6 from http://www.python.org/download/ and install. The installation is pretty straightforward. Download MySQL 5.1 from http://dev.mysql.com/downloads/mysql/5.1.html and install. Please note that there is no need to register as a user; in fact, there's a rather concealed "No thanks, just take me to the downloads!" link just below the login/registration forms. Also note that you must click the link in order to see the list of mirrors. The installation is pretty straightforward, but you'll be presented with a configuration screen at the end of it. Just proceed with the default selected options, and enter a password you like for the root account (setting it to root is a bad idea, even if you have "Enable remote users to log on as root" checked off). Start MySQL by the shortcut in the start menu. Log on as root, then invoke the following commands: Code: mysql> CREATE USER smogon IDENTIFIED BY 'password'; mysql> GRANT ALL ON *.* TO 'smogon'@'localhost'; Replace 'password' with your password of choice. You could modify line 2 to GRANT ALL ON db TO 'smogon'@'localhost'; where db is the name of the database to which the access is to be provided (for instance dex or user, etc). Exit MySQL by typing exit and hitting enter. Step 2. Setting up the PATH. First of all, we need to set up the PATH variable to include the Python directory and the Scripts subdirectory, along with the directory where you will place the smogon checkout. Windows users: Press WinKey + PauseBreak or right click My Computer and select Properties to bring up the System Properties box. Under the Advanced tab, click Environment Variables to bring up another dialog box with two lists. Search the lists for an entry called PATH. If none exists, create one by clicking New and enter the following as the value. Else, select it and click Edit, and append a semicolon to the end of the value and then append the following to it. Code: C:\Python26;C:\Python26\Scripts;C:\Programming Similarly create another entry by the name of PYTHONPATH with the value C:\Programming (Replace C:\Python26 with the path where Python is installed. Replace C:\Programming with wherever you want to store the site code. Note that the site code will ultimately go in a folder called smogon under this folder. Do not replace C:\Programming with C:\) Linux users: Any good package manager should have placed python and all related paraphernalia in /usr/bin so the only change we should need to make to the system path is to add the Smogon specific stuff. To add the Smogon directory for the current session only simply run the following command: Code: export PATH=$PATH:/home/tim/Projects export PYTHONPATH=/home/tim/Projects Where /home/tim/Projects is the path to the directory where the Smogon folder will reside. To make the change permanent you need to add that line to the .bash_profile file in your home directory or adapt any existing declaration you might find there (it's a hidden file so you will need to press Ctrl+H in nautilus to make it appear) or do the same with /etc/profile to make the change systemwide. Step 3. Installing setuptools/easy_install To begin with, install easy_install since it will greatly aid the process of installing the other dependencies. The package page on PyPI doesn't have a Windows version for Python 2.6 yet, so we are going to manually install it. Download ez_setup.py. Start the command prompt and cd to where you downloaded the file, then invoke it by executing the following command: Code: C:\Programming>ez_setup.py This will produce a lot of output. If you get "Setuptools version 0.6c9 or greater has been installed." or anything that denotes success at the end of it, the process was successful. If not, post the log in this thread. Now enter 'easy_install' on the command prompt. You should get an output similar to the following: Code: C:\Programming>easy_install error: No urls, filenames, or requirements specified (see --help) C:\Programming> If you get something like this: Code: C:\Programming>easy_install 'easy_install' is not recognized as an internal or external command, operable program or batch file. Then the PATH was not properly set up. Restart your computer and try executing the command, if it still doesn't work, you have set up the path incorrectly. Step 4. Installing the dependencies By this point, you should have a working copy of easy_install. Enter the following commands one-by-one at the command prompt: easy_install colubrid easy_install mako easy_install formencode easy_install sqlalchemy easy_install PIL easy_install paste That finishes up the list of dependencies that can be installed automatically with the help of easy_install, leaving us with two others, namely MySQLdb and advas. MySQldb: The project page on SourceForge still doesn't have a binary for Python 2.6, so we are going to get a custom-compiled one. Get the installer here, it'll require libguide40.dll and libmmd.dll, download them and place them in the lib\site-packages folder of your Python installation. advas: The process to install advas is relatively shorter. Download advas-0.2.3.tar.gz and unpack it. Then start the command prompt, cd to where you unpacked it, and run the following command: Code: C:\Programming\advas-0.2.3>setup.py install C:\Python26\lib\distutils\dist.py:266: UserWarning: Unknown distribution option: 'release' warnings.warn(msg) running install running build running build_py creating build creating build\lib creating build\lib\advas ... byte-compiling C:\Python26\Lib\site-packages\advas\successorVariety.py to succes sorVariety.pyc byte-compiling C:\Python26\Lib\site-packages\advas\synonym.py to synonym.pyc byte-compiling C:\Python26\Lib\site-packages\advas\__init__.py to __init__.pyc running install_egg_info Writing C:\Python26\Lib\site-packages\advas-0.2.3-py2.6.egg-info C:\Programming\advas-0.2.3>_ If you get an output like that, the process was successful. Only one last dependency now remains, lightorm. SVN checkout the following url: svn://linear.cc/lightorm/tags/0.02a Installation process is similar to advas. Step 5. Getting the SVN checkout. PM chaos with a username/password combo to get yourself an account. Then create a directory called 'smogon' under the Programming folder. Windows users: Get TortoiseSVN, install and restart your PC. Then open the Programming folder, right-click the smogon folder and select 'SVN Checkout...'. Enter svn://smogon.com/smogon/trunk under 'URL of repository' and click OK. The process will take some time. Linux users: Run 'svn co svn://smogon.com/smogon/trunk' under the smogon directory. Step 6. Last steps Create a file by the name of config.py under smogon with the following contents: Code: password="aaa" Where aaa is the password for the user "smogon". Run test.py and access localhost:9999 in your browser. If you see a layout similar to smogon's, the setup was successful. Post any problems here.