Today was a bit hard day. Had to format the computer and reinstall the softwares. So didn't get much time to spend on the project since . Clear some doubts in the task by talking with my mentor. Wrote the weekly report to send to the mentor coordinator regarding the work I did in the last week.
By the time I was very happy today because our results were out today. I got a "First Class" :)
Friday, May 30, 2008
Thursday, May 29, 2008
commit previlages
Today I completed the process for getting the commit privileges. For this process I needed to create a public and private key pair and upload the public key to the Zope site. Creating private and public key pair is pretty simple, here it goes,
$ ssh -keygen -t dsa
This will create a public and private key pair and can be saves in specified path. You can change "dsa" to rsa if we want a RSA key. For further details.
Regrding the project I wrote some grammar rules and discuss with mentor. Google documents really helpful in exchanging content. I download the latest code and run the tests. So I was able to look in to the code how the grammar rules actually been implemented.
$ ssh -keygen -t dsa
This will create a public and private key pair and can be saves in specified path. You can change "dsa" to rsa if we want a RSA key. For further details.
Regrding the project I wrote some grammar rules and discuss with mentor. Google documents really helpful in exchanging content. I download the latest code and run the tests. So I was able to look in to the code how the grammar rules actually been implemented.
Tuesday, May 27, 2008
Officially coding started!!!
According to the time line given by google, codings of the projects started on 26th May. So I started working on the OCQL project. I update my google calender with the tasks I need to do,basically the time line of my project. I included my busy times and shared it with my mentor.
Google seems to be becoming my best friend :)
Now I am working on the process to make the OCQL language more Pythonic. So I am writing some OCQL queries to compare them with Python list comprehensions.
Google seems to be becoming my best friend :)
Now I am working on the process to make the OCQL language more Pythonic. So I am writing some OCQL queries to compare them with Python list comprehensions.
Friday, May 23, 2008
Relations in zope
It's closing to 26th. That is the official date for the students to begin coding for their GSoC projects. And I got a gift from google, an interesting book. These days I am working hard to catch up the basic knowledge, my mentor, Adam Agroszer helping me a lot very time.
Now my application for understanding the zope, has included relations with mentors and projects. Mentors can select a project in the competition.
Here are some important things I learn in last few days.
* I had the following folder structure
/src
/google
google.py
mentor.py
.........
I was unable to give the complete path when I importing the class in the google.py. It was because that the folder and the script had the same name. By changing the folder name to an other name, it worked!!!!
* I am working on the zope distribution. So I add folders and python scripts to it. But for the commits, I copied them to a different folder and commit them. It need to keep in mind what I files I am changing. Since this was not a large project, it was not a big issue. But making a link in the zope folder to the committing solve the problem very easily.
Now my application for understanding the zope, has included relations with mentors and projects. Mentors can select a project in the competition.
Here are some important things I learn in last few days.
* I had the following folder structure
/src
google.py
mentor.py
.........
I was unable to give the complete path when I importing the class in the google.py. It was because that the folder and the script had the same name. By changing the folder name to an other name, it worked!!!!
* I am working on the zope distribution. So I add folders and python scripts to it. But for the commits, I copied them to a different folder and commit them. It need to keep in mind what I files I am changing. Since this was not a large project, it was not a big issue. But making a link in the zope folder to the committing solve the problem very easily.
Monday, May 19, 2008
Buddy Example
Buddy Example is described in the programmers_tutorial.pdf to give the basic understanding about the Zope. You can download source code from here. Copy the files in to appropriate folders. Copy buddydemo folder in to the src folder of the Zope distribution and copy buddydemo-configure.zcml in buddy_example/zopeskel/etc/package-includes to Zope by following the same folder structure.
Wednesday, May 14, 2008
New revision of example codes
It's interesting learning Zope. I should thankful for my mentor Adam Groszer for pointing out me the resources in detailed manner. Else I won't be able to catch them very soon. I here list some important resources.
1. http://wiki.zope.org/zope3/programmers_tutorial.pdf
2. http://www.muthukadan.net/docs/zca.pdf
3. http://www.benjiyork.com/quick_start/
4. http://wiki.zope.org/zope3/book.pdf
5. http://www.diveintopython.org
Release 9 of the learning program http://code.google.com/p/learningzope/source/browse/?r=9 is changed with simplified codings with the guidance of my mentor.
For an example in revision8 I have use following code to print organization, their students and mentors.
object = dbroot[key]
if isinstance(object,Organization):
print 'Organization name: ' + object.name
if (object.projects):
for i in range(0,len(object.projects)):
print '\t Project name: ' + object.projects[i].name
print '\t \t Mentor name: ' + object.projects[i].mentor.name
print '\t \t Student: ' + object.projects[i].student.name
But now same functionality is gain by following simple, nice looking code
for key in dbroot.keys():
object = dbroot[key]
object.printYourself()
with new function, printYourself() in suitable classes. Eg:
def printYourself(self):
print '\t Project name: ' + self.name
print '\t Mentor name: ' + self.mentor.name
print '\t Student name: ' + self.student.name
refer the http://code.google.com/p/learningzope/ for further information. Go through the revisions to understand the changes.
Enjoy!!!
1. http://wiki.zope.org/zope3/programmers_tutorial.pdf
2. http://www.muthukadan.net/docs/zca.pdf
3. http://www.benjiyork.com/quick_start/
4. http://wiki.zope.org/zope3/book.pdf
5. http://www.diveintopython.org
Release 9 of the learning program http://code.google.com/p/learningzope/source/browse/?r=9 is changed with simplified codings with the guidance of my mentor.
For an example in revision8 I have use following code to print organization, their students and mentors.
object = dbroot[key]
if isinstance(object,Organization):
print 'Organization name: ' + object.name
if (object.projects):
for i in range(0,len(object.projects)):
print '\t Project name: ' + object.projects[i].name
print '\t \t Mentor name: ' + object.projects[i].mentor.name
print '\t \t Student: ' + object.projects[i].student.name
But now same functionality is gain by following simple, nice looking code
for key in dbroot.keys():
object = dbroot[key]
object.printYourself()
with new function, printYourself() in suitable classes. Eg:
def printYourself(self):
print '\t Project name: ' + self.name
print '\t Mentor name: ' + self.mentor.name
print '\t Student name: ' + self.student.name
refer the http://code.google.com/p/learningzope/ for further information. Go through the revisions to understand the changes.
Enjoy!!!
Thursday, May 1, 2008
Store and retrieve a string in ZODB
Zope Object Database is an object persistent system system written in Python language. It is really easy to store a simple string in the database and retrieve it. I have uploaded the simple example here. Spend few minutes and have a try!!!
Subscribe to:
Posts (Atom)