IRC log of #schooltool for Sunday, 2006-02-12

*** Sague has joined #schooltool00:32
*** Sague has left #schooltool00:55
*** vidasp has quit IRC00:59
*** Yuy has joined #schooltool03:59
*** Yuy has left #schooltool04:00
*** tiredbones has left #schooltool04:40
*** wrobel has joined #schooltool09:59
*** jinty has joined #schooltool10:02
*** vidasp has joined #schooltool13:02
*** tiredbones has joined #schooltool13:10
*** shapr has quit IRC13:33
*** mgedmin has joined #schooltool14:27
*** th1a has quit IRC14:28
*** jelkner has joined #schooltool14:42
jelknersrichter: good morning, stephan, are you up at this hour on a sunday morning?14:43
srichteryes, I am but that does not mean I am going to be on the computer consistently ;-)15:03
srichterbut I am here for now15:03
jelknerdid you get my email?15:04
jelkneri never heard back15:04
jelkneri'm trying to setup zope3 for development learning15:04
jelknerand running into many snafus15:04
jelkneri've read chapter 1 of your book several times15:05
jelknerand i'm trying to figure out from it the ONE best way for us to install zope15:05
jelknerquestion 1: should i use svn or the source tar ball?15:06
*** ignas has joined #schooltool15:13
srichterI 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
srichterto answer your question: I have never used a release :-)15:16
srichterit frustrates me to much15:16
jelknerso you use svn?15:16
srichteronce you have the basic setup (C, make, Python, Python-Dev, etc), then the source is a no-brainer to install15:17
srichterand updating to the latest development version is much simpler (as Paul has argued here before)15:17
jelkneri'm still having problems15:17
srichterwhat do you have troubles with?15:18
jelknerhere is the page i'm writing up: https://wiki.ubuntu.com/LearningZope315:18
*** ignas has joined #schooltool15:18
jelknerproblem 1: after checking out the source and running make (no problem there)15:19
jelkneri ran python test.py -v15:19
jelknerthe regular tests ran15:19
*** ignas has quit IRC15:19
jelknerbut it seg faulted on the functional tests15:19
srichterwell, this is clearly a Debian problem15:20
srichterwe have had no reports of segfaults in years15:20
jelknerhmmm15:20
*** ignas has joined #schooltool15:20
srichterare you running some sort of unstable version?15:20
jelknerno ubuntu breezy15:20
srichterso something in that software stack seems broken15:21
srichterhave you tried updating C and Python to the latest bug fix release?15:21
jelknerno15:21
jelkneri would rather just try on dapper first15:21
jelknerlet me ask a few other questions before i go off and do all that15:22
jelkner(i'm trying to get the students setup for paul's class at 11 this moringin)15:22
jelknercan i ignore the funtional test failure?15:22
srichtermaybe15:22
srichtertry running Zope 3 and see whether you can work in the Web UI a little bit15:23
srichterbtw, which test is causing the segfault?15:23
jelkneryeah, it works15:23
jelknerhow can i tell?15:23
srichterok, then it should be pretty safe15:23
srichtertry:15:23
jelknerall i get is ..... Segmentation fault15:23
srichtertest.py -vpf115:23
jelknerhold on...15:23
srichterthis will tell you always the current test it is running15:23
jelknerit hasn't crashed yet15:29
jelknerRunning:15:29
jelkner    250/516 (48.4%) /usr/local/src/Zope3/src/zope/app/form/browser/i18n.txt15:29
jelknerbut it seems to be hanging on this test for several minutes15:30
srichtermmh, that is strange15:30
srichtermgedmin: btw, I am sorry I have not gotten back to you yet15:30
jelkneranyway, 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
jelkneri want to make instances of zope in each user's home directory15:31
srichtermgedmin: I was in Europe the last two weeks, so I have had no time yet to set down and evaluate the coverage stuff carefully15:31
srichterjelkner: btw, are you using the paper copy?15:31
jelkneryes15:31
srichterok15:31
srichtershoot15:31
jelknerwell, you decribe running mkzopeinstance in the section on tar ball install15:32
jelknerbut in the svn section you don't15:32
jelkneris 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 IRC15:34
jelknerthat's what i want15:35
jelknerwe have 5 students learning zope3 from paul15:35
jelknerand a development machine on which they have shell accounts15:35
srichteryes, that should be possible15:35
jelknerok, my email concerned what happened when i tried15:36
srichterif you give students access to running mkzopeinstance, they should be able to all create local instances15:36
srichterso what happened?15:36
jelknerlet me reproduce it and tell you what went wrong15:36
jelknerhold on...15:36
srichterok, I still have the E-mail in my inbox15:37
srichterI see what's wrong15:38
jelknerhmm... it looks like the development server is down15:38
srichterstudents don't have permissions to write a new sdirectory for the mail-queue15:38
jelkneryes15:38
jelknerhow can i fix that is a sane way?15:38
srichterokay, the quick fix would be to point the queue to a directory that they have write access to15:39
srichteror simply take out zwiki-configure.zcml from package-includes15:39
jelknerahh15:39
jelknerthat would be the best15:39
jelknerwe won't be using zwiki anyway15:39
jelknerok, let me try that15:40
mgedminjelkner, fwiw I use ubuntu breezy and Zope 3 svn checkouts15:40
mgedminI haven't encountered any segfaults yet15:40
jelknerand?15:40
jelknerok15:40
jelknerlet me try again on another box15:40
jelknerbesides, i think our development server just went down due to power outage15:41
jelknerso that might explain the hanging on the functional test15:41
mgedminsrichter, I have now also encountered inaccurate data from schooltool's test.py --coverage on another project (see yesterday's irc log)15:41
srichtermgedmin: ok15:42
mgedminthe interesting bit is: if I limit the tests to a single package, I get accurate coverage15:42
srichterstrange15:43
mgedminif I run all the tests, I get inaccurate coverage for that package15:43
mgedminand the difference is code covered by doctests15:43
mgedminas opposed to code which is covered by unit tests15:43
srichtermmh, strange15:43
mgedmin(doctest-tested code is shown as untested)15:43
mgedminyep, strange15:43
srichterI still want to try running Zope 3's tests with schooltool's test runner to see whether we get better coverage15:44
jintyseeing 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
mgedminmy only objection was alwyas 'jinty might object' ;-)15:45
mgedminwell, and sometimes zope 3 trunk breaks schooltool15:45
srichterjinty: +100000015:45
mgedminotoh it is better to get small breakages early and often15:45
srichtermgedmin: yep, I think so too15:46
mgedminthan one huge ball of breakage in 6 months when we decide to jump to the next zope release15:46
mgedminso, +215:46
srichterjinty: that is really great! :-)15:46
jintythought you might like it15:47
jintymy only objection dissappeared when I saw the work bringing the old version up to date.15:47
jintyhave fun;)15:47
srichterthanks15:47
srichterjelkner: any progress? :-)15:50
jelknerwell, the power appears to have gone out at my school (in virginia, i'm in maryland)15:50
jelknerso the server is down15:50
jelkneri'm now switching to a server in my home15:50
srichterok15:50
jelknerit will be a while before i'm ready15:51
srichteris it snowing down there as well?15:51
jelkner(i have til 11 ;-)15:51
srichterok15:51
jelkneryes a lot15:51
srichter:-)15:51
srichterit just started here this morning15:51
srichterwe are supposed to get about a foot (yipee)15:51
jelknerwe already did15:52
srichteryou got a foot down there? wow.15:52
mgedminall zope 3 trunk unit and functional tests (make test ftest) pass on my breezy system; no segfaults15:52
jelknermgedmin: thanks15:53
jelknerthe test box i have at home is dapper15:53
jelknerso i'm going to run with that and see what happens15:53
jelkneri'm looking for the easiest install i can get15:54
jelknerso i'll try (in this order):15:54
jelkner1. the debs in universe15:54
jelkner2. svn15:54
jelkner3. tar ball15:54
jelkneruntil i find one method that works ;-)15:54
srichterbtw, the bug you encountered is interesting, since it shows a general problem that we need to address15:58
jelknerhow can i make it known more widely?15:58
jelkneror by telling you did i do that already? :-)15:59
jelknerzope3 is not currently installable on dapper15:59
jelknerThe following packages have unmet dependencies:15:59
jelkner  zope3: Depends: python2.4-mechanize (>= 0.0.10a) but it is not installable15:59
jelknerE: Broken packages15:59
jelknerso let me try the svn...16:00
srichterjelkner: send a message to zope3-dev16:00
srichteryeah, the checkout comes with mechanize, so that should be no problem16:00
srichterok, my wife just got up, so I might only sporatically be online16:02
jelknerbuilt fine, running tests...16:02
jelknerno problem16:02
povbot`/svn/commits: * jinty committed revision 5755:16:05
povbot`/svn/commits: Track the Zope3 trunk until the next release.16:05
mgedminvery interesting16:10
mgedminit seems that my problems with code coverage are caused by some doctests calling sys.settrace(None)16:10
mgedminaha!16:11
mgedminthese are doctests that use the 'doctest' module from the standard library instead of zope.testing.doctest16:12
mgedminouch16:12
tiredbonesIt 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 #SchoolTool16:13
mgedminzope.testing.doctest has a commented workaround that fixes coverage reports16:13
mgedminpython 2.4's stock doctest does not have it16:13
mgedminit calls self.debugger.set_continue() after every test16:13
mgedminand bdb.set_continue() calls sys.settrace(None)16:14
mgedminwhich breaks coverage tracking16:14
mgedminsrichter, there are a number of modules in Zope 3 that import doctest from the stdlib, instead of zope.testing.doctest16:15
mgedminthis breaks unit test coverage reports16:15
mgedminthere are 8 of them: http://zope3.pastebin.com/55115416:16
* mgedmin wonders if python 2.5 has that doctest bugfix or not16:19
jelknercould someone explain the +/- of the password manager choice (Plain Text16:19
jelkner, MD516:19
jelkner, or SHA1)?16:19
mgedminhmm16:21
mgedminSHA1 passwords are most secure, but also newest16:21
mgedminMD5 are in the middle16:22
mgedminwait a second, what is the context?16:22
jelknerif we are in a learning situation?16:22
jelknertrying to learn zope316:22
mgedminah16:22
jelkneris there a drawback to using the more secure method16:22
mgedminI know nothing about password managers in zope 316:22
jelknerwill it make things harder to do?16:23
mgedminthe drawback, I suppose, is that you can not recover the password16:23
jelknerif that is the only drawback, it isn't a problem16:23
mgedmin(and cannot, for example, email the user his password if he forgets)16:23
jelknerahh16:23
jelknerok, thanks!16:23
mgedminbut then again why not just generate a new random password?16:23
jelknerright16:23
jelknersrichter: the problem i emailed you about does not happen with the trunk, apparently, while it did with the branch16:28
jelknereverything is working16:28
mgedminjelkner, are you talking about the segfault?16:33
mgedminwhich branch was it? 3.2?16:33
jelknerno16:33
jelknerwith the branch version, zope wouldn't start because of a permission problem16:34
jelknerstudents don't have permissions to write a new sdirectory for the mail-queue16:35
mgedminsrichter, re coverage -- there are more modules using doctest than I initially thought: http://zope3.pastebin.com/55117616:41
mgedminhmm, I got rid of all sys.settrace(None) calls during the test run, but I still get incomplete coverage data17:22
jelknerquestion: where do i place the source for a new package in my zope3 instance?17:27
mgedminjelkner, anywhere that's available in your PYTHONPATH17:29
mgedminif I use a svn checkout, I tend to make a symlink in src/17:29
mgedminif you have an instance, you can create a symlink in lib/python/17:29
jelknerthat's what i was after...17:30
mgedminschooltool's top-level scripts fiddle with PYTHONPATH to make Zope3/src and schooltool's src/ available in sys.path17:30
jelknerlet's assume i have /home/jelkner/zope3/lib/python in my instance17:31
jelknercan i just put the new directory in the lib/python directory of my instance?17:31
mgedminyes17:31
jelknercool17:31
jelknerthanks!17:31
mgedminjinty, srichter: zope trunk is not backwards-compatible with zope 3.217:32
mgedminTypeError: ViewletManager() takes at least 2 arguments (1 given)17:32
mgedminRan 1017 tests in 272.604s17:32
mgedminFAILED (failures=1, errors=228)17:32
mgedmin -- http://source.schooltool.org/buildbot/pov-schooltool/builds/213/step-unit%20tests/017:32
*** vidasp has joined #schooltool17:33
jelknerto make a directory a module, do i want __init__.py or __init.py__ ?17:35
mgedminjelkner, __init__.py17:35
jelknerthat's what i thought, thanks!17:35
*** wdickers has joined #schooltool17:54
wdickerswhy hello there17:55
jelknergood morning wdickers17:55
jelknerdo you have zope3 installed on your system?17:55
jelkneri've created a wiki for our class: http://ypal.net/zope3class17:56
jelknerthe first link under "prerequisites" takes you to a page describing how to install zope317:56
wdickersditto jelkner17:59
wdickersno :(17:59
wdickersshould I synaptic it?17:59
jelknerno17:59
wdickersjelkner?17:59
wdickerswhoops, I'll do that right away17:59
*** flint has joined #schooltool18:00
flintjelkner, are you there?18:00
jelknerno problem will, i didn't tell you about this yet18:00
jelkneryes flint, i'm trying to help will get zope3 installed18:00
flintgotcha...18:01
*** Yuy has joined #schooltool18:01
jelknergood morning linda18:02
jelknerdid you ssh (using putty) into fdouglas.elkner.net yet?18:02
flinthey linda, how is w&l?18:03
wdickershmm, the comman \d "svn" isn't being accepted18:03
Yuyhey, everyone18:03
jelknerour teacher is about to join us18:05
jelkner(just got off the phone with him)18:05
wdickersyay18:05
Yuyjelkner: when it asks for login, i login regularly?18:05
wdickersjelkner? I'm having problems installing Zope3 o.o;18:05
flintok then...18:05
jelkneryuy: if you have trouble logging in please call me @ 301-779-814218:05
jelknerwait, you can't do that, can you?18:06
Yuyyes i can18:06
*** pcardune has joined #schooltool18:06
jelknergood, i'm waiting18:06
jelknergood morning paul!18:07
Yuymorning, paul18:07
wdickersmorning paul18:07
pcardunehello everybody18:07
pcarduneso is this new wiki page you just put up on the ubuntu wiki jelkner?18:07
jelknerwhile i help will and linda get setup, can you please take a look at: http://ypal.net/zope3class18:08
Yuyjelksner: thanks18:08
jelknerwdickers: how is the zope3 install coming?18:08
wdickersnot too well, it doesn't accept the command "svn"18:08
jelkneri have a better idea than18:08
jelknerwdickers: call me @ 301-779-8142 and i'll give you a shell account18:09
flintpcardune, hi there paul...18:09
pcardunehi flint18:09
wdickerskk18:09
jelknerflint: let the teacher look over the lesson! ;-)18:09
jelknerwdickers?18:10
wdickerscalling18:10
pcardunethat looks good to me18:10
wdickersI don't think that's the right number18:10
jelkneri took the log from last week and edited it down18:10
jelknerwe are almost ready, as soon as i get will setup we can move forward18:11
flintrichter on page 54 lines 01 & 02 on that page, uses a different syntax for the import.  what are your thoughts?18:11
wdickersjelkner: when I call that number I get an answering machine18:11
jelknergive me your number, i'll call you18:12
*** _pcardune has joined #schooltool18:12
wdickerskk 703-276-947518:12
_pcardunedont forget that your phone numbers are forever logged on the internet now ;)18:12
flintpcardune, instead of say "import zope.interface" he uses "from zope.interface import Interface"18:13
flintpcardune, better that then passwords forever logged on the internet...18:13
_pcarduneflint: You can use either method of import, it depends on your usage18:14
flintthe indication I get from the reading is that is he represents the later method as more efficient.  your thoughts?18:14
_pcarduneif 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 Interface18:14
_pcardunes/plage/page18:15
flintgot any feeling for the penalty in performance?18:15
_pcardunenone18:15
flintok, also is the code snippet from last week supposed to do anything?18:16
_pcarduneI think what he means by efficient, is efficient for the programmer, not for python or zope18:16
_pcarduneflint: at the moment, no, it wont do anything unless18:16
_pcarduneyou open a python prompt and start messing with it18:16
_pcardunebut we'll do that later18:16
flintthe good news is that it seems to pass python interperter syntax fine...18:17
flintpcardune, that is there are no errors...18:18
flintpcardune, where are you btw...18:18
_pcarduneeastern washington state18:18
flintpcardune, aparently DC is snowed in.  Falls Church has declared school closed for the week!18:19
Yuyreally? do you know about arlington?18:19
flintpcardune, the irony is that I am in Vermont without a SINGLE snowflake in the air!18:19
_pcarduneYuy: dont get your hopes up, arlington doesn't close for a layer of ice on the road18:20
flintYuy, no word yet linda...18:20
Yuyalright18:20
_pcarduneso, while they are getting set up, is everyone up to speed on what the interfaces.py file is for?18:20
flintyea, superentendent smith has a motto "educate or die!"18:20
flint:^)18:20
_pcarduneflint: or both!18:21
flintpcardune, now paul, you escaped... :^)18:21
wdickersback18:21
jelknerok i think we are ready to go18:21
wdickersarlington NEVER closes >.<18:21
_pcardunei've just got baggage over the broken nose that ice gave me in the year 200018:21
jelknerwe need to bring linda and will up to speed with what we did last week18:21
jelkneryuy and wdickers: ready?18:22
wdickerssure18:22
Yuysure18:22
_pcardunehave the two of you read the chapter in the Zope book and/or do you have a copy of it?18:22
jelknercd zope3/lib/python18:22
Yuyi have a copy up18:22
_pcarduneactually, you should have a copy cause it is freely available online18:22
wdickershehe, I have a copy up18:22
_pcarduneok, well anyways, so we started by creating a timeclock package18:23
flintwdickers, what is the url for the book?  I have a print copy.18:23
jelknerwait, _pcardune, i need to get them to where we ended last week..18:23
jelknerdid you cd zope3/lib/python ?18:23
jelknertell me when you are ready18:23
Yuyam in the directory18:23
_pcardunejelkner: 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
jelknerwdickers?18:24
wdickersyup18:24
jelknermkdir timeclock18:24
wdickersgot it18:24
jelknercd timeclock18:24
jelknertouch __init__.py18:24
jelknervi interfaces.py18:25
jelkneryou can find all that at: http://ypal.net/zope3class18:25
flintjelkner, vim you bad man...18:25
wdickersready18:25
jelknerthen make your interfaces.py look like this one: http://ypal.net/zope3class/InterfacesPy18:26
jelknerthen _pcardune can take it away!18:26
_pcarduneeverybody ready?18:27
jelkneri am ;-)18:27
flintpcardune, I added a #! line and some docs to the Interfaces.py file.... wanna see?18:27
_pcarduneflint: sure, why don't you upload it18:27
_pcarduneto the wiki18:27
jelknerwait, we agreed last week that import interfaces would be better18:28
jelknersince it would make it easier for us newb's to see where things came from18:28
jelknerexplicit is better and all...18:28
*** pcardune has quit IRC18:28
*** _pcardune is now known as pcardune18:28
wdickersI'm ready18:28
jelkneroops we lost our teacher18:29
pcarduneanways18:29
jelkneryuy: are you ready?18:29
flintjelkner, the wiki ate my carrage returns!18:29
pcarduneto start things off, Zope is a content management system18:29
Yuysure18:29
pcarduneso the biggest thing we are going to be working with is content, specifically what are called content objects18:29
pcardunea content object is any type of information we want to store as a complex python class18: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
pcardunefor example, what we are working on now is a representation of a Person that can be logged into the system18:30
pcardunefor every content object, there must be interfaces which define a contract for this content object18:31
flintsounds like a business law class... :^)18:32
pcardunethat is, the implementation you come up with for this object must fit a contract defined by an interface18:32
pcarduneInterfaces are also heavily used for documentation purposes18:32
pcarduneso, in the interfaces.py file, you see the IPerson interface18:33
pcarduneand we have defined one attribute, username.18:33
pcardunethat means that all implementation of a Person must have a username attribute18:33
pcardunewriting interfaces also helps you think about the functionality you want your object to have, before having to worry about the implementation18:34
pcarduneso, defining attributes in an interface works with the things called schema fields18:35
pcardunetechnically 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 class18:36
flintpcardune, the object is the person and that object currently has one attribute, a username, and that username is part of a schema?18:36
pcarduneflint: correct18:36
pcarduneflint: once we write methods for the Person object, then IPerson will also be an interface18:36
flintpcardune, I am just sucking up to the teacher (unlike that bad boy Jeff :^).18:36
pcarduneit is just a question of nomenclature18:37
pcarduneso, schemas allow us to write "contracts" for specific attributes because they can define what kind of data can be stored in an attribute18:37
pcarduneyou all know that python has no type checking, schemas essentially allow you to do type checking18:37
pcarduneso, we have defined username as only being able to store text... not numbers, not lists, not dictionaries, etc.18:38
pcarduneok, so I think that is pretty much where we left off last week18:39
pcardunedoes everyone understand up to this point?18:39
jelknerwhat about tiltle, etc?18:39
jelkners/tiltle/title18:39
pcarduneok, schemas also allow you to document your attributes18:39
flintpcardune, 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
pcardunethis is the purpose of title, description, and all the other arguments you see18:39
pcarduneflint: an interface is a contract dealing with methods18:40
flintpcardune, ok, besides this cosmic question, I was kinda annoyed that I could not get the title to display in my instance of zope318:41
pcarduneflint: although not strictly methods as we will see soon when we start making containers18:41
jelknerpatience flint, let the teacher teach!18:41
pcarduneflint: it shouldn't display, don't worry18:41
flintpcardune, keep in mind I was just happy it did not error out...18:42
pcarduneok, 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 objects18:42
jelknerreally cool!18:42
pcarduneok, so let's finish writing this Interface18:43
wdickersyay18:43
pcarduneI'm pretty sure jelkner wanted more than just a username attribute for a person18:43
flintpcardune, would this be the wrong time to ask for use of the password schema field?\18:44
jelknerok, now might be a good time to quickly recap what we are writing18:44
pcarduneflint: yes18:44
jelknerso that wdickers and yuy understand18:44
wdickersyeah, we're newbies Dx18:44
jelkneri don't really know for sure what attributes i need, but i know how the finished application should work18:44
jelknerwdickers and yuy18:44
jelknernext summer you will be interns on the cando project18:45
jelkneryou will need to keep track of how you spend your 20 hours per week working18:45
wdickersbefore the summer too?18:45
flintpcardune, excellent the FITS is growing in you now... :^)  wdickers and yuy better to be newbies than old, bitter and ignorant like me!18:45
jelknerwe are writing a web application called timeclock so that you will be able to do that18:45
jelkneryou will clock-in and clock-out of the application whenever you work on cando18:46
Yuywhy do times need to be documented?18:46
jelknerwhen you clock-out, it will ask you what you did and what you learned.18:46
wdickersI assume so we earn out pay :P18:46
wdickers*our18:46
jelkneryes, you do18:47
jelkneryes!18:47
jelknerfor accountability18:47
jelkneranyway18:47
flintYuy, this is basically elkner's attempt to take over the world...18:47
Yuyoh, well that's good to keep in mind ;)18:47
wdickersHe who controls time control everything18:47
wdickers*controls18:47
jelkneryuy: you first need to learn to ignore *everything* you hear from flint ;-)18:47
flintjelkner, cat flint > null...18:48
jelkneranyway, timeclock will allow dave welsh and i to approve your hours, and then generate an invoice for you to arlington public schools18:48
jelknerthat's it18:48
Yuyalright18:48
flintYuy, there is a long and very entertaining story in this if you want later, in the mean time on with the show!18:48
jelknerok, pcardune, take it away18:48
pcarduneok, so do you ( jelkner or flint ) remember what else we wanted for our person object?18:49
jelkneri don't18:49
flintwe need to know this persons hours and their rate18:50
flintwe also need to know what they did18:50
wdickerswouldn'18:50
wdickerswouldn't what they did be under 'description'?18:50
wdickersOh wait, nvm, that's for the person not the time18:50
Yuyor is 'description' a desc of the person themselves?18:50
jelknerwdickers: no, because that description is of the person18:50
jelknernot the event18:51
jelknerthe event will come later18:51
wdickerskk18:51
pcarduneflint: that's correct, but what they've done is not an integral part of their personhood18:51
pcarduneand neither is their rate18:51
pcardunebut as it is now, they don't even have a name18:51
flintwdickers, ever spend any time studying existentialism?18:51
flint:^)18:52
jelknercat flint > /dev/null18:52
pcardunewe will create other content objects to store data about time and what was done during that time18:52
wdickerslol, not really studying. My teacher just told us to use in convos to sound smart18:52
flintpcardune, fair enough, you want to complete the person object...18:52
wdickerswill those content objects be in the same interface?18:53
pcarduneI suggest that we add an attribute for a persons name18:53
wdickerspet name? xD18:53
pcardunewdickers: at the moment yes because we have a small project, for larger projects it gets spread out into other folders and other interfaces.py files18:53
flintpcardune, that is an interesting problem.  would it be two attributes (eg fname, lname)?18:54
wdickersah, okay18:54
pcardunewell, 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 point18:55
flintpcardune, sorry not atributes but interfaces...18:55
pcarduneso I suggest we just have one attribute and call it "title" and have it store the persons full name18:55
flintpcardune, so one big name glob...18:55
pcarduneflint: actually, they are atributes18:55
jelknerare you telling us to do that now?18:55
pcarduneright, at this point we dont have a use case for doing it otherwise, and simple is better18:55
flinttitle is already an attribute18:56
pcarduneyes, do that now18:56
flintdo what?18:56
pcarduneadd another attribute to the IPerson interface, called "title" using a schema field18:56
pcarduneit should look just like the schema field for username18: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
jelkneri wasn't sure about required?18:57
pcardunejelkner: exactly, except it is better to call it 'title' rather than 'name', and i will explain why in just a second18:58
pcardunerequired should be True, because we dont ever want to create a person that doesn't have a name!18:58
YuyI'm guessing required is true, unless it's an optional attribute18:58
pcarduneYuy: exactly18:58
flinti get it the goal in zope3 is to see how many times we can use the word title over and over!!!!18:59
pcarduneflint: something like that18:59
wdickersso why do we give the attributes default values?18:59
Yuyin case they don't add it?18:59
pcardunethey aren't default values18:59
wdickersBut if it's required...18:59
wdickersoh18:59
pcardunethey just define information about the field19:00
wdickersFor the programmer? I see19:00
pcarduneso 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
flintso the top score in the frequency of the word "title" is 5.  this is not good.  i recommend a better atribute name.19:00
wdickersOr rather 'title' in this case ;-)19:01
jelknerpcardune: how does this look now?: http://ypal.net/zope3class/InterfacesPy19:01
pcardunejelkner: that looks good, that is the way it should be19:01
flintelkner please kill my two attempted versions and let us in on the secret of how to edit the silly wiki.19:02
jelknerjust did19:02
jelknerflint: let me edit the wiki19:02
pcarduneflint: in schooltool and cando, all the major content objects have title attributes, it what you are going to call your object19:02
jelknerare we ready to move on?19:03
flintwhat do you mean by "title attributes"?19:03
wdickersflint: the title=u"" part19:03
flintjelkner, not unless it is clear...19:03
pcardunewdickers: flint: actually i mean, the the schemas/interfaces all have title in their contracts19:04
wdickersohhh19:04
pcardunemeaning the title = zope.schema.Text(.... part19:04
flintthat 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 them19:04
pcarduneok, so, moving on19:05
flintgive the field another name please19:05
wdickerssoo...most content objects have title being passed title?19:05
flintpcardune, see what trouble I have started? :^)19:06
jelknerflint wants to make sure that we never get this project finished19:06
jelknerhe was sent here by the forces of evil to sabatog us!19:06
flintpcardune, I really do not do this for pure sadisim  I want this to be CLEAR.19:06
flintpcardune, if we can get the basis clear it is worth the time...19:07
pcarduneok, when we are writing displays for our content object, we want to know what should be at the top of the display19:07
jelknerwhat is a "display"?19:07
pcarduneso, when we are looking at a person object, we want to know what should appear as a header on the page19:07
pcardunei just mean a webpage19:08
flintpcardune, I understand this i suspect.  The field "title" could easily be called "banana" and be syntactically correct eh?19:08
pcarduneflint: write, it has nothing to do with syntax, it is a matter of convention19:08
flintwait a minute... let me show you what I mean...19:08
pcardunethe fields we want displayed as a main header, or a key peice of information is generally 'title'19:08
wdickersoh, so is it similiar to the <title></title> in HTML?19:08
flint# this  should look just like the schema field for username19: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
pcardunewdickers: no, not quite19:09
pcarduneflint: yes, that is syntactically correct19:09
wdickerskk19:09
pcardunefor 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 useful19:10
pcarduneif 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> tags19:11
pcarduneand 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 it19:11
flintpcardune, asked and answered title and banana are the same in this instance... move on.19:11
pcarduneok, that's it19:12
pcarduneso, we have now defined a simple Person... now we will define their storage19:12
wdickerscool19:12
pcardunewe want to put poeple objects all in the same place19:12
pcarduneso we will make what is called a container for them19:12
pcardunecontainers are just like folders, except a bit more abstracted conceptually, so for most intents and purposes, you can think of them like folders19:13
Yuysort of like keeping strings in an array?19:13
pcarduneYuy: more like keeping them in a dictionary19:14
Yuycool19:14
pcarduneso, we will write another interface for a container for person objects19:14
pcardunewe should name it IPersonContainer19:14
wdickersis this still in interface.py?19:15
pcardunewdickers: yes19:15
wdickersokay19:15
jelknerand does it also inherit from zope.interface.Interfaces19:15
jelkner?19:15
pcarduneI'm about to get to that19:16
pcarduneimport zope.app.container.constraints19:16
pcardunewhen we work with containers we want to import zope.app.container19:17
pcardunewoops, look at the last thing i wrote only19:17
pcarduneZope already defines an interface for containers that we will want to reuse, since there are a bunch of zope classes for doing stuff with containers19:17
pcarduneso, IPersonContainer should inherit from zope.app.container.interfaces.IContainer19:18
pcarduneafter this, we want to define what kind of things this container can contain (as part of its contract)19:19
pcarduneso we write as the first line of the container zope.app.container.constraints.contains(IPerson)19:19
pcardunethis tells the zope machinery that we can only put content objects that implement the IPerson interface into a container for person19:20
pcardunedoes this make sense to everyone so far?19:21
flintjelkner, can you put up an example of this on the wiki?19:22
Yuyso the only line we have (for IPersonContainer) is zope.app...19:22
Yuy?19:22
wdickersI'm not sure what "content objects that implement IPerson" means19:22
flintpcardune, I vote for totally lost...19:23
flintpcardune, maybe some code illustrating this would help eh jeff?19:23
pcarduneYuy: yes19:23
pcardunewdickers: what i mean by this is:19:23
jelknercan we pause for a minute to check what we have?19:24
pcardunewe have created a "contract"... which will from now on be reffered to as just an Interface19:24
pcardunejelkner: in a second19:24
pcardunewhen we create the actual implementations of our content objects, they must satisfy this Interface ("contract")19:24
pcardunein other words, our implementation must *implement* this Interface19:25
pcardunewhen an object implements an interface, it means that the object satisfies the contract defined by that interface19:25
pcarduneok jelkner, lets look at what we have19:26
jelknercheck out: http://ypal.net/zope3class/InterfacesPy19:26
wdickersah, so only content objects that satisfy IPerson will go into IPersonContainer? Basically the IPerson itself19:26
jelkneri'm going to record the history of each file as we edit it.19:26
jelkneralso, during the week i will edit this log and turn it into a dialog type tutorial19:27
flintjelkner, I see not diference in the url.19:27
jelknertry reloading19:27
jelknerthere should be a history section19:27
pcarduneflint: click on interfaces.py_v0319:28
flintpcardune, you got it.19:28
jelkneri'll update the main page to the latest version when we finish19:28
flintpcardune, why did jeff put """ in the file?19:28
pcarduneflint: you *always* *must* have docstrings at the beginning of every class and interface and method19:29
jelknerwe will fill these in later, yes paul?19:29
flintpcardune, If it is news to me it is news to yuy and wdickers eh?19:30
pcardunejelkner: now or later19:30
wdickers=O *Runs to add them*19:30
Yuy*already had them* :)19:30
jelkneryeah, yuy!19:30
pcarduneI just used the stars to make emphasis19:30
flintpcardune, wanted everything in sync.  suspected this.19:30
pcarduneas they are one of the most important parts to following the zope coding standards19:30
flintpcardune, and the docstrings should be filled in eh?19:31
pcarduneyes, so we should fill them in now19:31
jelknerplease do19:31
pcardunebut dont think to much about them, a short quick description is all that is necessary19:31
flintjelkner, you started this...19:31
wdickersjelkner: you're missing the zope.app.container.constraints.conatins(IPerson)19:31
Yuyyeah, i was going to ask about that19:32
wdickers*contains19:32
flintwdickers, good call.19:32
jelkneroh, wdickers: could you please fix that?19:32
wdickersWait...maybe we should Gobby the interface?19:32
wdickersokay19:32
jelkneri was making the history when you where talking about that19:32
wdickersfixed19:33
jelknerwe can't19:33
jelkneryuy can't use gobby19:33
jelknershe is on a windows box19:34
jelkneri'll think about a way around that later, but not now19:34
flintjelkner, this wiki thing is working out ok.19:34
pcarduneshall we continue19:34
jelknerflint: yes, and it gives us a history19:34
jelkneryes19:34
Yuygo ahead.. unless this sidetracking is actually important :P19:35
pcarduneok, the next thing we want to do is define a similar interface called IPersonContained (this is not a typo)19:35
pcardunewith again just one line in it19:35
Yuyis it a bool thing to see whether  or not the IPerson is in the IContainer?19:36
wdickersoh well19:36
pcarduneso we write as the first line of the container zope.app.container.constraints.containers(IPersonContainer)19:36
wdickersso it is passed no arguments?19:37
flintis IPersonContained an additional class?19:37
pcarduneYuy: 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 you19:37
pcarduneIPersonContained is an additional class19:37
pcardunewdickers: it is passed one argument: IPersonContainer19:38
Yuyoh, okay19:38
flintpcardune, syntax?19:38
wdickersbut is there anything in the parentheses?19:38
wdickersI mean of IPersonContained()19:38
flintwdickers, probably IPerson19:39
pcarduneit should read class IPersonContained(zope.app.container.interfaces.IContained)19:39
jelknerwdickers: the stuff in the () is the parent class of your new class19:39
pcarduneso, IPersonContained inherits from IContained19:39
jelknerit is python's inheritance mechanism19:40
wdickersgotcha19:40
jelknerpcardune: can you please fix version 4 so it looks right?19:40
flintpcardune, where did IContained come from?19:41
pcarduneok, it is fixed19:41
pcarduneflint: IContained in from zope.app.container.interfaces19:41
flintpcardune, is this an internal attribute of the zope.app.container.interfaces, and if so how did we know this?19:42
pcarduneflint: 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.interfaces19:43
Yuynot to be blunt, but we know because it's provided?19:44
Yuylike how it's automatically assumed 'cd' changes directory or something19:44
pcardunewrite19:44
flintpcardune, you could interrogate the object? eg the docstring?19:44
pcarduneits like working with any python package19:44
pcardunes/write/right19:44
jelknerpcardune: we have 15 minutes left, i'm wondering if this would be a good time to stop and sum up?19:45
pcarduneflint: that's correct, or if you are really cool, you could use zopes apidoc tools19:45
Yuyit says half an hour over here19:45
flintpcardune, keep in mind that I am very weak in the concepts of objects paul.  everyone else is not19:45
jelknerflint: actually, i'm glad you are raising these issues19:46
pcarduneflint: 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
wdickersso am I19:46
jelknerthat's what i was hoping you would say19:46
flinti am running a zope3 server and I am all over this!!!19:46
jelknerpcardune: do you mind if i make a few observations?19:46
pcarduneabsolutely19:46
pcardunei mean... absolutely not19:46
jelknerlol19:46
pcardunerather, absolutely do make the observations19:46
jelknerok, i've been down this path before, and here is what i see:19:47
jelkner1. we have written quite a bit of code already, and we have no way of knowing if it "runs"19:47
jelkneryet19:47
jelkner2. my head is already about to explode.19:48
wdickerslol19:48
jelknernow, i know the learning curve for this is steep19:48
flintjelkner, then I have accomplished my goal!19:48
Yuy1. wouldn't we just test it on python the same way we do java?19:48
jelknerwithout pcardune to help us over the rough spots, i don't think i could make it19:49
jelknerso i'm glad he is here! ;-)19:49
flintpcardune, btw, "http://64.5.53.104:8080/++apidoc++" wants a password!!!19:49
pcarduneit is probably username:gandalf  password:12319:49
flintpcardune, na, no testing, lets just torture jeff!!!19:49
jelknerquestion: how long to we have until we can run something?19:50
*** vidasp has quit IRC19:50
flintna, it wants the user "zope" password...19:50
pcardunejelkner: well that depends on how you want to run it19:50
jelknerwe should definitely resolve the ++apidoc++ problem19:50
pcardunewe can write tests now19:50
jelknerso we can use zope to learn zope19:51
pcarduneor we can wait, and implement these classes first19:51
pcardunethen we can write more interesting tests :)19:51
jelknercan you explain the tradeoffs?19:51
pcarduneor we can wait even more, configure the classes, and then we can actually play with them through the web19:51
flintjelkner, lemme work the ++apidoc++ issue...19:51
pcarduneadding tests now wouldn't be very interesting and would be very technical19:52
jelknerok, that sounds like a bad idea then19:52
pcarduneadding tests after we have made an implementation would allow us to do doctests, which are way more useful and very important19:52
wdickersyeah, that sounds better19:52
flintpcardune, I am with you, particulaly if it ticks jeff off...19:52
pcardunethe downside of doctests is that they dont *do* anything... so even after the doctests you wont be able to see them through the web19:52
jelknerwell, you will know they pass, yes?19:53
pcarduneor rather, work with the content objects through the web19:53
pcardunejelkner: right19:53
jelknerso that is "doing" something19:53
flintpcardune, we know the code works.  we have faith.19:53
pcarduneand you will learn how to write doctests which is good19:53
jelkneryes, i like that19:53
jelknercan we meet same time next week?19:53
pcarduneyes19:53
jelknerflint, wdickers, yuy, does that work for you?19:54
flintpcardune, thanks for your patience.19:54
Yuyalways19:54
flintpcardune, any reading?19:54
jelkneryes, teach, give us some homework!19:54
pcarduneyou can start looking through chapter 1319:55
pcarduneand you will see what we have done in that chapter19:55
jelknerwhat's the title?19:55
flintpcardune, sorry I brought it up...19:55
pcardunealthough it does containers a bit differently19:55
jelknerthe on-line folks don't have chapter numbers19:55
pcardune"writing new content objects"19:55
jelknerthanks19:55
flintwdickers, you mentioned a url for the book. cough it up!19:55
flintplease :^)19:56
jelknerok, i will write today's lesson up and email you all when it is ready19:56
wdickershttp://www.zope.org/DevHome/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book19:56
flintwdickers, nice touch...19:56
wdickers=)19:56
jelknerhttp://www.zope.org/Documentation/Books/ZopeBook/2_6Edition19:57
jelknerpcardune: which is the most recent version?19:57
flintjelkner, even better... got chapter numbers and everything...19:58
pcarduneumm... i think that is for zope219:58
jelknerno, sorry, wrong book!19:58
wdickersDarn D:<19:58
wdickersxD19:58
flintpcardune, make jeff sit in the corner!!!19:58
flintjelkner, still this is good for me and my ongoing battle with zope 2.19:59
pcarduneyou want to use the one titled Zope3Book19:59
jelknerwdickers has the right url19:59
wdickers8D19:59
flintjelkner, yea william is always right, he is the teachers pet!20:00
pcarduneflint: 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 up20:00
jelknerhttp://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/contentobject.html20:00
jelknerthat's our homework chapter20:00
wdickersAww, again?20:00
Yuywhy would you learn 2 instead of 3?20:00
flintpcardune, it is like beating yourself with two sticks at once.   Note that they are different sticks.20:00
flintYuy, zope3 should have literally been given a new name... IMHO20:01
wdickersSo that's....chapter 1320:01
jelkneryuy: zope3 is a complete rewrite from scratch20:01
pcardunedont be discouraged if you are lost after reading it :)20:01
jelknerbut is only ready for developers (like us ;-)20:01
pcardunethat is normal, this stuff is difficult20:01
jelknerzope2 is still the version used most commercially20:02
jelknerthat will change over the next few years20:02
jelknercando is a zope3 application20:02
jelknerso we need to learn that20:02
flintpcardune, gee I just though elkner made it difficult :^)20:02
pcarduneflint: I thought you thought you made it difficult ;)20:02
jelkneranyway, i need to run, is class over, teach?20:03
flintYuy, 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
pcarduneyes20:03
flintpcardune, indeed thanks again.20:03
jelknersee ya'll next week then!20:03
jelknerpcardune: yes indeed, thanks!20:03
wdickersThanks pcardune :)20:03
pcardunemy pleasure20:03
pcardunesee you all next sunday20:03
wdickersRemember jelkner, do the snow dance!20:03
Yuyyeah, thanks again for clas20:03
*** jelkner has quit IRC20:03
wdickersSee you all next week20:04
*** pcardune has quit IRC20:04
*** wdickers has quit IRC20:04
flintsksk20:04
Yuyso.. what did we go over?20:06
Yuybasically IPerson, IPersonContainer, and IPersonContained20:06
*** Yuy has quit IRC20:09
*** Aiste has quit IRC20:32
*** pcardune has joined #schooltool20:43
*** jelkner has joined #schooltool21:48
jelknerhi all, i'm trying to get this zope3 installation problem cracked, but i've still got a PYTHONPATH issue.21:49
jelknerif 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
jelkner1. can it be done easily so that it works for all users?21:51
jelkner2. or should each person edit their .bashrc and add something to their PYTHONPATH?21:51
jintyjelkner: you shouldn't need to set the pythonpath21:57
jelknerjinty: i can get it to work if i add to my .bashrc: export PYTHONPATH=/usr/local/src/Zope3/src21:57
jelknerotherwise the stuff in /usr/local/src/Zope/src is not known by Python21:58
jintyyeah, not known but python, but known by the zope3 instance21:59
jelknerahh21:59
jintys/but python/by python/21:59
jelkneri see the problem was i was trying just to run 'python interfaces.py' to make sure there weren't any syntax errors in the file22:00
jintymkzopeinstance should create an instance that remembers where it was installed from22:00
jelknerhow could i achive the same end?22:00
jelkneri understand22:00
jelknerso once we start zope it won't have a problem finding stuff22:01
jelknerbut how can i run the files before hand just to test them?22:01
jintywell, normally unit tests should import enough to find all syntax errors22:01
jelknergottcha22:01
jintyso make a simple doctest or somehting...22:02
jintyyep, once you start zope from the instance it'll find everything22:02
jelknerok, i'll ask pcardune about that next week.  thanks!22:02
*** strichter has joined #schooltool22:02
*** srichter has quit IRC22:02
jintyno worries;)22:02
*** jinty has quit IRC22:09
flint#! /usr/local/bin/python22:14
flint#22:14
flint# Pflint:22:14
flint# Sun Feb  5 12:31:58 EST 200622:14
flint# Today is Sweetmorn, the 36th day of Chaos in the YOLD 317222:14
flint#22:14
flintimport zope.interface22:14
flintimport zope.schema22:14
flintjelkner, this is kinda where i would go to get us out of the woods....22:25
flint#! /usr/local/bin/python22:25
flint#22:25
flintexport PYTHONPATH=/usr/local/src/Zope3/sr22:25
flint#! /usr/local/bin/python22:25
flint#22:25
flint# Pflint:22:25
flint# Sun Feb  5 12:31:58 EST 200622:25
flintjelkner, this is another way...22:27
flint#! /bin/bash22:27
flint#22:27
flintexport PYTHONPATH=/usr/local/src/Zope3/sr22:27
flint#! /usr/local/bin/python22:27
flint#22:27
flint# Pflint:22:27
flint# Sun Feb  5 12:31:58 EST 200622:28
*** pcardune_ has joined #schooltool22:39
flintjelkner, what about this as a hack?22:45
flint#! /usr/local/bin/python22:45
flint#22:45
flint# Pflint:22:45
flint# Sun Feb  5 12:31:58 EST 200622:45
flint# path hack...22:45
flintimport sys22:46
flintsys.path = sys.path + ["/usr/local/src/Zope3/src"]22:46
jelknerif __name__ == '__main__':22:49
jelkner    import sys22:49
jelkner    sys.path = sys.path + ["/usr/local/src/Zope3/src"]22:49
mgedminfwiw, 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 used22:58
mgedminsys.path.insert(0, '/usr/local...') would be more reliable22:58
*** pcardune has quit IRC22:59
*** mgedmin has quit IRC23:09
jelknerahh, so what we want is:23:15
*** flint has quit IRC23:15
jelknersys.path = ["/usr/local/src/Zope3/src"] + sys.path23:16
*** Aiste has joined #schooltool23:35
*** strichter is now known as srichter23:45

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!