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

*** Travis has joined #schooltool00:19
*** Aiste has joined #schooltool00:44
*** Travis has left #schooltool01:28
*** wrobel has quit IRC01:36
*** Diosan has quit IRC01:58
*** wrobel has joined #schooltool10:25
*** Aiste has quit IRC17:41
*** jelkner has joined #schooltool18:01
*** pcardune has joined #schooltool18:03
jelknermorning paul!18:03
pcardunehey18:03
jelknerok, here is what i'm doing18:04
jelkner1. apt-get install zope318:04
jelkner(on a breezy box)18:04
pcarduneok good18:04
*** flint has joined #schooltool18:05
flintnow the right site...18:05
jelknerok, i tried:18:05
flinttried what?18:05
jelkner/usr/lib/zope3/bin/mkzopeinstance18:05
jelknerand here is what happened:18:06
jelknerDirectory: /home/jelkner/zope318:06
jelknerUsername: jelkner18:06
flintwe are sort of getting ahead of ourselves... eh?  I am 5 minutes late but...18:06
jelknerPassword: *****18:06
jelknerverify: *****18:06
jelknerTraceback (most recent call last):18:07
jelkner  File "./mkzopeinstance", line 45, in ?18:07
jelkner    sys.exit(main(from_checkout=from_checkout))18:07
jelkner  File "/usr/lib/python2.4/site-packages/zope/app/server/mkzopeinstance.py", line 48, in main18:07
jelkner    return app.process()18:07
jelkner  File "/usr/lib/python2.4/site-packages/zope/app/server/mkzopeinstance.py", line 111, in process18:07
*** kjcole has joined #schooltool18:07
jelkner    os.chown(options.destination, uid, gid)18:07
jelknerOSError: [Errno 1] Operation not permitted: '/home/jelkner/zope3'18:07
jelknerdo i need to make the zope3 directory first?18:07
pcardunethat may be necessary18:07
jelknerbut it made it18:07
jelknerlet me see what's in it...18:07
jelknernothing18:08
pcardunetry running the mkzopeinstance in ./bin18:09
pcarduneis there one there?18:09
pcardunenvm18:10
jelknerno18:10
pcarduneyou did that already18:10
jelkneryes18:10
jelknerany idea why this won't work?18:11
kjcoleI'm interpreting things as the mkzopeinstance is trying to behave itself, and doesn't have the privileges to write stuff to a directory owned by ~jelkner18:11
jelknerflint: all you missed was apt-get install zope318:11
pcardunebut you are logged in as jelkner no?18:12
flintgotcha...18:12
pcardunetry using root18:12
jelkneryes18:12
jelknerok, that's what kevin suggested18:12
jelknernot a good practice, but what the hell...18:12
kjcolebut it wants it to be owned by someone else (hence the os.chown call)18:12
pcardunei tried what you just did and it worked for me18:12
jelkneri did it as sudo and got a directory owned by zope18:13
jelknershould i now chown to jelkner?18:13
kjcolei wonder what happens if you try again as jelkner but first add jelkner as a member of the zope group...18:14
jelknerok, pcardune, should i chown?18:14
pcarduneyes18:15
jelknerdone18:15
jelknernow should we start it?18:15
jelknerflint: are you doing this with us?18:15
pcarduneyes, try starting it18:15
flinti am trying to remember where I set up zope3....18:16
*** kjcole has quit IRC18:16
jelknerjelkner@gopher:~/zope3/bin$ ./runzope18:16
jelknerTraceback (most recent call last):18:16
jelkner  File "./runzope", line 48, in ?18:16
jelkner    run()18:16
jelkner  File "./runzope", line 44, in run18:16
jelkner    main(["-C", CONFIG_FILE] + sys.argv[1:])18:16
jelkner  File "/usr/lib/python2.4/site-packages/zope/app/server/main.py", line 58, in main18:16
jelkner    setup(load_options(args))18:16
jelkner  File "/usr/lib/python2.4/site-packages/zope/app/server/main.py", line 169, in setup18:16
jelkner    zope.app.appsetup.config(options.site_definition)18:16
jelkner  File "/usr/lib/python2.4/site-packages/zope/app/appsetup/appsetup.py", line 52, in config18:17
jelkner    context = xmlconfig.file(file, execute=execute)18:17
jelkner  File "/usr/lib/python2.4/site-packages/zope/configuration/xmlconfig.py", line 557, in file18:17
jelkner    context.execute_actions()18:17
jelkner  File "/usr/lib/python2.4/site-packages/zope/configuration/config.py", line 622, in execute_actions18:17
jelkner    callable(*args, **kw)18:17
jelkner  File "/usr/lib/python2.4/site-packages/zope/app/onlinehelp/onlinehelp.py", line 123, in registerHelpTopic18:17
jelkner    raise ConfigurationError(18:17
jelknerzope.configuration.config.ConfigurationExecutionError: zope.configuration.exceptions.ConfigurationError: Help Topic definition /usr/lib/zope3/lib/python/zope/interface/README.txt does not exist18:17
jelkner  in:18:17
jelkner  File "/usr/lib/zope3/lib/python/zope/app/apidoc/bookmodule/book.zcml", line 11.4-16.1018:17
jelkner      <bookchapter18:17
jelkner          id="interface"18:17
jelkner          title="Interfaces"18:17
jelkner          doc_path="README.txt"18:17
jelkner          parent="ifaceschema"18:17
jelkner          />18:17
jelknerflint: are you running breezy?18:17
jelknerpcardune: now what?18:18
pcardunehmmm18:18
pcardunei can't imagine what has gone wrong18:18
pcardunei've followed the same steps and everything worked18:18
srichterhi guys18:18
srichterworking on Sunday, eh?18:18
jelknersrichter: every sunday18:19
pcardunesrichter: no... we're working on super bowl sunday18:19
*** kjcole has joined #schooltool18:19
jelknersrichter: pcardune is teaching flint and i zope318:20
jelknerwe need to start by getting it running18:20
srichterjelkner: are you running a checkout?18:20
jelkneri'm on a x86_64 breezy box18:20
jelknerno18:20
jelknerthe zope3 breezy package18:20
srichterahhh, ok, we are getting closer18:21
jelkneri began with apt-get install zope318:21
srichter64bit architectures require you to change the library link18:21
jelknerahh18:21
jelknerhow do i do that?18:21
srichterthere were several reports on zope3-dev18:21
srichterI forgot, just search the archives18:21
srichterit was recent18:21
jelkneri have another idea18:22
jelknerwhy don't i try this on another box that isn't x86_64?18:22
pcardunejelkner: that would be a good idea18:22
jelknergive me 3 minutes18:23
flintsrichter, actually I am watching jeff flounder around with paul... :^)18:23
flintsrichter, I am at the same time conspiring with kevin cole...18:24
flintkjcole, what I am trying to send you is: http://www.howtoforge.com/samba_setup_ubuntu_5.1018:26
jelkneri tried the same thing on a virtual machine, and the same error occured18:28
jelknersrichter: i want to learn zope3, not fart around with setting it up all day.  is there an easier way?18:29
jelknershould i install from source in my local directory?18:29
pcarduneinstalling from source is fairly simple18:29
*** Aiste has joined #schooltool18:30
jelkner1. downloaded Zope-3.2.0.tgz from http://www.zope.org/Products/Zope3/3.2.0final18:33
jelkneruntarred, creating Zope-3.2.018:34
jelknercd Zope-3.2.018:34
jelkner./configure18:34
jelknergiving this output:18:34
jelkner./configure18:34
jelknerConfiguring Zope installation18:34
jelknerTesting for an acceptable Python interpreter...18:34
jelknerPython version 2.4.2 found at /usr/bin/python18:34
jelknerThe optimum Python version (2.4.2) was found at /usr/bin/python.18:34
jelkneroops, (after reading README.txt)18:35
jelkner./configure --prefix /home/jelkner/zope318:35
jelknermake gives a mess of errors18:37
jelknerstarting with:18:37
jelknerDependencies/persistent-Zope-3.2.0/persistent/TimeStamp.c: In function ‘TimeStamp_raw’:18:37
jelknerDependencies/persistent-Zope-3.2.0/persistent/TimeStamp.c:221: warning: pointer targets in passing argument 1 of ‘PyString_FromStringAndSize’ differ in signedness18:37
jelknerDependencies/persistent-Zope-3.2.0/persistent/TimeStamp.c: In function ‘TimeStamp_laterThan’:18:37
jelknerDependencies/persistent-Zope-3.2.0/persistent/TimeStamp.c:264: warning: pointer18:37
pcardunehmm, i'm just using a zope3 checkout18:39
jelknerpcardune: can you talk me through setting this up?18:40
jelknerthis is getting frustrating18:40
pcardunei can talk you through the checkout18:40
pcardunethat is the only kind of zope i have ever installed18:40
jelknerlet's do that, then18:40
pcarduneok18:40
jelkneri'm on an x86_64 box18:40
jelkneri wonder if i should use the virtual machine instead to play it safe?18:41
pcardunesounds like a good idea, i have never built anything on a 64 bit machine...18:41
jelknerok, i'm there, let's go18:42
pcardunesvn co svn://svn.zope.org/repos/main/Zope3/3.2 Zope318:42
pcardunecd Zope3; make18:42
jelknerhold on, need sudo apt-get install subversion first ;-)18:42
jelknersvn co svn://svn.zope.org/repos/main/Zope3/3.2 Zope318:43
jelknersvn: File not found: revision 41562, path '/Zope3/3.2'18:43
pcardunesvn co svn://svn.zope.org/repos/main/Zope3/branches/3.2 Zope318:44
pcardunewoops18:44
jelknerthat worked ;-)18:44
pcardunethen cd Zope318:44
pcardunethen make18:45
jelknerok, still checking out...18:45
flintjeff, take a break and go talk to kevin...18:46
jelknerflint: nope18:46
flintok, keving is coming in to you... I am looking for my zope3 instance... standby.18:47
pcardunejelkner: how's it going?18:52
flintnow this is getting interesting....18:53
jelknerok, here are the dependencies:18:54
jelkner1. subversion18:54
jelkner2. make18:54
jelkner3. gcc18:54
jelkner4. python-dev18:54
jelkner4. libc6-dev18:54
jelkners/4/518:54
jelkneri think that did it18:55
pcarduneI usually don't notice dependencies because i've already installed them for whatever other application18:55
pcarduneso, did you successfully build it then?18:55
jelkneryes18:55
jelknerbut now ./runzope gives me:18:56
flintI appear to have Zope 3.20 installed on 64.5.53.10418:56
jelknerpython2.4: can't open file 'z3.py': [Errno 2] No such file or directory18:56
jelknerso there is more i need to do18:56
jelknerwhat now?18:57
pcardunewell, first you need to copy sample_principles.zcml to principals.zcml18:57
pcardunethen type make run18:57
jelknerwhat about the z3.py problem?18:58
pcardunedo you have z3.py in your Zope3 folder? (you should already)18:58
jelkneryes18:58
jelknerbut runzope can't find it18:58
jelknerdo i need to make an instance or something?18:59
pcarduneright... dont run runzope from the bin directory18:59
pcardunerun it from the root Zope3 directory18:59
pcarduneso, run bin/runzope18:59
pcardunenot ./runzope18:59
jelknercp sample_principals.zcml principals.zcml19:00
jelkner./bin/runzope19:00
flintpaul, what is the default port that zope runs on?19:00
jelknerwaiting for zope to start....19:00
pcarduneflint: 808019:01
flintpcardune, that is what i thought...19:01
jelknersuccess!19:02
srichteryipee!19:02
pcarduneok, now you can log in and look around Zope3 if you want19:02
pcardunegandalf, 123 is the manager, password by default19:02
jelknerlog in with?19:02
flintjelkner, what url are you on?19:02
jelknercando.yhspatriot.net:808019:03
jelknerwhat is the user name?19:03
pcardunegandalf19:03
jelknerflint: you need your own instance19:03
pcarduneyou can change it by editing principals.zcml if you want19:03
jelknerwe can't both develop on the same instance at the same time19:03
jelkneri'm in, but there isn't much here19:04
jelkneroh, wait, clickin on [top] shows a bunch19:04
jelknerhow can i change the manager account?19:05
srichterprincipals.zcml19:05
pcardunedon't worry about that for now19:06
jelknerwhy not?19:06
pcardunebecause we aren't going to be using the ZMI or the zope server for a while19:06
*** Aiste has joined #schooltool19:06
jelknerok19:06
jelknershould i stop the instance then?19:06
pcardunewe first have to write interfaces, and implementations and tests... and eventually get to browser related stuff19:06
pcardunejelkner: yes19:07
jelknerok19:07
jelknerdone19:07
jelknerso, where do we begin now?19:07
pcardunewell, first we have to create a package19:07
jelknerok19:07
flintI get connection refused when attempting cando.yhspatriot.net:808019:07
jelkneri stopped it19:08
flintbad man...:^)19:08
jelknerpaul just told me too19:08
jelknerread, flint! ;-)19:08
pcarduneadd a folder to Zope3/src/19:08
jelknernamed TimeClock ?19:08
pcardunewe want to follow the naming convention19:09
pcarduneand use lowercase for package names19:09
jelknertimeclock19:09
jelkner?19:09
pcarduneyeah19:09
srichterwhat will timeclock do?19:09
jelknersrichter: glad you asked19:09
pcardunesrichter: keep track of the hours people work when they're working for elkner19:09
jelknerit is a work flow application19:09
jelknerfolks working on cando will use it to "clock-in" and "clock-out"19:10
jelknerthen dwelsh and i will be able to approve their hours19:10
jelknerthen it will generate an invoice to arlington schools (kris martini)19:10
jelknerthen developers get paid!19:11
flintalways a feature...19:11
jelknersrichter: pcardune already told me it involves things he doesn't understand yet19:11
flintpcardune, you have time clock as an external (keep in mind I think in zope 2 :^)19:12
jelknerso your help will be *greatly* appreciated19:12
pcardunejelkner: i just have to read the chapter on workflows19:12
pcarduneand that wont come till much later19:12
jelkneri want to develop it step by step here, so we get a simple tutorial out of it at the same time19:12
pcardunewe should really get to work on writing an interface or two now19:12
jelkneri'll write it up as we go, so others can use this to learn zope319:12
jelknerok timeclock exists, now what?19:13
pcarduneok, how much of zope component architecture do you know?19:14
srichtercool19:14
jelknernone19:14
pcardunei'd rather you have a conceptual understanding of this rather than just a recipe based one19:14
jelknerwe are starting from scratch19:14
srichterI would not use workflows for the first iteration :-)19:14
jelknerno19:14
srichterthey would make the app a bit harder than necessary for now19:14
pcardunesrichter: oh yeah, as i said, that will come much later19:15
jelkneruser story one: user can log in to the time clock19:15
pcarduneno no19:15
pcardunethat's to much19:15
jelknerno?19:15
pcarduneuser story one: I want a object to represent one piece of a persons record19:15
jelknerwell, from the customer point of view, if we can't log in, we can't do anything else19:15
srichterI agree with Paul :-)19:16
jelknerthat's not a user story19:16
pcardunewell, if you can login, and then there is nothing, then you can do nothing... you can't even do anything at a python prompt ;)19:16
jelkneruser's don't know about objects19:16
srichterwell, but that's the problem with user storied19:16
jelknerit could tell me, "welcome to timeclock"19:16
srichterthey don't allow you to think API :-)19:17
srichterfirst story: Create19:17
srichterfirst story: Create a Person to be clocked19:17
jelknerok19:17
jelknerlet's do that19:17
pcardunewe should just reuse schooltool Person object ;)19:18
pcarduneok, so... first thing... all zope objects have interfaces19:18
pcarduneeverything in zope deals with interfaces, i can't stress this enough19:18
jelknerwe want this to be as simple as possible19:18
jelknerand just what is an interface in zope3 terms?19:18
pcarduneinterfaces make things simple because they tell you what an object is supposed to do, without worrying about implementation19:19
jelknerare they like java interfaces?19:19
pcarduneon some level yes19:19
jelknera "contract" that a class must deliver19:19
pcarduneprecisely19:19
jelknerok, i'm good with that19:20
pcardunealthough java interfaces can define variables that all object instances can access but not change.  you dont do that with zope interfaces19:20
jelkneryes, python is much more permissive, i get that19:20
pcarduneso, when we create an object, the first thing we want to do is define it's contract, what it can do19:21
jelknerthis will be just use an honor system19:21
jelknerso that the tests can tell you if you are being good or not, yes?19:21
pcarduneyeah19:21
flintok my copy of zope 3 is at http://64.5.53.104:8080/19:21
jelknerflint: we won't actually need that for a while19:22
pcardunewe also want to make interfaces minimalistic, we don't want to include superfluous methods, only ones that are integral to the nature of the object we create19:22
flintjelkner, this is a class remember, i cannot look at your copy and cannot participate.19:22
jelkneryou should shell into the directory and create a timeclock directory19:22
jelknerthat's where we are now19:22
jelknerwe haven't done anything yet19:22
pcarduneso, a gradebook interface, wouldn't include methods for looking at grade statistics, as that is not an integral part of what a gradebook *is*19:23
jelknerso you haven't missed anything19:23
flintok, my instance is at /home/zope19:23
flintis that ok paul?19:23
pcarduneflint: sure19:23
jelknermkdir /home/zope/src/timeclock19:23
jelkneryes?19:23
pcarduneyes19:23
pcardunealso touch /home/zope/src/timeclock/__init.py__ to make it a python module19:24
pcarduneok, so lets make an interface19:24
pcarduneall interfaces go into the interfaces.py file19:24
flintwhat do I put in  /home/zope/src/timeclock?19:24
pcardune*always*19:24
jelknere also touch /home/zope/src/timeclock/__init.py__ to make it a python module19:24
jelkneris there only one interfaces.py file?19:25
pcarduneone per module, yes19:25
jelknerand what is a module19:25
jelkner?19:25
pcardunemodule/package19:25
pcardunei should say package, they are packages19:26
jelknerso, timeclock is a module/package?19:26
pcarduneyes19:26
flintok, /home/zope/src/timeclock/__init.py__ is an empty module eh19:26
jelknerso interfaces.py will go in timeclock19:26
pcardunecorrect19:26
jelknerflint: yes19:26
pcarduneif you look at schooltool, there it is made up of lots of packages, so they don't have an interfaces.py in the root folder.  our application is small enough that it doesn't matter19:26
pcarduneat least at this point19:27
jelknerok19:27
flintdid I mention elkner that you are a gifted teacher but a terrible student?  pcardune have i missed any steps so far?19:27
*** tiredbones has quit IRC19:27
pcarduneflint: nope, just read what's been written so you know whats going on as far as component architecture is concerned19:27
flintpcardune, gotcha...19:28
jelknerso, we are editing interfaces.py...19:28
pcarduneok, so in interfaces.py create a class named IPerson19:28
pcardunethe naming convention for interfaces is to always have an I at the beginning19:28
pcarduneall class definitions are camel case with a capital first letter19:29
pcarduneyou also want to import zope.interface19:29
pcarduneor, from zope.interface import Interface19:29
jelknerwhich one?19:30
flintpaul, the only file I have created is __init.py__  should I have an interfaces.py as well?19:30
pcardunewell, either way, it just means your interface will inherit from zope.interface.Interface, or just Interface19:30
jelknerif it is all the same to you, let's import zope.interface19:30
jelknerthat will make it clearer19:30
pcarduneok, that is more explicit anyways19:30
pcarduneflint: yes, create interfaces.py19:31
pcarduneflint: put at the top "import zope.interface"19:31
jelknerflint: edit interface.py19:31
pcarduneinterfaces.py not interface.py19:31
jelknerthen put (after a blank line):19:31
jelknerclass IPerson:19:31
pcarduneIPerson must inherit from zope.interface.Interfaces19:31
jelknerahh19:31
jelknerso:19:32
jelknerclass IPerson(zope.interface.Interfaces):19:32
pcarduneyou also want to include docstrings for everything19:33
pcardunethis is also convention, but a strict one you *must* follow19:33
pcarduneyou lose 1% off your final grade for every missing docstring19:33
pcardune;)19:33
pcardunei'm wondering if we should use gobby19:34
pcarduneso i can show you better the writing conventions19:34
pcardunewithout typing them all out on #schooltool19:34
jelknernext week, yes19:34
pcarduneok19:34
jelknerone thing about that pcardune19:34
jelkneron #schooltool we get a log19:35
jelknerthat i can find later (we all can)19:35
jelkneri can use that to develop this into a tutorial19:35
jelknerso we want everything here19:35
pcardunewell, I would explain everything here, but for illustrative purposes, gobby lends itself better for multiline strings19:35
jelknertrue19:35
pcarduneso, for class docstrings, you always start with triple single quotes19:36
pcarduneand on sentance describing whatever it is you are documenting19:36
jelknerclass IPerson(zope.interface.Interfaces):19:36
jelkner    """19:36
jelkner    """19:36
flintjelkner, do me a favor, cut and paste what is in your interfaces.py by now...19:36
pcarduneso, for IPerson it might be '''A Person that in the timeclock application.'''19:36
jelknerflint: i just did19:37
pcarduneyou can also include longer explanations below this first sentance with one space in between19:37
jelknerexcept for the import line at the top19:37
jelknerquestion: flint, are you using vim?19:38
flintjelkner, I did not see it.  I am using vi, maybe vim remapped...19:38
jelkneryes19:38
jelknerok, make this your .vimrc file:19:38
flinthang on letme switch...19:38
jelkner" .vimrc19:38
jelkner"19:38
jelkner" Created by Jeff Elkner 23 January 200619:38
jelkner" Last modified 2 February 200619:38
jelkner"19:38
jelkner" Turn on syntax highlighting and autoindenting19:38
jelknersyntax enable19:38
jelknerfiletype indent on19:38
jelkner" set autoindent width to 4 spaces (see19:38
jelkner" http://www.vim.org/tips/tip.php?tip_id=83)19:39
jelknerset et19:39
jelknerset sw=419:39
jelknerset smarttab19:39
jelkner" Bind <f2> key to running the python interpreter on the currently active19:39
jelkner" file.  (curtessy of Steve Howell from email dated 1 Feb 2006).19:39
jelkner" Note <f1> is bound to the gnome help system, so Steve's orginal <f1> binding19:39
jelkner" won't work.19:39
jelknermap <f2> :w\|!python %<cr>19:39
jelkneryou will now get color syntax highlighting, auto indenting, and <f2> to shell out to python and run your script19:39
jelknernote: kjcole get me documenting these things properly ;-)19:40
pcardunetell me when you guys are ready to continue19:40
jelkneri'm ready19:40
pcarduneso , now we have to decide what a Person is19:41
pcardunewhat kind of things do we want a person to have19:41
jelknername19:41
jelkneruserid19:41
jelknerpassword19:41
jelknerpayrate19:42
jelkneraddress19:42
jelknerphone number19:42
jelkneremail19:42
jelknerssn19:42
*** Aiste has joined #schooltool19:43
flintjelkner, i changed your quotes to hashes will that work?19:43
jelknerflint: i don't know19:43
jelknerpcardune: i think that's all to start19:43
pcarduneok, well, let me comment on that a bit19:43
jelknerplease!19:43
pcarduneyou want to be considered a person for timeclock... but you aren't going to have a payrate19:44
pcarduneso, payrate doesn't define a person19:44
jelknerwe will have different roles19:44
jelknerso we want to start with the most general, "mother of all persons" class?19:45
jelkneris that where you are going?19:45
pcarduneright19:45
jelknerok19:45
jelknername19:45
jelkneruserid19:45
pcardunewhich means, we aren't necessarily going to have address, phone number, etc19:45
jelknerpassword19:45
pcardunejust name and userid19:45
jelknerand password19:45
pcardunepassword is also going to be handled internally within zope19:45
jelknerquestion: if we wanted email to be a requirement, would be add that field here too?19:46
jelkneri don't want anyone to use the system whom i have no way of contacting19:46
jelknerso a valid email is a requirement...19:46
jelknerwhat do you think?19:47
pcardunejelkner: well, that is arguable, but alright19:47
pcardunewe can always refactor later :)19:47
jelknerand we will! ;-)19:47
jelknerso: name userid email19:48
pcardunein schooltool, they have a separate object for handling additional personal information about a person that uses annotations19:48
pcardunejelkner: perfect19:48
jelknerwe've only got 12 minutes...19:48
flintpcardune, in fact the username IS the email19:48
pcarduneok, we'll just write this interface then19:48
jelknerahh19:48
jelknerthat's a great idea19:48
pcardunei'm not entirely sure you can have @ for zope usernames19:49
jelknerok, let's check that later19:49
flintgod help us...  what are the consequences of the @?19:49
jelknerfor now: name userid email19:49
jelknerhow do we put that in the interface?19:49
pcardune@@ is a namespace for views... so putting @@ in a zope3 url performs a view lookup... in any case, there may be consequences19:50
flintif the @ causes trouble in the email field will it need quoting?19:50
pcardunewell, we will start write away by using schema fields19:50
pcarduneflint: lets not worry about that now, we aren't doing implementation yet19:50
jelknergo for it19:50
pcarduneimport zope.schema19:50
flintpcardune, hey I am just tickled to get elkners .vimrc...19:50
flintin the interfaces.py file right?19:51
pcarduneyes19:51
jelknerso start with:19:51
pcarduneso, schemas are the attribute part of a contract, and interfaces are the method part of the contract19:51
jelknerimport zope.interface, zope.schema19:51
pcarduneanother convention, don't use ',' in imports, always have separate lines19:52
jelknerok19:52
jelknerimport zope.interface19:52
jelknerimport zope.schema19:52
pcarduneschemas allow us to define attributes of a class, including what kind of information they store, whether it is numerical, or string, it's kind of like setting a type in java19:52
pcarduneexcept we can also attach documentation to each attribute19:53
flintwill this be included on the final? :^) btw this is good stuff!!!19:53
pcardunepg 54 of stephans zope book gives a pretty good overview of that19:53
pcarduneso, a username is going to be a simple string19:54
jelknerthat sounds like a homework assignment, good19:54
flintpage begins with "Jim Fulton"19:54
pcarduneso we define that in the schema like this:19:54
jelknerpcardune: question - is the "schema" the interface?19:54
*** kjcole has quit IRC19:54
pcarduneusername = zope.schema.Text(19:55
pcardune    title=u"some title",19:55
pcardune    description=u"some description",19:55
pcardune    required=True)19:55
jelknerwhere?19:55
pcardunethat goes in the interface19:55
pcarduneso, schemas and interfaces are conceptually different things, but look exactly the same in code19:56
pcarduneand are in fact midex in the code19:56
jelknerok, paul, with 3 minutes left, let's sum up19:57
pcarduneyou wont define an IPersonInterface and IPersonSchema, both the methods of the interface, and the attributes of the schema go into IPerson... which is then both an interface and a schema19:57
jelknerthe interfaces.py file so far:19:57
jelknerimport zope.interface19:57
jelknerimport zope.schema19:57
jelknerclass IPerson(zope.interface.Interfaces):19:57
jelkner    """19:57
jelkner    """19:57
jelkner    username = zope.schema.Text(19:57
jelkner            title=u"some title"19:57
jelkner            description=u"some description"19:57
jelkner            required=True)19:57
jelkneris that correct?19:57
pcarduneyes, but dont forget to put in a docstring for the class, and replace the some title and some description with something better ;)19:58
jelknerthere is a docstring19:58
pcarduneI'm going to give you homework for next time if that is alright19:58
jelknerit is empty19:58
jelkneryes19:58
pcardunewell, write something in the docstring ;)19:58
jelknerlike?19:58
jelknernever mind, i'll figure that out by looking at other examples19:59
jelknerwe can talk about that next time19:59
pcardunelike "A Person in timeclock."19:59
jelknercan we meet next week at the same time?19:59
pcardunesure19:59
jelknersunday at 11 est then19:59
jelknerthanks a 10**6 pcardune!19:59
pcarduneok, so your "Reading assignment" and i assume you all have stephan's book, or can look at it online...19:59
jelkneri have it20:00
jelknerso does flint20:00
pcarduneread chapter 820:00
jelknerwill do20:00
flintok, i get about twenty percent of this....20:00
jelknerand me and my study buddy (flint) will check in with each other during the week ;-)20:00
pcarduneto page 5820:00
jelknerflint: that's why you have a study buddy20:00
jelkneri've got to run20:01
pcardunewell, actually, read the whole thing20:01
pcarduneso, read chapter 820:01
jelknerwe will read the whole thing20:01
flintjelkner, you are a sick monkey...20:01
pcardunethat's it20:01
jelknercool20:01
jelknercya20:01
flintpcardune, thanks paul... will read chapter 8 and wonder.20:01
jelknerand thanks again!20:01
flintsksk20:01
pcarduneand chapter 9 :)20:01
pcarduneor just glance at chapter 920:01
flintpcardune, and chapter 920:01
jelknerone chapter for a week is enought20:02
pcardunei know you are busy people20:02
jelknerwe need to take this slow20:02
flintpcardune, I will look at the pictures...20:02
jelknerlol20:02
pcarduneit's 3 pages20:02
pcarduneand there are no pictures20:02
flinthey I had a copy of zope up! I just forgot where.20:02
jelknerok, folks cya next week...20:02
*** jelkner has quit IRC20:02
pcardunecya on tuesday20:02
flintsksk20:02
*** flint has left #schooltool20:02
*** pcardune has quit IRC20:58
*** jinty has joined #schooltool23:27

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