IRC log of #schooltool for Saturday, 2007-06-23

*** gpaci has quit IRC00:36
*** gpaci has joined #schooltool00:37
*** pcardune has quit IRC01:41
*** gpaci has quit IRC01:50
*** didymo has joined #schooltool02:29
*** pcardune has joined #schooltool02:47
*** jinty has quit IRC04:02
*** tehminkeh has joined #schooltool07:56
*** tehminkeh has left #schooltool08:40
*** pcardune has quit IRC08:54
*** jfroche has quit IRC10:51
*** Ninno has joined #schooltool11:08
*** Ninno has quit IRC11:36
*** jfroche has joined #schooltool12:12
*** jinty has joined #schooltool13:44
*** didymo has quit IRC14:43
*** ignas has joined #schooltool15:40
*** jinty has quit IRC15:59
*** jinty has joined #schooltool16:04
*** jinty has quit IRC16:28
*** wjohnsto has joined #schooltool16:43
*** gpaci has joined #schooltool16:47
*** Ninno has joined #schooltool17:10
*** ignas has quit IRC17:31
*** smalekgh has joined #schooltool17:36
*** lisppaste5 has quit IRC17:53
*** lisppaste5 has joined #schooltool17:59
smalekghexcuse me, but is anyone here willing to answer a question about scripting style in .pts?18:03
*** jinty has joined #schooltool18:13
*** pcardune has joined #schooltool18:14
*** AVN` has joined #schooltool18:17
AVN`So... anyone have a job I  can work on?18:30
smalekghare you willing to answer a question I have?18:31
*** wjohnsto has quit IRC18:31
*** wjohnsto has joined #schooltool18:32
smalekghActually, wait a minute, this is IRC! Public question: When working with an input tag, how does one take the input text and pass that to a python method?18:32
wjohnstowell18:37
wjohnstoare you talking about a page template or a python file?18:38
wjohnstosmalekgh: ping18:38
smalekghback18:41
smalekghsorry, I was away18:41
smalekghI'm talking about a page template18:42
smalekghlisppaste5: url18:42
lisppaste5To use the lisppaste bot, visit http://paste.lisp.org/new/schooltool and enter your paste.18:42
lisppaste5smalekgh pasted ".pt attempt at passing string to function" at http://paste.lisp.org/display/4330218:43
smalekghthis is currently what we're trying >_<18:43
*** AVN` has quit IRC18:50
pcardunesmalekgh: the input string gets passed to your view class when the form is submitted18:55
pcarduneit gets passed in the request18:55
pcarduneso to get it in your view class you would say, self.request.get('coursName') (there's a typo)18:55
smalekghright18:55
smalekghas in zcontact... okay18:55
smalekghdo I put that in the __init__ method?18:55
smalekghof the view class I mean18:55
pcarduneif you want18:57
pcardunethat is one way to do it18:57
smalekghooo, what are the other ways?18:57
pcarduneyou might put it in a method called "update" which you call at the top of your page template file18:58
pcarduneor you might use formlib18:58
pcardune(which is a much longer explanation)18:58
smalekgher, okay, thanks18:59
pcardunejust make sure you have an if statement to check whether the user actually pressed the button they were supposed to for submitting the data19:00
smalekghgotsit19:00
*** mgedmin has joined #schooltool19:06
smalekghwhat was that method that got the schooltool application? getSchoolToolApplication() ?19:21
smalekghactually, wait, change that question >_< Where's it located?19:22
mgedminsmalekgh: you can use app = ISchoolToolApplication(None)19:26
mgedmingetSchoolToolApplication is registered as an adapter for * that provides ISchoolToolApplication19:26
smalekghoye, but from where would I import that?19:27
mgedminfrom schooltool.app.interfaces, I think19:27
smalekghthank you19:27
mgedminI always build a tags file with exuberant ctags so I won't have to remember where things are defined19:27
mgedmintags totally rule when your editor supports them (vim does ;)19:27
smalekghaye19:28
*** jfroche has quit IRC19:28
*** mlinnell has joined #schooltool19:29
wjohnstopcardune: ayt?19:41
wjohnstowait I might have solved my problem19:42
lisppaste5smalekgh pasted "What do the line numbers mean?" at http://paste.lisp.org/display/4330519:50
smalekgh*points to question in the title of the paste*19:50
wjohnstoI don't think it matters19:51
wjohnstoif you look up in the error19:51
wjohnstoit should show you some code that you might recognize19:52
smalekghuh, putty cuts off a lot of the code19:52
wjohnstoyou don't have it so you can scroll up?19:52
smalekghI do, but it- oh wait, those are errors from a previous run... nevermind, it didn't cut off everything19:53
wjohnstodo you use windows?19:53
smalekghlast time I tried to install linux, my computer died >_< so I guess that means I do <_< I'll install linux tonight if I can grab another ubuntu cd19:54
wjohnstoif you're ssh'ing there's a cool client for windows called WinSCP19:54
smalekghI'll look it up19:54
wjohnstohttp://www.cs.csustan.edu/resources_files/WinSCPDownload-frame.htm19:54
wjohnstoit's really handy19:54
smalekghthanks19:55
wjohnstoand you can call a putty terminal from the GUI if you need19:55
wjohnstoas long as you specify the path of the PuTTY program19:55
*** cpcarey has joined #schooltool19:56
mlinnellcpcarey: hello19:56
cpcareymlinnell: hi, who else is here?19:57
pcardunesmalekgh: you should use nxclient19:57
cpcareymlinnell, i'm in #stAgent now19:57
mlinnellcpcarey: well, no one19:57
mlinnellk19:57
pcardunesmalekgh: http://www.nomachine.com/download-client-windows.php19:58
smalekghwow, suggestions keep popping up...19:58
smalekghthanks19:58
pcardunesmalekgh: that will let you use maddog as if it were running on your local machine with a desktop and everything19:58
wjohnstonxclient is really nice19:59
wjohnstobut I think WinSCP is cooler :819:59
smalekgh>_< lawls19:59
wjohnstopcardune: I am having trouble with my __init__() method for sepg20:00
pcardunewjohnsto: what's the trouble?20:00
wjohnstoI keep getting an error "__init__() takes exactly 1 argument, 2 given"20:00
wjohnstowhen I try to say  "obj = Division(division)20:01
wjohnsto"20:01
smalekghdidja forget to add a self argument20:01
smalekgh?20:01
wjohnstonope20:01
wjohnstoI have 2 arguments20:01
wjohnstoself, title=''20:01
wjohnstomaybe it's an inheritance problem20:01
wjohnstoand I'm not actually looking at the correct init method20:02
pcardunewjohnsto: it's hard to say without looking at your code20:02
pcarduneI have to go to the grocery store20:02
pcarduneso i'll be back in a whiel20:02
wjohnstook20:02
wjohnstoconvenient20:02
wjohnsto:-P20:03
wjohnstoI'll keep working and see if I can figure it out20:03
pcardunei'm sure you will figure it out20:03
*** pcardune is now known as pcardune_away20:03
*** eX|deathomen has joined #schooltool20:05
*** wjohnsto has quit IRC20:05
*** eX|deathomen is now known as wjohnsto20:05
wjohnstothis is very annoying20:13
*** mgedmin has quit IRC20:18
smalekghhow do zope.annotation.factory.factory methods work?20:22
wjohnstohold on20:25
lisppaste5wjohnsto pasted "factory" at http://paste.lisp.org/display/4331020:26
wjohnstothere's the definition20:26
smalekghack...20:26
wjohnstoI can try to interpret20:26
smalekghnot really... I just need to know how its return value works...20:27
smalekghwhich is a function object...20:27
smalekghoh, cool20:27
smalekghnevermind, got it20:27
lisppaste5smalekgh pasted "Server Error numero 1 billion and 12" at http://paste.lisp.org/display/4331120:30
smalekghwhat generally causes something to be unable to adapt another thing?20:31
wjohnstowhat is the file that you are editing?20:33
wjohnsto../could you list it, maybe I can help if I see it, who knows20:33
smalekghlist it, meaning? lisppaste the file in question?20:33
wjohnstowait20:34
wjohnstoyes20:34
wjohnstobut I think I can find it20:34
smalekghinside of jama's directory on maddog >_<20:34
smalekghthanks by the by20:35
wjohnstowhat's the file called?20:36
smalekghscheduleviews.py20:36
wjohnstohmm20:40
smalekghis that good or bad?20:40
wjohnstowell20:41
wjohnstoI can't connect your error with anything in the file20:41
smalekghack20:41
smalekghfactory methods create the annotation if it doesn't already exist, right?20:42
wjohnstoapparently not20:43
wjohnsto:-P20:43
smalekghbutbutbutbutbutbutbutbut...20:43
smalekgh>_< they hafta cause' that's what the traversers call >_<20:44
wjohnstoI'm sure they do20:45
wjohnstothere's probably simple error20:45
wjohnstobut I am bad with simple things20:45
smalekghhurray, time to do some soul-searching, er, code searching...20:45
wjohnstoI would try backtracking a little20:47
smalekghWell, I just saw the page work when there were NO courses, so I know it has to be something with the adapters, purely...20:47
wjohnstowell it looks like there is a problem with getCourseAbleToBeTaken(self, course)20:48
smalekghyeppers20:48
wjohnstoand specifically crs20:48
smalekghyep...20:48
smalekghthe error did show, however, that an actual course object was passed...20:49
smalekghbecause otaku was the name of a course...20:49
smalekghI hope20:49
wjohnstootaku!?20:49
wjohnstohaha20:49
smalekgherrr <_< talk to jama about that20:49
smalekghhis idea20:49
wjohnstowhere is getCourseRequirements()?20:50
smalekghcourserequirements.py20:50
wjohnstooh I see20:50
smalekghit's the return of factory(CourseRequirements, 'courserequirements')20:50
wjohnstoso when you pass it "crs"20:52
smalekghit goes 'creeeaaaaakkkkk'20:52
smalekghI musta done something wrong in my configure...20:53
wjohnstowhere is the file where you're reading from to input the classes?20:56
smalekghscheduleedit.pt20:57
smalekghcourses do implement annotatable, right?20:57
smalekghyes, nvm, they do...20:57
wjohnstoyeah20:58
wjohnstowhat I'm saying is, where is u'otaku' coming from?20:58
smalekghit was the name of a course20:58
smalekghThis is when I wish I had a magical wand >_<21:02
* wjohnsto wishes he knew zope21:04
wjohnstoI have traced it down to the very definition you're looking at21:05
wjohnstobut I can't make sense of it21:05
smalekghah well, thanks21:06
wjohnstotraverser.AdapterTraverserPlugin('courserequirements', interfaces.ICourseRequirements)21:06
smalekgh... that wasn't part of the trace, was it?21:06
wjohnstono21:06
smalekgh*whew*21:07
wjohnstoso CourseRequirements is the "factory"?21:09
wjohnstoand 'courserequirements' is the key?21:09
smalekghvia the __init__21:09
smalekghand yeppers21:10
wjohnstowell21:10
wjohnstoactually nvm21:10
wjohnstoI would say just try it without a key, because factory has it's own key generator21:11
wjohnstobut I don't think that's the problem21:11
smalekghTypeError: ('Could not adapt', u'programming', <InterfaceClass zope.annotation.interfaces.IAnnotations>) ... <-- hmmmm...21:11
wjohnstowhat was that?21:12
wjohnstojust another course?21:12
wjohnstoor did you change something?21:12
smalekghyep21:12
smalekghit's just another course21:12
smalekghI removed otaku, and tried it21:12
wjohnstowell at least it's consistent21:12
smalekghit worked just fine, because there was no casting21:12
smalekghoh, well, I gotta eat lunch apparently..21:12
wjohnstommk21:13
*** smalekgh is now known as Masood[A]21:13
* Masood[A] is now away - Reason : lunch21:13
*** wjohnsto has quit IRC21:14
*** Masood_ has joined #schooltool21:26
Masood_back21:31
*** Masood_ is now known as smalekgh21:31
smalekghUhh, paul isn't back yet... darn21:32
*** jinty has quit IRC21:37
smalekghhow does one go about checking *your* running processes on maddog?21:37
smalekghbecause apparently I started cando/schooltool, and then I lost connection, and now I don't know how to kill it >_<21:38
smalekghnevermind...21:43
*** Masood[A] has quit IRC21:44
*** wdickers has joined #schooltool21:44
mlinnellwdickers: hello!21:44
wdickershello21:45
mlinnellwdickers: join #stagent21:45
*** pcardune_away has quit IRC21:46
*** pcardune_away has joined #schooltool21:53
smalekghhiya paul21:54
pcardune_awaysmalekgh: ps aux | grep schooltool-server21:55
smalekghoye, I figured it out already >_<21:55
smalekghI just killed all of the other non-connected SSH terminals21:55
pcardune_awayah21:57
smalekghanyways, I have a question21:57
smalekgher, a few questions21:57
smalekghin general, when a TypeError occurs, where something could not adapt another thing, that's basically saying that the adapter isn't configured right, right?21:58
smalekghIf something implements IAttributeAnnotatable, it means it can be cast to an IAnnotations, right?22:29
smalekghAnd Course implements it, but apparently, it cannot be cast to an IAnnotations...22:30
*** ignas has joined #schooltool22:32
*** wdickers has quit IRC22:40
*** mlinnell has quit IRC22:43
*** cpcarey has quit IRC23:01
*** pcardune_away is now known as pcardune23:15
pcardunesmalekgh: you should use PersistentList instead of []23:16
gpacipcardune!23:17
smalekghhe's alive!23:17
gpaciIn Thailand?23:17
pcardunenot anymore23:17
gpaciSunburn?23:18
pcarduneit only pealed a bit23:18
smalekghPersistentList is in zope.persistence.PersistentList, right?23:21
pcardunenope23:21
smalekghcrud23:21
pcardunesmalekgh: you should really install etags23:21
pcarduneapt-get install etags23:21
smalekgh*points to windows machine*23:21
pcardune*ouch*23:21
pcarduneit is in persistent23:22
pcardunefrom persistent.list import PersistentList23:22
smalekghthanks23:22
smalekghTypeError: ('Could not adapt', u'programming', <InterfaceClass zope.annotation.interfaces.IAnnotations>)23:24
pcardunethat is because you are trying to adapt a string23:25
pcarduneyou can never adapt a string, only objects23:25
smalekghoof23:25
smalekghthanks23:25
smalekghI could have sworn I got the actual course out of it tho23:25
smalekghwait a minute... I am...23:26
smalekghlisppaste5:url23:27
lisppaste5To use the lisppaste bot, visit http://paste.lisp.org/new/schooltool and enter your paste.23:27
lisppaste5smalekgh pasted "My view-class + calls" at http://paste.lisp.org/display/4331723:27
smalekghIn ScheduleEdit, I have a call to getCourseRequirements23:28
smalekghin getCourseAbleToBeTaken23:28
smalekghunless I'm doing this entire thing based off of a false premise (which I think I could be...) that should be a course... Uh, when you ask the application to do something like app['courses'], it returns a list of COURSES, right? Not names?23:29
* pcardune reading23:30
pcarduneit does not return a list nor a list of names23:31
pcardunesmalekgh: it returns a dictionary-like object23:31
pcardunetry this in python:23:31
pcarduned={1:'a',2,'b'}; for x in d: print x23:32
pcardunealso, what is the deal with the __cmp__?23:32
pcardunein general you shouldn't have to do that...23:32
smalekghoh23:32
smalekghI didn't think it was a dict23:33
smalekghthat's why I used cmp23:33
smalekghI thought it was a list >_<23:33
smalekghbut uh, if you mean __cmp__ as opposed to 'is' or something along those lines, then, I don't know >_<23:34
pcardunemaybe you mean: if course.title == coursename?23:34
smalekghhooray overloaded operators <_<23:35
pcardunesmalekgh: and also if you are having to search for the right object every time you do something to it, you might not want to store the objects in a list23:35
pcardunebut rather a dictionary23:35
pcardunein which case you would use persistent.dict.PersistentDict23:36
smalekghright...23:36
* smalekgh kicks himself in the face23:36
pcardunesmalekgh: don't worry.  It's not your fault you learned java first ;)23:37
smalekghActually I learned C++ first >_< but then Java was forced down my throat for 2 years23:38
smalekghthen again, they're pretty much the same thing...23:40
pcarduneyeah, I'll admit to learning logo, true basic (random?), and C++ before I learned Python... and I was *very* skeptical of python at first too23:41
smalekghit seemed too freeform?23:41
pcarduneit didn't seem hard enough23:42
smalekghfor me it was more like sonnets to free-verse23:42
smalekghactually, change 'was' to 'is'23:42
pcardunesmalekgh: you want to see my continuation of the zcontact application?23:42
smalekgher, sure I guess23:43
ignasi found it quite easy to transfer to python23:43
ignasand the motivation was sound ;)23:43
smalekgh>_<23:43
pcardunehttp://maddog.yhspatriot.net:8122/zcontact23:43
ignaslearn python - get a job23:43
pcarduneignas: what happened to learn java - get a job?23:43
pcardune(that's why I still haven't learned lisp)23:43
smalekghholy shiznatch23:44
smalekghso green and black and hackish23:44
ignaspcardune: hmm, no idea, i had to learn php to get my first job, and had to learn python to get the second one23:44
pcardunethank god for you second job eh?23:44
ignasthe improvement in coworkers was higher than the improvement in languages used ;)23:44
ignasso - yes, thank god23:44
pcardune*sting*23:45
smalekgh?23:45
ignasand you know - languages they used were VB6, java and php23:45
* pcardune runs away23:46
smalekghhave you ever looked at a word for such a long time, that eventually it seems foreign? ex: the word schedule now looks like its german to me...23:49
pcarduneyes, I have done that before... with the word schedule no less23:50
lisppaste5smalekgh pasted "AHHH!!!" at http://paste.lisp.org/display/4332023:52
smalekgh... I just got the wierdest error, and I'm hoping to whatever the heck is up in the sky right now it isn't my code...23:52
smalekghwait a minute...23:52
smalekghpaul23:52
smalekghyou're using jama's port23:52
smalekghI can't run my thing >_<23:52
pcardunesmalekgh: oh sorry23:54
pcarduneyou can run it now23:54
smalekghyay! thanken!23:54
pcarduneI can't find the page with the ports on it23:54
pcarduneso i just started searching for an open one :)23:55
smalekgh<_<23:55
smalekghYAY!!! THANK YOU THANK YOU THANK YOU23:55
* smalekgh dances23:55
ignaspcardune: you could add some sane error message to schooltool-server23:59
ignasif port is already bound23:59
smalekghlol23:59

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