*** Sague has joined #schooltool | 00:32 | |
*** Sague has left #schooltool | 00:55 | |
*** vidasp has quit IRC | 00:59 | |
*** Yuy has joined #schooltool | 03:59 | |
*** Yuy has left #schooltool | 04:00 | |
*** tiredbones has left #schooltool | 04:40 | |
*** wrobel has joined #schooltool | 09:59 | |
*** jinty has joined #schooltool | 10:02 | |
*** vidasp has joined #schooltool | 13:02 | |
*** tiredbones has joined #schooltool | 13:10 | |
*** shapr has quit IRC | 13:33 | |
*** mgedmin has joined #schooltool | 14:27 | |
*** th1a has quit IRC | 14:28 | |
*** jelkner has joined #schooltool | 14:42 | |
jelkner | srichter: good morning, stephan, are you up at this hour on a sunday morning? | 14:43 |
---|---|---|
srichter | yes, I am but that does not mean I am going to be on the computer consistently ;-) | 15:03 |
srichter | but I am here for now | 15:03 |
jelkner | did you get my email? | 15:04 |
jelkner | i never heard back | 15:04 |
jelkner | i'm trying to setup zope3 for development learning | 15:04 |
jelkner | and running into many snafus | 15:04 |
jelkner | i've read chapter 1 of your book several times | 15:05 |
jelkner | and i'm trying to figure out from it the ONE best way for us to install zope | 15:05 |
jelkner | question 1: should i use svn or the source tar ball? | 15:06 |
*** ignas has joined #schooltool | 15:13 | |
srichter | I think the E-mail had DEbian questions and was not directed to me, so this is an automated delete for me, because I do not have Debian (of course I sometimes parse E-mails incorrectly) | 15:16 |
srichter | to answer your question: I have never used a release :-) | 15:16 |
srichter | it frustrates me to much | 15:16 |
jelkner | so you use svn? | 15:16 |
srichter | once you have the basic setup (C, make, Python, Python-Dev, etc), then the source is a no-brainer to install | 15:17 |
srichter | and updating to the latest development version is much simpler (as Paul has argued here before) | 15:17 |
jelkner | i'm still having problems | 15:17 |
srichter | what do you have troubles with? | 15:18 |
jelkner | here is the page i'm writing up: https://wiki.ubuntu.com/LearningZope3 | 15:18 |
*** ignas has joined #schooltool | 15:18 | |
jelkner | problem 1: after checking out the source and running make (no problem there) | 15:19 |
jelkner | i ran python test.py -v | 15:19 |
jelkner | the regular tests ran | 15:19 |
*** ignas has quit IRC | 15:19 | |
jelkner | but it seg faulted on the functional tests | 15:19 |
srichter | well, this is clearly a Debian problem | 15:20 |
srichter | we have had no reports of segfaults in years | 15:20 |
jelkner | hmmm | 15:20 |
*** ignas has joined #schooltool | 15:20 | |
srichter | are you running some sort of unstable version? | 15:20 |
jelkner | no ubuntu breezy | 15:20 |
srichter | so something in that software stack seems broken | 15:21 |
srichter | have you tried updating C and Python to the latest bug fix release? | 15:21 |
jelkner | no | 15:21 |
jelkner | i would rather just try on dapper first | 15:21 |
jelkner | let me ask a few other questions before i go off and do all that | 15:22 |
jelkner | (i'm trying to get the students setup for paul's class at 11 this moringin) | 15:22 |
jelkner | can i ignore the funtional test failure? | 15:22 |
srichter | maybe | 15:22 |
srichter | try running Zope 3 and see whether you can work in the Web UI a little bit | 15:23 |
srichter | btw, which test is causing the segfault? | 15:23 |
jelkner | yeah, it works | 15:23 |
jelkner | how can i tell? | 15:23 |
srichter | ok, then it should be pretty safe | 15:23 |
srichter | try: | 15:23 |
jelkner | all i get is ..... Segmentation fault | 15:23 |
srichter | test.py -vpf1 | 15:23 |
jelkner | hold on... | 15:23 |
srichter | this will tell you always the current test it is running | 15:23 |
jelkner | it hasn't crashed yet | 15:29 |
jelkner | Running: | 15:29 |
jelkner | 250/516 (48.4%) /usr/local/src/Zope3/src/zope/app/form/browser/i18n.txt | 15:29 |
jelkner | but it seems to be hanging on this test for several minutes | 15:30 |
srichter | mmh, that is strange | 15:30 |
srichter | mgedmin: btw, I am sorry I have not gotten back to you yet | 15:30 |
jelkner | anyway, i have another question while we wait (all of this is designed to help you revise chapter 1 for the next addition of your book btw ;-) | 15:30 |
jelkner | i want to make instances of zope in each user's home directory | 15:31 |
srichter | mgedmin: I was in Europe the last two weeks, so I have had no time yet to set down and evaluate the coverage stuff carefully | 15:31 |
srichter | jelkner: btw, are you using the paper copy? | 15:31 |
jelkner | yes | 15:31 |
srichter | ok | 15:31 |
srichter | shoot | 15:31 |
jelkner | well, you decribe running mkzopeinstance in the section on tar ball install | 15:32 |
jelkner | but in the svn section you don't | 15:32 |
jelkner | is it possible for the sysadmin to do an svn install and then users to make their own instances? | 15:32 |
jelkner | (the tester definitely seems hung on i18n.txt :-( | 15:33 |
*** vidasp has quit IRC | 15:34 | |
jelkner | that's what i want | 15:35 |
jelkner | we have 5 students learning zope3 from paul | 15:35 |
jelkner | and a development machine on which they have shell accounts | 15:35 |
srichter | yes, that should be possible | 15:35 |
jelkner | ok, my email concerned what happened when i tried | 15:36 |
srichter | if you give students access to running mkzopeinstance, they should be able to all create local instances | 15:36 |
srichter | so what happened? | 15:36 |
jelkner | let me reproduce it and tell you what went wrong | 15:36 |
jelkner | hold on... | 15:36 |
srichter | ok, I still have the E-mail in my inbox | 15:37 |
srichter | I see what's wrong | 15:38 |
jelkner | hmm... it looks like the development server is down | 15:38 |
srichter | students don't have permissions to write a new sdirectory for the mail-queue | 15:38 |
jelkner | yes | 15:38 |
jelkner | how can i fix that is a sane way? | 15:38 |
srichter | okay, the quick fix would be to point the queue to a directory that they have write access to | 15:39 |
srichter | or simply take out zwiki-configure.zcml from package-includes | 15:39 |
jelkner | ahh | 15:39 |
jelkner | that would be the best | 15:39 |
jelkner | we won't be using zwiki anyway | 15:39 |
jelkner | ok, let me try that | 15:40 |
mgedmin | jelkner, fwiw I use ubuntu breezy and Zope 3 svn checkouts | 15:40 |
mgedmin | I haven't encountered any segfaults yet | 15:40 |
jelkner | and? | 15:40 |
jelkner | ok | 15:40 |
jelkner | let me try again on another box | 15:40 |
jelkner | besides, i think our development server just went down due to power outage | 15:41 |
jelkner | so that might explain the hanging on the functional test | 15:41 |
mgedmin | srichter, I have now also encountered inaccurate data from schooltool's test.py --coverage on another project (see yesterday's irc log) | 15:41 |
srichter | mgedmin: ok | 15:42 |
mgedmin | the interesting bit is: if I limit the tests to a single package, I get accurate coverage | 15:42 |
srichter | strange | 15:43 |
mgedmin | if I run all the tests, I get inaccurate coverage for that package | 15:43 |
mgedmin | and the difference is code covered by doctests | 15:43 |
mgedmin | as opposed to code which is covered by unit tests | 15:43 |
srichter | mmh, strange | 15:43 |
mgedmin | (doctest-tested code is shown as untested) | 15:43 |
mgedmin | yep, strange | 15:43 |
srichter | I still want to try running Zope 3's tests with schooltool's test runner to see whether we get better coverage | 15:44 |
jinty | seeing as both mgedmin and srichter are here: any objections to schooltool trunk following zope3 trunk? (now that we have a version of schooltool that works with Zope3.2) | 15:44 |
mgedmin | my only objection was alwyas 'jinty might object' ;-) | 15:45 |
mgedmin | well, and sometimes zope 3 trunk breaks schooltool | 15:45 |
srichter | jinty: +1000000 | 15:45 |
mgedmin | otoh it is better to get small breakages early and often | 15:45 |
srichter | mgedmin: yep, I think so too | 15:46 |
mgedmin | than one huge ball of breakage in 6 months when we decide to jump to the next zope release | 15:46 |
mgedmin | so, +2 | 15:46 |
srichter | jinty: that is really great! :-) | 15:46 |
jinty | thought you might like it | 15:47 |
jinty | my only objection dissappeared when I saw the work bringing the old version up to date. | 15:47 |
jinty | have fun;) | 15:47 |
srichter | thanks | 15:47 |
srichter | jelkner: any progress? :-) | 15:50 |
jelkner | well, the power appears to have gone out at my school (in virginia, i'm in maryland) | 15:50 |
jelkner | so the server is down | 15:50 |
jelkner | i'm now switching to a server in my home | 15:50 |
srichter | ok | 15:50 |
jelkner | it will be a while before i'm ready | 15:51 |
srichter | is it snowing down there as well? | 15:51 |
jelkner | (i have til 11 ;-) | 15:51 |
srichter | ok | 15:51 |
jelkner | yes a lot | 15:51 |
srichter | :-) | 15:51 |
srichter | it just started here this morning | 15:51 |
srichter | we are supposed to get about a foot (yipee) | 15:51 |
jelkner | we already did | 15:52 |
srichter | you got a foot down there? wow. | 15:52 |
mgedmin | all zope 3 trunk unit and functional tests (make test ftest) pass on my breezy system; no segfaults | 15:52 |
jelkner | mgedmin: thanks | 15:53 |
jelkner | the test box i have at home is dapper | 15:53 |
jelkner | so i'm going to run with that and see what happens | 15:53 |
jelkner | i'm looking for the easiest install i can get | 15:54 |
jelkner | so i'll try (in this order): | 15:54 |
jelkner | 1. the debs in universe | 15:54 |
jelkner | 2. svn | 15:54 |
jelkner | 3. tar ball | 15:54 |
jelkner | until i find one method that works ;-) | 15:54 |
srichter | btw, the bug you encountered is interesting, since it shows a general problem that we need to address | 15:58 |
jelkner | how can i make it known more widely? | 15:58 |
jelkner | or by telling you did i do that already? :-) | 15:59 |
jelkner | zope3 is not currently installable on dapper | 15:59 |
jelkner | The following packages have unmet dependencies: | 15:59 |
jelkner | zope3: Depends: python2.4-mechanize (>= 0.0.10a) but it is not installable | 15:59 |
jelkner | E: Broken packages | 15:59 |
jelkner | so let me try the svn... | 16:00 |
srichter | jelkner: send a message to zope3-dev | 16:00 |
srichter | yeah, the checkout comes with mechanize, so that should be no problem | 16:00 |
srichter | ok, my wife just got up, so I might only sporatically be online | 16:02 |
jelkner | built fine, running tests... | 16:02 |
jelkner | no problem | 16:02 |
povbot` | /svn/commits: * jinty committed revision 5755: | 16:05 |
povbot` | /svn/commits: Track the Zope3 trunk until the next release. | 16:05 |
mgedmin | very interesting | 16:10 |
mgedmin | it seems that my problems with code coverage are caused by some doctests calling sys.settrace(None) | 16:10 |
mgedmin | aha! | 16:11 |
mgedmin | these are doctests that use the 'doctest' module from the standard library instead of zope.testing.doctest | 16:12 |
mgedmin | ouch | 16:12 |
tiredbones | It just started snowing here, My son will be very happy, he's going to the state x-country meets this week. and lately the condition have been lousely. | 16:13 |
*** alga has joined #SchoolTool | 16:13 | |
mgedmin | zope.testing.doctest has a commented workaround that fixes coverage reports | 16:13 |
mgedmin | python 2.4's stock doctest does not have it | 16:13 |
mgedmin | it calls self.debugger.set_continue() after every test | 16:13 |
mgedmin | and bdb.set_continue() calls sys.settrace(None) | 16:14 |
mgedmin | which breaks coverage tracking | 16:14 |
mgedmin | srichter, there are a number of modules in Zope 3 that import doctest from the stdlib, instead of zope.testing.doctest | 16:15 |
mgedmin | this breaks unit test coverage reports | 16:15 |
mgedmin | there are 8 of them: http://zope3.pastebin.com/551154 | 16:16 |
* mgedmin wonders if python 2.5 has that doctest bugfix or not | 16:19 | |
jelkner | could someone explain the +/- of the password manager choice (Plain Text | 16:19 |
jelkner | , MD5 | 16:19 |
jelkner | , or SHA1)? | 16:19 |
mgedmin | hmm | 16:21 |
mgedmin | SHA1 passwords are most secure, but also newest | 16:21 |
mgedmin | MD5 are in the middle | 16:22 |
mgedmin | wait a second, what is the context? | 16:22 |
jelkner | if we are in a learning situation? | 16:22 |
jelkner | trying to learn zope3 | 16:22 |
mgedmin | ah | 16:22 |
jelkner | is there a drawback to using the more secure method | 16:22 |
mgedmin | I know nothing about password managers in zope 3 | 16:22 |
jelkner | will it make things harder to do? | 16:23 |
mgedmin | the drawback, I suppose, is that you can not recover the password | 16:23 |
jelkner | if that is the only drawback, it isn't a problem | 16:23 |
mgedmin | (and cannot, for example, email the user his password if he forgets) | 16:23 |
jelkner | ahh | 16:23 |
jelkner | ok, thanks! | 16:23 |
mgedmin | but then again why not just generate a new random password? | 16:23 |
jelkner | right | 16:23 |
jelkner | srichter: the problem i emailed you about does not happen with the trunk, apparently, while it did with the branch | 16:28 |
jelkner | everything is working | 16:28 |
mgedmin | jelkner, are you talking about the segfault? | 16:33 |
mgedmin | which branch was it? 3.2? | 16:33 |
jelkner | no | 16:33 |
jelkner | with the branch version, zope wouldn't start because of a permission problem | 16:34 |
jelkner | students don't have permissions to write a new sdirectory for the mail-queue | 16:35 |
mgedmin | srichter, re coverage -- there are more modules using doctest than I initially thought: http://zope3.pastebin.com/551176 | 16:41 |
mgedmin | hmm, I got rid of all sys.settrace(None) calls during the test run, but I still get incomplete coverage data | 17:22 |
jelkner | question: where do i place the source for a new package in my zope3 instance? | 17:27 |
mgedmin | jelkner, anywhere that's available in your PYTHONPATH | 17:29 |
mgedmin | if I use a svn checkout, I tend to make a symlink in src/ | 17:29 |
mgedmin | if you have an instance, you can create a symlink in lib/python/ | 17:29 |
jelkner | that's what i was after... | 17:30 |
mgedmin | schooltool's top-level scripts fiddle with PYTHONPATH to make Zope3/src and schooltool's src/ available in sys.path | 17:30 |
jelkner | let's assume i have /home/jelkner/zope3/lib/python in my instance | 17:31 |
jelkner | can i just put the new directory in the lib/python directory of my instance? | 17:31 |
mgedmin | yes | 17:31 |
jelkner | cool | 17:31 |
jelkner | thanks! | 17:31 |
mgedmin | jinty, srichter: zope trunk is not backwards-compatible with zope 3.2 | 17:32 |
mgedmin | TypeError: ViewletManager() takes at least 2 arguments (1 given) | 17:32 |
mgedmin | Ran 1017 tests in 272.604s | 17:32 |
mgedmin | FAILED (failures=1, errors=228) | 17:32 |
mgedmin | -- http://source.schooltool.org/buildbot/pov-schooltool/builds/213/step-unit%20tests/0 | 17:32 |
*** vidasp has joined #schooltool | 17:33 | |
jelkner | to make a directory a module, do i want __init__.py or __init.py__ ? | 17:35 |
mgedmin | jelkner, __init__.py | 17:35 |
jelkner | that's what i thought, thanks! | 17:35 |
*** wdickers has joined #schooltool | 17:54 | |
wdickers | why hello there | 17:55 |
jelkner | good morning wdickers | 17:55 |
jelkner | do you have zope3 installed on your system? | 17:55 |
jelkner | i've created a wiki for our class: http://ypal.net/zope3class | 17:56 |
jelkner | the first link under "prerequisites" takes you to a page describing how to install zope3 | 17:56 |
wdickers | ditto jelkner | 17:59 |
wdickers | no :( | 17:59 |
wdickers | should I synaptic it? | 17:59 |
jelkner | no | 17:59 |
wdickers | jelkner? | 17:59 |
wdickers | whoops, I'll do that right away | 17:59 |
*** flint has joined #schooltool | 18:00 | |
flint | jelkner, are you there? | 18:00 |
jelkner | no problem will, i didn't tell you about this yet | 18:00 |
jelkner | yes flint, i'm trying to help will get zope3 installed | 18:00 |
flint | gotcha... | 18:01 |
*** Yuy has joined #schooltool | 18:01 | |
jelkner | good morning linda | 18:02 |
jelkner | did you ssh (using putty) into fdouglas.elkner.net yet? | 18:02 |
flint | hey linda, how is w&l? | 18:03 |
wdickers | hmm, the comman \d "svn" isn't being accepted | 18:03 |
Yuy | hey, everyone | 18:03 |
jelkner | our teacher is about to join us | 18:05 |
jelkner | (just got off the phone with him) | 18:05 |
wdickers | yay | 18:05 |
Yuy | jelkner: when it asks for login, i login regularly? | 18:05 |
wdickers | jelkner? I'm having problems installing Zope3 o.o; | 18:05 |
flint | ok then... | 18:05 |
jelkner | yuy: if you have trouble logging in please call me @ 301-779-8142 | 18:05 |
jelkner | wait, you can't do that, can you? | 18:06 |
Yuy | yes i can | 18:06 |
*** pcardune has joined #schooltool | 18:06 | |
jelkner | good, i'm waiting | 18:06 |
jelkner | good morning paul! | 18:07 |
Yuy | morning, paul | 18:07 |
wdickers | morning paul | 18:07 |
pcardune | hello everybody | 18:07 |
pcardune | so is this new wiki page you just put up on the ubuntu wiki jelkner? | 18:07 |
jelkner | while i help will and linda get setup, can you please take a look at: http://ypal.net/zope3class | 18:08 |
Yuy | jelksner: thanks | 18:08 |
jelkner | wdickers: how is the zope3 install coming? | 18:08 |
wdickers | not too well, it doesn't accept the command "svn" | 18:08 |
jelkner | i have a better idea than | 18:08 |
jelkner | wdickers: call me @ 301-779-8142 and i'll give you a shell account | 18:09 |
flint | pcardune, hi there paul... | 18:09 |
pcardune | hi flint | 18:09 |
wdickers | kk | 18:09 |
jelkner | flint: let the teacher look over the lesson! ;-) | 18:09 |
jelkner | wdickers? | 18:10 |
wdickers | calling | 18:10 |
pcardune | that looks good to me | 18:10 |
wdickers | I don't think that's the right number | 18:10 |
jelkner | i took the log from last week and edited it down | 18:10 |
jelkner | we are almost ready, as soon as i get will setup we can move forward | 18:11 |
flint | richter on page 54 lines 01 & 02 on that page, uses a different syntax for the import. what are your thoughts? | 18:11 |
wdickers | jelkner: when I call that number I get an answering machine | 18:11 |
jelkner | give me your number, i'll call you | 18:12 |
*** _pcardune has joined #schooltool | 18:12 | |
wdickers | kk 703-276-9475 | 18:12 |
_pcardune | dont forget that your phone numbers are forever logged on the internet now ;) | 18:12 |
flint | pcardune, instead of say "import zope.interface" he uses "from zope.interface import Interface" | 18:13 |
flint | pcardune, better that then passwords forever logged on the internet... | 18:13 |
_pcardune | flint: You can use either method of import, it depends on your usage | 18:14 |
flint | the indication I get from the reading is that is he represents the later method as more efficient. your thoughts? | 18:14 |
_pcardune | if you just have one plage where you use the Interface class, then it won't hurt to type zope.interface.Interface... but if you use it all over the place, you might as well just say Interface | 18:14 |
_pcardune | s/plage/page | 18:15 |
flint | got any feeling for the penalty in performance? | 18:15 |
_pcardune | none | 18:15 |
flint | ok, also is the code snippet from last week supposed to do anything? | 18:16 |
_pcardune | I think what he means by efficient, is efficient for the programmer, not for python or zope | 18:16 |
_pcardune | flint: at the moment, no, it wont do anything unless | 18:16 |
_pcardune | you open a python prompt and start messing with it | 18:16 |
_pcardune | but we'll do that later | 18:16 |
flint | the good news is that it seems to pass python interperter syntax fine... | 18:17 |
flint | pcardune, that is there are no errors... | 18:18 |
flint | pcardune, where are you btw... | 18:18 |
_pcardune | eastern washington state | 18:18 |
flint | pcardune, aparently DC is snowed in. Falls Church has declared school closed for the week! | 18:19 |
Yuy | really? do you know about arlington? | 18:19 |
flint | pcardune, the irony is that I am in Vermont without a SINGLE snowflake in the air! | 18:19 |
_pcardune | Yuy: dont get your hopes up, arlington doesn't close for a layer of ice on the road | 18:20 |
flint | Yuy, no word yet linda... | 18:20 |
Yuy | alright | 18:20 |
_pcardune | so, while they are getting set up, is everyone up to speed on what the interfaces.py file is for? | 18:20 |
flint | yea, superentendent smith has a motto "educate or die!" | 18:20 |
flint | :^) | 18:20 |
_pcardune | flint: or both! | 18:21 |
flint | pcardune, now paul, you escaped... :^) | 18:21 |
wdickers | back | 18:21 |
jelkner | ok i think we are ready to go | 18:21 |
wdickers | arlington NEVER closes >.< | 18:21 |
_pcardune | i've just got baggage over the broken nose that ice gave me in the year 2000 | 18:21 |
jelkner | we need to bring linda and will up to speed with what we did last week | 18:21 |
jelkner | yuy and wdickers: ready? | 18:22 |
wdickers | sure | 18:22 |
Yuy | sure | 18:22 |
_pcardune | have the two of you read the chapter in the Zope book and/or do you have a copy of it? | 18:22 |
jelkner | cd zope3/lib/python | 18:22 |
Yuy | i have a copy up | 18:22 |
_pcardune | actually, you should have a copy cause it is freely available online | 18:22 |
wdickers | hehe, I have a copy up | 18:22 |
_pcardune | ok, well anyways, so we started by creating a timeclock package | 18:23 |
flint | wdickers, what is the url for the book? I have a print copy. | 18:23 |
jelkner | wait, _pcardune, i need to get them to where we ended last week.. | 18:23 |
jelkner | did you cd zope3/lib/python ? | 18:23 |
jelkner | tell me when you are ready | 18:23 |
Yuy | am in the directory | 18:23 |
_pcardune | jelkner: ok, i was going to give a brief overview, but you can do that too (then I can see how much you actually understand ;) | 18:23 |
jelkner | wdickers? | 18:24 |
wdickers | yup | 18:24 |
jelkner | mkdir timeclock | 18:24 |
wdickers | got it | 18:24 |
jelkner | cd timeclock | 18:24 |
jelkner | touch __init__.py | 18:24 |
jelkner | vi interfaces.py | 18:25 |
jelkner | you can find all that at: http://ypal.net/zope3class | 18:25 |
flint | jelkner, vim you bad man... | 18:25 |
wdickers | ready | 18:25 |
jelkner | then make your interfaces.py look like this one: http://ypal.net/zope3class/InterfacesPy | 18:26 |
jelkner | then _pcardune can take it away! | 18:26 |
_pcardune | everybody ready? | 18:27 |
jelkner | i am ;-) | 18:27 |
flint | pcardune, I added a #! line and some docs to the Interfaces.py file.... wanna see? | 18:27 |
_pcardune | flint: sure, why don't you upload it | 18:27 |
_pcardune | to the wiki | 18:27 |
jelkner | wait, we agreed last week that import interfaces would be better | 18:28 |
jelkner | since it would make it easier for us newb's to see where things came from | 18:28 |
jelkner | explicit is better and all... | 18:28 |
*** pcardune has quit IRC | 18:28 | |
*** _pcardune is now known as pcardune | 18:28 | |
wdickers | I'm ready | 18:28 |
jelkner | oops we lost our teacher | 18:29 |
pcardune | anways | 18:29 |
jelkner | yuy: are you ready? | 18:29 |
flint | jelkner, the wiki ate my carrage returns! | 18:29 |
pcardune | to start things off, Zope is a content management system | 18:29 |
Yuy | sure | 18:29 |
pcardune | so the biggest thing we are going to be working with is content, specifically what are called content objects | 18:29 |
pcardune | a content object is any type of information we want to store as a complex python class | 18:30 |
povbot` | /svn/commits: * jinty committed revision 5756: | 18:30 |
povbot` | /svn/commits: Update to the Zope3 trunk. since the viewlet zcml meta uses the same name for the constructor and registration, I presume its ok here. | 18:30 |
pcardune | for example, what we are working on now is a representation of a Person that can be logged into the system | 18:30 |
pcardune | for every content object, there must be interfaces which define a contract for this content object | 18:31 |
flint | sounds like a business law class... :^) | 18:32 |
pcardune | that is, the implementation you come up with for this object must fit a contract defined by an interface | 18:32 |
pcardune | Interfaces are also heavily used for documentation purposes | 18:32 |
pcardune | so, in the interfaces.py file, you see the IPerson interface | 18:33 |
pcardune | and we have defined one attribute, username. | 18:33 |
pcardune | that means that all implementation of a Person must have a username attribute | 18:33 |
pcardune | writing interfaces also helps you think about the functionality you want your object to have, before having to worry about the implementation | 18:34 |
pcardune | so, defining attributes in an interface works with the things called schema fields | 18:35 |
pcardune | technically speaking, interfaces and schemas are different things, interfaces are for methods, schemas are for attributes. In Zope however, schemas and interfaces are defined by the same class | 18:36 |
flint | pcardune, the object is the person and that object currently has one attribute, a username, and that username is part of a schema? | 18:36 |
pcardune | flint: correct | 18:36 |
pcardune | flint: once we write methods for the Person object, then IPerson will also be an interface | 18:36 |
flint | pcardune, I am just sucking up to the teacher (unlike that bad boy Jeff :^). | 18:36 |
pcardune | it is just a question of nomenclature | 18:37 |
pcardune | so, schemas allow us to write "contracts" for specific attributes because they can define what kind of data can be stored in an attribute | 18:37 |
pcardune | you all know that python has no type checking, schemas essentially allow you to do type checking | 18:37 |
pcardune | so, we have defined username as only being able to store text... not numbers, not lists, not dictionaries, etc. | 18:38 |
pcardune | ok, so I think that is pretty much where we left off last week | 18:39 |
pcardune | does everyone understand up to this point? | 18:39 |
jelkner | what about tiltle, etc? | 18:39 |
jelkner | s/tiltle/title | 18:39 |
pcardune | ok, schemas also allow you to document your attributes | 18:39 |
flint | pcardune, is there a nomenclature wich includes the concept of methods or is this defined in zope3 as an interface or is a contract the equivalent of a method? | 18:39 |
pcardune | this is the purpose of title, description, and all the other arguments you see | 18:39 |
pcardune | flint: an interface is a contract dealing with methods | 18:40 |
flint | pcardune, ok, besides this cosmic question, I was kinda annoyed that I could not get the title to display in my instance of zope3 | 18:41 |
pcardune | flint: although not strictly methods as we will see soon when we start making containers | 18:41 |
jelkner | patience flint, let the teacher teach! | 18:41 |
pcardune | flint: it shouldn't display, don't worry | 18:41 |
flint | pcardune, keep in mind I was just happy it did not error out... | 18:42 |
pcardune | ok, as we will also see, the other arguments in the schema are useful when we want to automaticlaly generate forms for creating and editing our content objects | 18:42 |
jelkner | really cool! | 18:42 |
pcardune | ok, so let's finish writing this Interface | 18:43 |
wdickers | yay | 18:43 |
pcardune | I'm pretty sure jelkner wanted more than just a username attribute for a person | 18:43 |
flint | pcardune, would this be the wrong time to ask for use of the password schema field?\ | 18:44 |
jelkner | ok, now might be a good time to quickly recap what we are writing | 18:44 |
pcardune | flint: yes | 18:44 |
jelkner | so that wdickers and yuy understand | 18:44 |
wdickers | yeah, we're newbies Dx | 18:44 |
jelkner | i don't really know for sure what attributes i need, but i know how the finished application should work | 18:44 |
jelkner | wdickers and yuy | 18:44 |
jelkner | next summer you will be interns on the cando project | 18:45 |
jelkner | you will need to keep track of how you spend your 20 hours per week working | 18:45 |
wdickers | before the summer too? | 18:45 |
flint | pcardune, excellent the FITS is growing in you now... :^) wdickers and yuy better to be newbies than old, bitter and ignorant like me! | 18:45 |
jelkner | we are writing a web application called timeclock so that you will be able to do that | 18:45 |
jelkner | you will clock-in and clock-out of the application whenever you work on cando | 18:46 |
Yuy | why do times need to be documented? | 18:46 |
jelkner | when you clock-out, it will ask you what you did and what you learned. | 18:46 |
wdickers | I assume so we earn out pay :P | 18:46 |
wdickers | *our | 18:46 |
jelkner | yes, you do | 18:47 |
jelkner | yes! | 18:47 |
jelkner | for accountability | 18:47 |
jelkner | anyway | 18:47 |
flint | Yuy, this is basically elkner's attempt to take over the world... | 18:47 |
Yuy | oh, well that's good to keep in mind ;) | 18:47 |
wdickers | He who controls time control everything | 18:47 |
wdickers | *controls | 18:47 |
jelkner | yuy: you first need to learn to ignore *everything* you hear from flint ;-) | 18:47 |
flint | jelkner, cat flint > null... | 18:48 |
jelkner | anyway, timeclock will allow dave welsh and i to approve your hours, and then generate an invoice for you to arlington public schools | 18:48 |
jelkner | that's it | 18:48 |
Yuy | alright | 18:48 |
flint | Yuy, there is a long and very entertaining story in this if you want later, in the mean time on with the show! | 18:48 |
jelkner | ok, pcardune, take it away | 18:48 |
pcardune | ok, so do you ( jelkner or flint ) remember what else we wanted for our person object? | 18:49 |
jelkner | i don't | 18:49 |
flint | we need to know this persons hours and their rate | 18:50 |
flint | we also need to know what they did | 18:50 |
wdickers | wouldn' | 18:50 |
wdickers | wouldn't what they did be under 'description'? | 18:50 |
wdickers | Oh wait, nvm, that's for the person not the time | 18:50 |
Yuy | or is 'description' a desc of the person themselves? | 18:50 |
jelkner | wdickers: no, because that description is of the person | 18:50 |
jelkner | not the event | 18:51 |
jelkner | the event will come later | 18:51 |
wdickers | kk | 18:51 |
pcardune | flint: that's correct, but what they've done is not an integral part of their personhood | 18:51 |
pcardune | and neither is their rate | 18:51 |
pcardune | but as it is now, they don't even have a name | 18:51 |
flint | wdickers, ever spend any time studying existentialism? | 18:51 |
flint | :^) | 18:52 |
jelkner | cat flint > /dev/null | 18:52 |
pcardune | we will create other content objects to store data about time and what was done during that time | 18:52 |
wdickers | lol, not really studying. My teacher just told us to use in convos to sound smart | 18:52 |
flint | pcardune, fair enough, you want to complete the person object... | 18:52 |
wdickers | will those content objects be in the same interface? | 18:53 |
pcardune | I suggest that we add an attribute for a persons name | 18:53 |
wdickers | pet name? xD | 18:53 |
pcardune | wdickers: at the moment yes because we have a small project, for larger projects it gets spread out into other folders and other interfaces.py files | 18:53 |
flint | pcardune, that is an interesting problem. would it be two attributes (eg fname, lname)? | 18:54 |
wdickers | ah, okay | 18:54 |
pcardune | well, trying to come up with the best representation for a persons name is difficult since people have any number of middle names, etc. etc. We only really care about their whole name at this point | 18:55 |
flint | pcardune, sorry not atributes but interfaces... | 18:55 |
pcardune | so I suggest we just have one attribute and call it "title" and have it store the persons full name | 18:55 |
flint | pcardune, so one big name glob... | 18:55 |
pcardune | flint: actually, they are atributes | 18:55 |
jelkner | are you telling us to do that now? | 18:55 |
pcardune | right, at this point we dont have a use case for doing it otherwise, and simple is better | 18:55 |
flint | title is already an attribute | 18:56 |
pcardune | yes, do that now | 18:56 |
flint | do what? | 18:56 |
pcardune | add another attribute to the IPerson interface, called "title" using a schema field | 18:56 |
pcardune | it should look just like the schema field for username | 18:57 |
jelkner | name = zope.schema.Text( | 18:57 |
jelkner | title=u"Name" | 18:57 |
jelkner | description=u"Person's full name" | 18:57 |
jelkner | required=True) | 18:57 |
jelkner | i wasn't sure about required? | 18:57 |
pcardune | jelkner: exactly, except it is better to call it 'title' rather than 'name', and i will explain why in just a second | 18:58 |
pcardune | required should be True, because we dont ever want to create a person that doesn't have a name! | 18:58 |
Yuy | I'm guessing required is true, unless it's an optional attribute | 18:58 |
pcardune | Yuy: exactly | 18:58 |
flint | i get it the goal in zope3 is to see how many times we can use the word title over and over!!!! | 18:59 |
pcardune | flint: something like that | 18:59 |
wdickers | so why do we give the attributes default values? | 18:59 |
Yuy | in case they don't add it? | 18:59 |
pcardune | they aren't default values | 18:59 |
wdickers | But if it's required... | 18:59 |
wdickers | oh | 18:59 |
pcardune | they just define information about the field | 19:00 |
wdickers | For the programmer? I see | 19:00 |
pcardune | so when you auto generate a form, next to the textbox where you enter in a persons name, it knows to say "Name" and give a brief description of "Person's full name" | 19:00 |
flint | so the top score in the frequency of the word "title" is 5. this is not good. i recommend a better atribute name. | 19:00 |
wdickers | Or rather 'title' in this case ;-) | 19:01 |
jelkner | pcardune: how does this look now?: http://ypal.net/zope3class/InterfacesPy | 19:01 |
pcardune | jelkner: that looks good, that is the way it should be | 19:01 |
flint | elkner please kill my two attempted versions and let us in on the secret of how to edit the silly wiki. | 19:02 |
jelkner | just did | 19:02 |
jelkner | flint: let me edit the wiki | 19:02 |
pcardune | flint: in schooltool and cando, all the major content objects have title attributes, it what you are going to call your object | 19:02 |
jelkner | are we ready to move on? | 19:03 |
flint | what do you mean by "title attributes"? | 19:03 |
wdickers | flint: the title=u"" part | 19:03 |
flint | jelkner, not unless it is clear... | 19:03 |
pcardune | wdickers: flint: actually i mean, the the schemas/interfaces all have title in their contracts | 19:04 |
wdickers | ohhh | 19:04 |
pcardune | meaning the title = zope.schema.Text(.... part | 19:04 |
flint | that is fine it is merely distracting to have the field "title" having the attribute "title" | 19:04 |
pcardune | *all* schema fields have title *arguments* passed to them | 19:04 |
pcardune | ok, so, moving on | 19:05 |
flint | give the field another name please | 19:05 |
wdickers | soo...most content objects have title being passed title? | 19:05 |
flint | pcardune, see what trouble I have started? :^) | 19:06 |
jelkner | flint wants to make sure that we never get this project finished | 19:06 |
jelkner | he was sent here by the forces of evil to sabatog us! | 19:06 |
flint | pcardune, I really do not do this for pure sadisim I want this to be CLEAR. | 19:06 |
flint | pcardune, if we can get the basis clear it is worth the time... | 19:07 |
pcardune | ok, when we are writing displays for our content object, we want to know what should be at the top of the display | 19:07 |
jelkner | what is a "display"? | 19:07 |
pcardune | so, when we are looking at a person object, we want to know what should appear as a header on the page | 19:07 |
pcardune | i just mean a webpage | 19:08 |
flint | pcardune, I understand this i suspect. The field "title" could easily be called "banana" and be syntactically correct eh? | 19:08 |
pcardune | flint: write, it has nothing to do with syntax, it is a matter of convention | 19:08 |
flint | wait a minute... let me show you what I mean... | 19:08 |
pcardune | the fields we want displayed as a main header, or a key peice of information is generally 'title' | 19:08 |
wdickers | oh, so is it similiar to the <title></title> in HTML? | 19:08 |
flint | # this should look just like the schema field for username | 19:09 |
flint | banana = zope.schema.Text( | 19:09 |
flint | title=u"Name" | 19:09 |
flint | description=u"Person's full name" | 19:09 |
flint | required=True) | 19:09 |
pcardune | wdickers: no, not quite | 19:09 |
pcardune | flint: yes, that is syntactically correct | 19:09 |
wdickers | kk | 19:09 |
pcardune | for example, when I am writing code for a page that displays a bunch of links to a bunch of different objects, i want what goes between the <a></a> part to be something useful | 19:10 |
pcardune | if all the objects i am making links to have a title attribute, then it is easy! I just put the title in between the <a></a> tags | 19:11 |
pcardune | and I am sure to get links that tell the end user the most useful thing about the object they are about to go to when they click on the link to it | 19:11 |
flint | pcardune, asked and answered title and banana are the same in this instance... move on. | 19:11 |
pcardune | ok, that's it | 19:12 |
pcardune | so, we have now defined a simple Person... now we will define their storage | 19:12 |
wdickers | cool | 19:12 |
pcardune | we want to put poeple objects all in the same place | 19:12 |
pcardune | so we will make what is called a container for them | 19:12 |
pcardune | containers are just like folders, except a bit more abstracted conceptually, so for most intents and purposes, you can think of them like folders | 19:13 |
Yuy | sort of like keeping strings in an array? | 19:13 |
pcardune | Yuy: more like keeping them in a dictionary | 19:14 |
Yuy | cool | 19:14 |
pcardune | so, we will write another interface for a container for person objects | 19:14 |
pcardune | we should name it IPersonContainer | 19:14 |
wdickers | is this still in interface.py? | 19:15 |
pcardune | wdickers: yes | 19:15 |
wdickers | okay | 19:15 |
jelkner | and does it also inherit from zope.interface.Interfaces | 19:15 |
jelkner | ? | 19:15 |
pcardune | I'm about to get to that | 19:16 |
pcardune | import zope.app.container.constraints | 19:16 |
pcardune | when we work with containers we want to import zope.app.container | 19:17 |
pcardune | woops, look at the last thing i wrote only | 19:17 |
pcardune | Zope already defines an interface for containers that we will want to reuse, since there are a bunch of zope classes for doing stuff with containers | 19:17 |
pcardune | so, IPersonContainer should inherit from zope.app.container.interfaces.IContainer | 19:18 |
pcardune | after this, we want to define what kind of things this container can contain (as part of its contract) | 19:19 |
pcardune | so we write as the first line of the container zope.app.container.constraints.contains(IPerson) | 19:19 |
pcardune | this tells the zope machinery that we can only put content objects that implement the IPerson interface into a container for person | 19:20 |
pcardune | does this make sense to everyone so far? | 19:21 |
flint | jelkner, can you put up an example of this on the wiki? | 19:22 |
Yuy | so the only line we have (for IPersonContainer) is zope.app... | 19:22 |
Yuy | ? | 19:22 |
wdickers | I'm not sure what "content objects that implement IPerson" means | 19:22 |
flint | pcardune, I vote for totally lost... | 19:23 |
flint | pcardune, maybe some code illustrating this would help eh jeff? | 19:23 |
pcardune | Yuy: yes | 19:23 |
pcardune | wdickers: what i mean by this is: | 19:23 |
jelkner | can we pause for a minute to check what we have? | 19:24 |
pcardune | we have created a "contract"... which will from now on be reffered to as just an Interface | 19:24 |
pcardune | jelkner: in a second | 19:24 |
pcardune | when we create the actual implementations of our content objects, they must satisfy this Interface ("contract") | 19:24 |
pcardune | in other words, our implementation must *implement* this Interface | 19:25 |
pcardune | when an object implements an interface, it means that the object satisfies the contract defined by that interface | 19:25 |
pcardune | ok jelkner, lets look at what we have | 19:26 |
jelkner | check out: http://ypal.net/zope3class/InterfacesPy | 19:26 |
wdickers | ah, so only content objects that satisfy IPerson will go into IPersonContainer? Basically the IPerson itself | 19:26 |
jelkner | i'm going to record the history of each file as we edit it. | 19:26 |
jelkner | also, during the week i will edit this log and turn it into a dialog type tutorial | 19:27 |
flint | jelkner, I see not diference in the url. | 19:27 |
jelkner | try reloading | 19:27 |
jelkner | there should be a history section | 19:27 |
pcardune | flint: click on interfaces.py_v03 | 19:28 |
flint | pcardune, you got it. | 19:28 |
jelkner | i'll update the main page to the latest version when we finish | 19:28 |
flint | pcardune, why did jeff put """ in the file? | 19:28 |
pcardune | flint: you *always* *must* have docstrings at the beginning of every class and interface and method | 19:29 |
jelkner | we will fill these in later, yes paul? | 19:29 |
flint | pcardune, If it is news to me it is news to yuy and wdickers eh? | 19:30 |
pcardune | jelkner: now or later | 19:30 |
wdickers | =O *Runs to add them* | 19:30 |
Yuy | *already had them* :) | 19:30 |
jelkner | yeah, yuy! | 19:30 |
pcardune | I just used the stars to make emphasis | 19:30 |
flint | pcardune, wanted everything in sync. suspected this. | 19:30 |
pcardune | as they are one of the most important parts to following the zope coding standards | 19:30 |
flint | pcardune, and the docstrings should be filled in eh? | 19:31 |
pcardune | yes, so we should fill them in now | 19:31 |
jelkner | please do | 19:31 |
pcardune | but dont think to much about them, a short quick description is all that is necessary | 19:31 |
flint | jelkner, you started this... | 19:31 |
wdickers | jelkner: you're missing the zope.app.container.constraints.conatins(IPerson) | 19:31 |
Yuy | yeah, i was going to ask about that | 19:32 |
wdickers | *contains | 19:32 |
flint | wdickers, good call. | 19:32 |
jelkner | oh, wdickers: could you please fix that? | 19:32 |
wdickers | Wait...maybe we should Gobby the interface? | 19:32 |
wdickers | okay | 19:32 |
jelkner | i was making the history when you where talking about that | 19:32 |
wdickers | fixed | 19:33 |
jelkner | we can't | 19:33 |
jelkner | yuy can't use gobby | 19:33 |
jelkner | she is on a windows box | 19:34 |
jelkner | i'll think about a way around that later, but not now | 19:34 |
flint | jelkner, this wiki thing is working out ok. | 19:34 |
pcardune | shall we continue | 19:34 |
jelkner | flint: yes, and it gives us a history | 19:34 |
jelkner | yes | 19:34 |
Yuy | go ahead.. unless this sidetracking is actually important :P | 19:35 |
pcardune | ok, the next thing we want to do is define a similar interface called IPersonContained (this is not a typo) | 19:35 |
pcardune | with again just one line in it | 19:35 |
Yuy | is it a bool thing to see whether or not the IPerson is in the IContainer? | 19:36 |
wdickers | oh well | 19:36 |
pcardune | so we write as the first line of the container zope.app.container.constraints.containers(IPersonContainer) | 19:36 |
wdickers | so it is passed no arguments? | 19:37 |
flint | is IPersonContained an additional class? | 19:37 |
pcardune | Yuy: not quite, you don't check whether IPerson is in IPersonContainer... but when Person objects are being created, the constraints will be checked, so if you try to put a Person object in something that does not implement IPersonContainer, it will throw errors at you | 19:37 |
pcardune | IPersonContained is an additional class | 19:37 |
pcardune | wdickers: it is passed one argument: IPersonContainer | 19:38 |
Yuy | oh, okay | 19:38 |
flint | pcardune, syntax? | 19:38 |
wdickers | but is there anything in the parentheses? | 19:38 |
wdickers | I mean of IPersonContained() | 19:38 |
flint | wdickers, probably IPerson | 19:39 |
pcardune | it should read class IPersonContained(zope.app.container.interfaces.IContained) | 19:39 |
jelkner | wdickers: the stuff in the () is the parent class of your new class | 19:39 |
pcardune | so, IPersonContained inherits from IContained | 19:39 |
jelkner | it is python's inheritance mechanism | 19:40 |
wdickers | gotcha | 19:40 |
jelkner | pcardune: can you please fix version 4 so it looks right? | 19:40 |
flint | pcardune, where did IContained come from? | 19:41 |
pcardune | ok, it is fixed | 19:41 |
pcardune | flint: IContained in from zope.app.container.interfaces | 19:41 |
flint | pcardune, is this an internal attribute of the zope.app.container.interfaces, and if so how did we know this? | 19:42 |
pcardune | flint: you know this by a number of methods, either because I told you, you read it in a zope book, you read it in someone elses code, or you read the contents of zope.app.container.interfaces | 19:43 |
Yuy | not to be blunt, but we know because it's provided? | 19:44 |
Yuy | like how it's automatically assumed 'cd' changes directory or something | 19:44 |
pcardune | write | 19:44 |
flint | pcardune, you could interrogate the object? eg the docstring? | 19:44 |
pcardune | its like working with any python package | 19:44 |
pcardune | s/write/right | 19:44 |
jelkner | pcardune: we have 15 minutes left, i'm wondering if this would be a good time to stop and sum up? | 19:45 |
pcardune | flint: that's correct, or if you are really cool, you could use zopes apidoc tools | 19:45 |
Yuy | it says half an hour over here | 19:45 |
flint | pcardune, keep in mind that I am very weak in the concepts of objects paul. everyone else is not | 19:45 |
jelkner | flint: actually, i'm glad you are raising these issues | 19:46 |
pcardune | flint: if you want to see a good list of everything that is provided, run a zope3 server, and type in http://localhost/++apidoc++ | 19:46 |
wdickers | so am I | 19:46 |
jelkner | that's what i was hoping you would say | 19:46 |
flint | i am running a zope3 server and I am all over this!!! | 19:46 |
jelkner | pcardune: do you mind if i make a few observations? | 19:46 |
pcardune | absolutely | 19:46 |
pcardune | i mean... absolutely not | 19:46 |
jelkner | lol | 19:46 |
pcardune | rather, absolutely do make the observations | 19:46 |
jelkner | ok, i've been down this path before, and here is what i see: | 19:47 |
jelkner | 1. we have written quite a bit of code already, and we have no way of knowing if it "runs" | 19:47 |
jelkner | yet | 19:47 |
jelkner | 2. my head is already about to explode. | 19:48 |
wdickers | lol | 19:48 |
jelkner | now, i know the learning curve for this is steep | 19:48 |
flint | jelkner, then I have accomplished my goal! | 19:48 |
Yuy | 1. wouldn't we just test it on python the same way we do java? | 19:48 |
jelkner | without pcardune to help us over the rough spots, i don't think i could make it | 19:49 |
jelkner | so i'm glad he is here! ;-) | 19:49 |
flint | pcardune, btw, "http://64.5.53.104:8080/++apidoc++" wants a password!!! | 19:49 |
pcardune | it is probably username:gandalf password:123 | 19:49 |
flint | pcardune, na, no testing, lets just torture jeff!!! | 19:49 |
jelkner | question: how long to we have until we can run something? | 19:50 |
*** vidasp has quit IRC | 19:50 | |
flint | na, it wants the user "zope" password... | 19:50 |
pcardune | jelkner: well that depends on how you want to run it | 19:50 |
jelkner | we should definitely resolve the ++apidoc++ problem | 19:50 |
pcardune | we can write tests now | 19:50 |
jelkner | so we can use zope to learn zope | 19:51 |
pcardune | or we can wait, and implement these classes first | 19:51 |
pcardune | then we can write more interesting tests :) | 19:51 |
jelkner | can you explain the tradeoffs? | 19:51 |
pcardune | or we can wait even more, configure the classes, and then we can actually play with them through the web | 19:51 |
flint | jelkner, lemme work the ++apidoc++ issue... | 19:51 |
pcardune | adding tests now wouldn't be very interesting and would be very technical | 19:52 |
jelkner | ok, that sounds like a bad idea then | 19:52 |
pcardune | adding tests after we have made an implementation would allow us to do doctests, which are way more useful and very important | 19:52 |
wdickers | yeah, that sounds better | 19:52 |
flint | pcardune, I am with you, particulaly if it ticks jeff off... | 19:52 |
pcardune | the downside of doctests is that they dont *do* anything... so even after the doctests you wont be able to see them through the web | 19:52 |
jelkner | well, you will know they pass, yes? | 19:53 |
pcardune | or rather, work with the content objects through the web | 19:53 |
pcardune | jelkner: right | 19:53 |
jelkner | so that is "doing" something | 19:53 |
flint | pcardune, we know the code works. we have faith. | 19:53 |
pcardune | and you will learn how to write doctests which is good | 19:53 |
jelkner | yes, i like that | 19:53 |
jelkner | can we meet same time next week? | 19:53 |
pcardune | yes | 19:53 |
jelkner | flint, wdickers, yuy, does that work for you? | 19:54 |
flint | pcardune, thanks for your patience. | 19:54 |
Yuy | always | 19:54 |
flint | pcardune, any reading? | 19:54 |
jelkner | yes, teach, give us some homework! | 19:54 |
pcardune | you can start looking through chapter 13 | 19:55 |
pcardune | and you will see what we have done in that chapter | 19:55 |
jelkner | what's the title? | 19:55 |
flint | pcardune, sorry I brought it up... | 19:55 |
pcardune | although it does containers a bit differently | 19:55 |
jelkner | the on-line folks don't have chapter numbers | 19:55 |
pcardune | "writing new content objects" | 19:55 |
jelkner | thanks | 19:55 |
flint | wdickers, you mentioned a url for the book. cough it up! | 19:55 |
flint | please :^) | 19:56 |
jelkner | ok, i will write today's lesson up and email you all when it is ready | 19:56 |
wdickers | http://www.zope.org/DevHome/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book | 19:56 |
flint | wdickers, nice touch... | 19:56 |
wdickers | =) | 19:56 |
jelkner | http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition | 19:57 |
jelkner | pcardune: which is the most recent version? | 19:57 |
flint | jelkner, even better... got chapter numbers and everything... | 19:58 |
pcardune | umm... i think that is for zope2 | 19:58 |
jelkner | no, sorry, wrong book! | 19:58 |
wdickers | Darn D:< | 19:58 |
wdickers | xD | 19:58 |
flint | pcardune, make jeff sit in the corner!!! | 19:58 |
flint | jelkner, still this is good for me and my ongoing battle with zope 2. | 19:59 |
pcardune | you want to use the one titled Zope3Book | 19:59 |
jelkner | wdickers has the right url | 19:59 |
wdickers | 8D | 19:59 |
flint | jelkner, yea william is always right, he is the teachers pet! | 20:00 |
pcardune | flint: I don't recommend learning zope 2 and 3 at the same time... it's like learning french and spanish at the same time, you are going to mess yourself up | 20:00 |
jelkner | http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/contentobject.html | 20:00 |
jelkner | that's our homework chapter | 20:00 |
wdickers | Aww, again? | 20:00 |
Yuy | why would you learn 2 instead of 3? | 20:00 |
flint | pcardune, it is like beating yourself with two sticks at once. Note that they are different sticks. | 20:00 |
flint | Yuy, zope3 should have literally been given a new name... IMHO | 20:01 |
wdickers | So that's....chapter 13 | 20:01 |
jelkner | yuy: zope3 is a complete rewrite from scratch | 20:01 |
pcardune | dont be discouraged if you are lost after reading it :) | 20:01 |
jelkner | but is only ready for developers (like us ;-) | 20:01 |
pcardune | that is normal, this stuff is difficult | 20:01 |
jelkner | zope2 is still the version used most commercially | 20:02 |
jelkner | that will change over the next few years | 20:02 |
jelkner | cando is a zope3 application | 20:02 |
jelkner | so we need to learn that | 20:02 |
flint | pcardune, gee I just though elkner made it difficult :^) | 20:02 |
pcardune | flint: I thought you thought you made it difficult ;) | 20:02 |
jelkner | anyway, i need to run, is class over, teach? | 20:03 |
flint | Yuy, I have on good authority (e.g. Lex) that this is the way to go. and I do make it difficult. If I get it anyone can get it. | 20:03 |
pcardune | yes | 20:03 |
flint | pcardune, indeed thanks again. | 20:03 |
jelkner | see ya'll next week then! | 20:03 |
jelkner | pcardune: yes indeed, thanks! | 20:03 |
wdickers | Thanks pcardune :) | 20:03 |
pcardune | my pleasure | 20:03 |
pcardune | see you all next sunday | 20:03 |
wdickers | Remember jelkner, do the snow dance! | 20:03 |
Yuy | yeah, thanks again for clas | 20:03 |
*** jelkner has quit IRC | 20:03 | |
wdickers | See you all next week | 20:04 |
*** pcardune has quit IRC | 20:04 | |
*** wdickers has quit IRC | 20:04 | |
flint | sksk | 20:04 |
Yuy | so.. what did we go over? | 20:06 |
Yuy | basically IPerson, IPersonContainer, and IPersonContained | 20:06 |
*** Yuy has quit IRC | 20:09 | |
*** Aiste has quit IRC | 20:32 | |
*** pcardune has joined #schooltool | 20:43 | |
*** jelkner has joined #schooltool | 21:48 | |
jelkner | hi all, i'm trying to get this zope3 installation problem cracked, but i've still got a PYTHONPATH issue. | 21:49 |
jelkner | if you install from svn into /usr/local/src/Zope3 and then use mkzopeinstance to create an instance in $HOME/zope3, how do you set the PYTHONPATH (and where) so that your application can import from zope? | 21:50 |
jelkner | 1. can it be done easily so that it works for all users? | 21:51 |
jelkner | 2. or should each person edit their .bashrc and add something to their PYTHONPATH? | 21:51 |
jinty | jelkner: you shouldn't need to set the pythonpath | 21:57 |
jelkner | jinty: i can get it to work if i add to my .bashrc: export PYTHONPATH=/usr/local/src/Zope3/src | 21:57 |
jelkner | otherwise the stuff in /usr/local/src/Zope/src is not known by Python | 21:58 |
jinty | yeah, not known but python, but known by the zope3 instance | 21:59 |
jelkner | ahh | 21:59 |
jinty | s/but python/by python/ | 21:59 |
jelkner | i see the problem was i was trying just to run 'python interfaces.py' to make sure there weren't any syntax errors in the file | 22:00 |
jinty | mkzopeinstance should create an instance that remembers where it was installed from | 22:00 |
jelkner | how could i achive the same end? | 22:00 |
jelkner | i understand | 22:00 |
jelkner | so once we start zope it won't have a problem finding stuff | 22:01 |
jelkner | but how can i run the files before hand just to test them? | 22:01 |
jinty | well, normally unit tests should import enough to find all syntax errors | 22:01 |
jelkner | gottcha | 22:01 |
jinty | so make a simple doctest or somehting... | 22:02 |
jinty | yep, once you start zope from the instance it'll find everything | 22:02 |
jelkner | ok, i'll ask pcardune about that next week. thanks! | 22:02 |
*** strichter has joined #schooltool | 22:02 | |
*** srichter has quit IRC | 22:02 | |
jinty | no worries;) | 22:02 |
*** jinty has quit IRC | 22:09 | |
flint | #! /usr/local/bin/python | 22:14 |
flint | # | 22:14 |
flint | # Pflint: | 22:14 |
flint | # Sun Feb 5 12:31:58 EST 2006 | 22:14 |
flint | # Today is Sweetmorn, the 36th day of Chaos in the YOLD 3172 | 22:14 |
flint | # | 22:14 |
flint | import zope.interface | 22:14 |
flint | import zope.schema | 22:14 |
flint | jelkner, this is kinda where i would go to get us out of the woods.... | 22:25 |
flint | #! /usr/local/bin/python | 22:25 |
flint | # | 22:25 |
flint | export PYTHONPATH=/usr/local/src/Zope3/sr | 22:25 |
flint | #! /usr/local/bin/python | 22:25 |
flint | # | 22:25 |
flint | # Pflint: | 22:25 |
flint | # Sun Feb 5 12:31:58 EST 2006 | 22:25 |
flint | jelkner, this is another way... | 22:27 |
flint | #! /bin/bash | 22:27 |
flint | # | 22:27 |
flint | export PYTHONPATH=/usr/local/src/Zope3/sr | 22:27 |
flint | #! /usr/local/bin/python | 22:27 |
flint | # | 22:27 |
flint | # Pflint: | 22:27 |
flint | # Sun Feb 5 12:31:58 EST 2006 | 22:28 |
*** pcardune_ has joined #schooltool | 22:39 | |
flint | jelkner, what about this as a hack? | 22:45 |
flint | #! /usr/local/bin/python | 22:45 |
flint | # | 22:45 |
flint | # Pflint: | 22:45 |
flint | # Sun Feb 5 12:31:58 EST 2006 | 22:45 |
flint | # path hack... | 22:45 |
flint | import sys | 22:46 |
flint | sys.path = sys.path + ["/usr/local/src/Zope3/src"] | 22:46 |
jelkner | if __name__ == '__main__': | 22:49 |
jelkner | import sys | 22:49 |
jelkner | sys.path = sys.path + ["/usr/local/src/Zope3/src"] | 22:49 |
mgedmin | fwiw, if you have installed Zope 3 from, say, the Ubuntu zope3 package, its modules will appear earlier in sys.path and /usr/local/src/Zope3/src will never get used | 22:58 |
mgedmin | sys.path.insert(0, '/usr/local...') would be more reliable | 22:58 |
*** pcardune has quit IRC | 22:59 | |
*** mgedmin has quit IRC | 23:09 | |
jelkner | ahh, so what we want is: | 23:15 |
*** flint has quit IRC | 23:15 | |
jelkner | sys.path = ["/usr/local/src/Zope3/src"] + sys.path | 23:16 |
*** Aiste has joined #schooltool | 23:35 | |
*** strichter is now known as srichter | 23:45 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!