Haha i’m such an idiot! Who says i must use Raspberry Pi to develop my web application???
Now, moving on to use Window XP to continue my Killer Web Development!
I downloaded the window version of web2py and run web2py.exe. Then i start the server. Awesome, everything works fine.
The codes below are a close reference to the link above. Just that all my codes are in windows format and for my future reference. Remember to download gedit first!
Writing first test:
C:\Document and Settings\Administrator>cd Desktop\my name\web2py_win\web2py
> .\web2py.exe -S zapp //there is a space before “.”
> CTRL+Z Enter //to exit from python shell
open up gedit from program files and type in the following, then save into the zapp folder under the file name “.hgignore”
Then back in the command prompt,
>hg add .
>hg commit -m”initial commit”
First, create the necessary directory:
Go to Python package selenium page https://pypi.python.org/pypi/selenium/2.15.0 to download the tar.gz file
extract using winrar or something else and move the selenium-2.15.0 folder to zapp\fts\lib and rename it to “selenium”
Then create another 2 .py files using gedit.
1. The blank __init__.py in zapp/fts directory
2. functional_tests.py in zapp directory (copy and paste the code from the tutorial http://killer-web-development.com/section/4/3)
Time to Test Selenium
>cd .. (to go up one level)
okay, just open gedit and copy the codes and save into /zapp/fts directory.
Then go up one level again (to zapp dir)
If you see this: ” ‘python’ is not recognized as an internal or external command, operable program or batch file.”, refer here
If you get “ImportError: No module named selenium”, edit the functional_tests.py file and change
(check your selenium folder, see screenshot)
python: can’t open file ‘../../web2py.py”: [Errno 2] No such file or directory
change ../../web2py.py into ../../web2py.exe
get “SyntaxError: Non-ASCII character ‘\x90’ in file ../../web2py.exe on line 1, but no encoding declared;”
– can’t find solutions, let’s change strategy!
Download the source version from web2py website. extract and move to the same directory. copy the zapp folder to web2py_src/web2py/applications.
Then run from there. Get the error: no handler – download pywin316 will solve the problem.
selenium still causing some problems which i still cant figure them out. argh.
hg commit and blah blah.
From here onwards, i decided to leave out the selenium test.
And learn HTML. Going to recall my task so that i won’t drift too far off. Laugh.