Eclipse

April 11, 2008

10k more AppEngine beta accounts available and more Language Support

Pete Koomen, Product manager for Google App Engine has announced 10k more beta accounts. He also announced support for more languages, offline processing and support for large files. I wonder what languages will be supported next.

 

 

April 10, 2008

Getting Started on Google App Engine with Flex and PyAMF (2)

UPDATE: For setting up PyAMF I recommend using this article written over on PyAMF. This original post was written before a patch was created. And there instructions will be more up to date and maintained.

 

The previous article on this topic can be found here.

I’m also shamelessy pulling from this article. It almost got me there, but there was one thing noted below that I needed to do. 

1. Download pyamf.

2. Now unzip the pyamf into a directory ( i went with c:/pyamf ) and browse to it from the command prompt. When you get to the source folder run “ez_setup.py”.

3. Now complete the following steps ( original reference can be found here )

  • Download and unpack pyAMF-0.2
  • Download fpconst and put it in pyAMF-0.2/pyamf
  • Delete the file pyAMF-0.2/pyamf/adapters/__init__.py
  • Comment out the line register_adapters(); at the end of pyAMF-0.2/pyamf/__init__.py

 (I did these steps and found I still needed to comment out line 26 in the pyAMF-0.2/pyamf/__init__.py that looks like:  from pyamf.adapters import register_adapters )

4. After that is completed, go back to your command prompt and run “setup.py install”

5. Afterwards in the directory where you downloaded pyamf you should have a directory that has a dist directory under that. Add the .egg in the dist directory to your System – PYTHONPATH. in windows > prefs > PyDev > Interepretor just like we did for the google.zip file above. ( This will bring in code completion support )

6. From the command prompt start your server   /appengine/dev_appserver.py {app name}

7. Browse to http://localhost:8080/

if everything’s set up and running properly you’ll see something like

400 Bad Request

To access this PyAMF gateway you must use POST requests (GET received)


 


 


8. Finally, create a flex app.  Below is the code I used. You should be able to drop it in your flex app file. If everything works you can use the appcfg.py commands to upload your application and point your endpoint to your new application url.  


Pyamfcode1


 


This is by no means complete and I hope to get more examples up and running soon. If you have any questions feel free to comment or email me. I’ll be posting on how to debug python apps from eclipse when making calls from flex and also some other topics that have been floating around. Like Google Authentication.


 


 


 


 


 


 



 

April 09, 2008

Getting Started on Google App Engine with Flex and PyAMF (1)

So this is my first of hopefully two posts on getting setup to work on Google App Engine. This will get your python and local google server up and running

1. Download and install python if you need to.

2. Download and install the google app engine sdk. I recommend installing this somewhere on your system that is easily accessible. By default on windows it went under /program files/google/appengine. I reinstalled it under c:/appengine/ for easy access from the command prompt. Do as you will but remember where it gets put.

3. Install pydev into your eclipse. There’s a great getting started guide for pydev located here. It explains how to set your python interpreter up.  

To add code complete support for the google sdk in eclipse first zip up the google directory in your appengine installation directory. Then go to windows > prefs > PyDev > Interpretor : System PYTHONPATH click “New Egg/Zip” and add that google.zip

UPDATE: The crossed out steps are better explained by this post  about getting your debugger up and running in eclipse.

4. Create a new PyDev project. Finish. 

5. Now browse to your appengine installation directory and copy / paste the new_project_template into the same directory. Then rename it to the name of  your project.

6. And now back in eclipse right click on the src folder and do a add new folder > advanced > Link to the file system and browse to the project folder under your appengine installation.

7. Open app.yaml on the top line change the application: new-project-template to application : your-app-name

 

Now open a command prompt and go to your appengine isntallation directory and type dev_appserver.py —port=9999 {YOUR APP FOLDER NAME}

Then open a browser and go to http://localhost:9999/ and you should see it running.

 

Installing PyAMF and Setting up flex environment next.