Tuesday, November 18, 2008

How to upload an Application on Google's Cloud

If you have an idea on creating an application for the web, look no further. It actually take a few simple steps to get your application on the web. First, you have to have a google account in order for upload your application. If you don't have an account, you can register from the homepage of Google. The second step to getting you application on the cloud is to go to the URL . Here, you can click on the "Create an Application" button which directs you to a webpage that gives you full instructions to create the application. After finishing the instructions, you must go back to your application program and type in the following command: appcfg.py update helloworld/ . Once you type and run this command, your application is upload onto the cloud for everyone to see. The link provided ( ) is another instructional on how to create and upload your own application.

Tuesday, November 11, 2008

Chapter 7

Alright, to be perfectly honest, I seem to be having a lot of difficulty with some of these programs that are in the book. I think I might be using the wrong GUI. I’ll bring my computer in to our meeting tomorrow so we can sit down and look at it. I also have a couple questions about chapter 5 and 6 that are bothering me.

In chapter 7, we are introduced to modules. Modules create a named scope for functions and data, but they are simpler than classes and objects. They let you separate your program into named pieces without having to use classes. Much of Pythons flexibility comes from its ability to use modules to expand its features. For example, there could be a networking module or an operating system module, etc.

In order to use a module, you have to first install it in the system. The easiest way to do this is to use the import command:

Import sys

This line will import the module named sys which contains services Python offers that mostly involve system-specific items.


To create a module, all you have to do is create a file with what you want to call it and the extension “.py”. In the book they use “Foods.py”. When we’re finished, we can import it using the name Foods without the extension. Below is a line of code that imports the Food module:

>>>import Foods
>>>dir(Foods)
[‘Fridge’, ‘Omelet’, ‘Recipe’, ‘_builtins_’, ‘_doc_’, ‘_file_’, ‘_name_’ ]
>>>

This lets us use the Fridge, Omelet, and Recipe classes. In order to access them now, we have to use Foods.Fridge, Foods.Omelet, and Foods.Recipe.

Tuesday, November 4, 2008

Chapter 6

Classes and objects are a major part of computer programming. In python, they serve as the same purpose as every other language out there. If you want to clarify a class, you need to type in the keyword, class. Lets make a class called Apartment.
class Apartment:

You must add a colon at the end of the statement. A common practice with Python programmers is to capitalize the first letter of their class. When you have more than one word for a class then you capitalize the first letter of the next word.

You can create objects very easily in Python. Once you create a class you can then create an object. This is done by usually assigning a letter to a class and assigning it blank parameters.

class Apartment:
r = Apartment()
(Note that we indent. As you work through as class, you must indent for it to work. Objects or methods cannot be underneath directly under your class. )

The primary setup of creating a class with method and objects go by.

Class
Methods
.
.
.
Objects

We learned earlier how to create methods by writing def in front of the method.
In order to get a full understanding of this chapter please look at the book. You must read the example in the book because it lays everything out. The example is really good if you forget how to do things we learned in earlier chapters.