*** gpaci has quit IRC | 00:36 | |
*** gpaci has joined #schooltool | 00:37 | |
*** pcardune has quit IRC | 01:41 | |
*** gpaci has quit IRC | 01:50 | |
*** didymo has joined #schooltool | 02:29 | |
*** pcardune has joined #schooltool | 02:47 | |
*** jinty has quit IRC | 04:02 | |
*** tehminkeh has joined #schooltool | 07:56 | |
*** tehminkeh has left #schooltool | 08:40 | |
*** pcardune has quit IRC | 08:54 | |
*** jfroche has quit IRC | 10:51 | |
*** Ninno has joined #schooltool | 11:08 | |
*** Ninno has quit IRC | 11:36 | |
*** jfroche has joined #schooltool | 12:12 | |
*** jinty has joined #schooltool | 13:44 | |
*** didymo has quit IRC | 14:43 | |
*** ignas has joined #schooltool | 15:40 | |
*** jinty has quit IRC | 15:59 | |
*** jinty has joined #schooltool | 16:04 | |
*** jinty has quit IRC | 16:28 | |
*** wjohnsto has joined #schooltool | 16:43 | |
*** gpaci has joined #schooltool | 16:47 | |
*** Ninno has joined #schooltool | 17:10 | |
*** ignas has quit IRC | 17:31 | |
*** smalekgh has joined #schooltool | 17:36 | |
*** lisppaste5 has quit IRC | 17:53 | |
*** lisppaste5 has joined #schooltool | 17:59 | |
smalekgh | excuse me, but is anyone here willing to answer a question about scripting style in .pts? | 18:03 |
---|---|---|
*** jinty has joined #schooltool | 18:13 | |
*** pcardune has joined #schooltool | 18:14 | |
*** AVN` has joined #schooltool | 18:17 | |
AVN` | So... anyone have a job I can work on? | 18:30 |
smalekgh | are you willing to answer a question I have? | 18:31 |
*** wjohnsto has quit IRC | 18:31 | |
*** wjohnsto has joined #schooltool | 18:32 | |
smalekgh | Actually, 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 |
wjohnsto | well | 18:37 |
wjohnsto | are you talking about a page template or a python file? | 18:38 |
wjohnsto | smalekgh: ping | 18:38 |
smalekgh | back | 18:41 |
smalekgh | sorry, I was away | 18:41 |
smalekgh | I'm talking about a page template | 18:42 |
smalekgh | lisppaste5: url | 18:42 |
lisppaste5 | To use the lisppaste bot, visit http://paste.lisp.org/new/schooltool and enter your paste. | 18:42 |
lisppaste5 | smalekgh pasted ".pt attempt at passing string to function" at http://paste.lisp.org/display/43302 | 18:43 |
smalekgh | this is currently what we're trying >_< | 18:43 |
*** AVN` has quit IRC | 18:50 | |
pcardune | smalekgh: the input string gets passed to your view class when the form is submitted | 18:55 |
pcardune | it gets passed in the request | 18:55 |
pcardune | so to get it in your view class you would say, self.request.get('coursName') (there's a typo) | 18:55 |
smalekgh | right | 18:55 |
smalekgh | as in zcontact... okay | 18:55 |
smalekgh | do I put that in the __init__ method? | 18:55 |
smalekgh | of the view class I mean | 18:55 |
pcardune | if you want | 18:57 |
pcardune | that is one way to do it | 18:57 |
smalekgh | ooo, what are the other ways? | 18:57 |
pcardune | you might put it in a method called "update" which you call at the top of your page template file | 18:58 |
pcardune | or you might use formlib | 18:58 |
pcardune | (which is a much longer explanation) | 18:58 |
smalekgh | er, okay, thanks | 18:59 |
pcardune | just make sure you have an if statement to check whether the user actually pressed the button they were supposed to for submitting the data | 19:00 |
smalekgh | gotsit | 19:00 |
*** mgedmin has joined #schooltool | 19:06 | |
smalekgh | what was that method that got the schooltool application? getSchoolToolApplication() ? | 19:21 |
smalekgh | actually, wait, change that question >_< Where's it located? | 19:22 |
mgedmin | smalekgh: you can use app = ISchoolToolApplication(None) | 19:26 |
mgedmin | getSchoolToolApplication is registered as an adapter for * that provides ISchoolToolApplication | 19:26 |
smalekgh | oye, but from where would I import that? | 19:27 |
mgedmin | from schooltool.app.interfaces, I think | 19:27 |
smalekgh | thank you | 19:27 |
mgedmin | I always build a tags file with exuberant ctags so I won't have to remember where things are defined | 19:27 |
mgedmin | tags totally rule when your editor supports them (vim does ;) | 19:27 |
smalekgh | aye | 19:28 |
*** jfroche has quit IRC | 19:28 | |
*** mlinnell has joined #schooltool | 19:29 | |
wjohnsto | pcardune: ayt? | 19:41 |
wjohnsto | wait I might have solved my problem | 19:42 |
lisppaste5 | smalekgh pasted "What do the line numbers mean?" at http://paste.lisp.org/display/43305 | 19:50 |
smalekgh | *points to question in the title of the paste* | 19:50 |
wjohnsto | I don't think it matters | 19:51 |
wjohnsto | if you look up in the error | 19:51 |
wjohnsto | it should show you some code that you might recognize | 19:52 |
smalekgh | uh, putty cuts off a lot of the code | 19:52 |
wjohnsto | you don't have it so you can scroll up? | 19:52 |
smalekgh | I do, but it- oh wait, those are errors from a previous run... nevermind, it didn't cut off everything | 19:53 |
wjohnsto | do you use windows? | 19:53 |
smalekgh | last 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 cd | 19:54 |
wjohnsto | if you're ssh'ing there's a cool client for windows called WinSCP | 19:54 |
smalekgh | I'll look it up | 19:54 |
wjohnsto | http://www.cs.csustan.edu/resources_files/WinSCPDownload-frame.htm | 19:54 |
wjohnsto | it's really handy | 19:54 |
smalekgh | thanks | 19:55 |
wjohnsto | and you can call a putty terminal from the GUI if you need | 19:55 |
wjohnsto | as long as you specify the path of the PuTTY program | 19:55 |
*** cpcarey has joined #schooltool | 19:56 | |
mlinnell | cpcarey: hello | 19:56 |
cpcarey | mlinnell: hi, who else is here? | 19:57 |
pcardune | smalekgh: you should use nxclient | 19:57 |
cpcarey | mlinnell, i'm in #stAgent now | 19:57 |
mlinnell | cpcarey: well, no one | 19:57 |
mlinnell | k | 19:57 |
pcardune | smalekgh: http://www.nomachine.com/download-client-windows.php | 19:58 |
smalekgh | wow, suggestions keep popping up... | 19:58 |
smalekgh | thanks | 19:58 |
pcardune | smalekgh: that will let you use maddog as if it were running on your local machine with a desktop and everything | 19:58 |
wjohnsto | nxclient is really nice | 19:59 |
wjohnsto | but I think WinSCP is cooler :8 | 19:59 |
smalekgh | >_< lawls | 19:59 |
wjohnsto | pcardune: I am having trouble with my __init__() method for sepg | 20:00 |
pcardune | wjohnsto: what's the trouble? | 20:00 |
wjohnsto | I keep getting an error "__init__() takes exactly 1 argument, 2 given" | 20:00 |
wjohnsto | when I try to say "obj = Division(division) | 20:01 |
wjohnsto | " | 20:01 |
smalekgh | didja forget to add a self argument | 20:01 |
smalekgh | ? | 20:01 |
wjohnsto | nope | 20:01 |
wjohnsto | I have 2 arguments | 20:01 |
wjohnsto | self, title='' | 20:01 |
wjohnsto | maybe it's an inheritance problem | 20:01 |
wjohnsto | and I'm not actually looking at the correct init method | 20:02 |
pcardune | wjohnsto: it's hard to say without looking at your code | 20:02 |
pcardune | I have to go to the grocery store | 20:02 |
pcardune | so i'll be back in a whiel | 20:02 |
wjohnsto | ok | 20:02 |
wjohnsto | convenient | 20:02 |
wjohnsto | :-P | 20:03 |
wjohnsto | I'll keep working and see if I can figure it out | 20:03 |
pcardune | i'm sure you will figure it out | 20:03 |
*** pcardune is now known as pcardune_away | 20:03 | |
*** eX|deathomen has joined #schooltool | 20:05 | |
*** wjohnsto has quit IRC | 20:05 | |
*** eX|deathomen is now known as wjohnsto | 20:05 | |
wjohnsto | this is very annoying | 20:13 |
*** mgedmin has quit IRC | 20:18 | |
smalekgh | how do zope.annotation.factory.factory methods work? | 20:22 |
wjohnsto | hold on | 20:25 |
lisppaste5 | wjohnsto pasted "factory" at http://paste.lisp.org/display/43310 | 20:26 |
wjohnsto | there's the definition | 20:26 |
smalekgh | ack... | 20:26 |
wjohnsto | I can try to interpret | 20:26 |
smalekgh | not really... I just need to know how its return value works... | 20:27 |
smalekgh | which is a function object... | 20:27 |
smalekgh | oh, cool | 20:27 |
smalekgh | nevermind, got it | 20:27 |
lisppaste5 | smalekgh pasted "Server Error numero 1 billion and 12" at http://paste.lisp.org/display/43311 | 20:30 |
smalekgh | what generally causes something to be unable to adapt another thing? | 20:31 |
wjohnsto | what is the file that you are editing? | 20:33 |
wjohnsto | ../could you list it, maybe I can help if I see it, who knows | 20:33 |
smalekgh | list it, meaning? lisppaste the file in question? | 20:33 |
wjohnsto | wait | 20:34 |
wjohnsto | yes | 20:34 |
wjohnsto | but I think I can find it | 20:34 |
smalekgh | inside of jama's directory on maddog >_< | 20:34 |
smalekgh | thanks by the by | 20:35 |
wjohnsto | what's the file called? | 20:36 |
smalekgh | scheduleviews.py | 20:36 |
wjohnsto | hmm | 20:40 |
smalekgh | is that good or bad? | 20:40 |
wjohnsto | well | 20:41 |
wjohnsto | I can't connect your error with anything in the file | 20:41 |
smalekgh | ack | 20:41 |
smalekgh | factory methods create the annotation if it doesn't already exist, right? | 20:42 |
wjohnsto | apparently not | 20:43 |
wjohnsto | :-P | 20:43 |
smalekgh | butbutbutbutbutbutbutbut... | 20:43 |
smalekgh | >_< they hafta cause' that's what the traversers call >_< | 20:44 |
wjohnsto | I'm sure they do | 20:45 |
wjohnsto | there's probably simple error | 20:45 |
wjohnsto | but I am bad with simple things | 20:45 |
smalekgh | hurray, time to do some soul-searching, er, code searching... | 20:45 |
wjohnsto | I would try backtracking a little | 20:47 |
smalekgh | Well, 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 |
wjohnsto | well it looks like there is a problem with getCourseAbleToBeTaken(self, course) | 20:48 |
smalekgh | yeppers | 20:48 |
wjohnsto | and specifically crs | 20:48 |
smalekgh | yep... | 20:48 |
smalekgh | the error did show, however, that an actual course object was passed... | 20:49 |
smalekgh | because otaku was the name of a course... | 20:49 |
smalekgh | I hope | 20:49 |
wjohnsto | otaku!? | 20:49 |
wjohnsto | haha | 20:49 |
smalekgh | errr <_< talk to jama about that | 20:49 |
smalekgh | his idea | 20:49 |
wjohnsto | where is getCourseRequirements()? | 20:50 |
smalekgh | courserequirements.py | 20:50 |
wjohnsto | oh I see | 20:50 |
smalekgh | it's the return of factory(CourseRequirements, 'courserequirements') | 20:50 |
wjohnsto | so when you pass it "crs" | 20:52 |
smalekgh | it goes 'creeeaaaaakkkkk' | 20:52 |
smalekgh | I musta done something wrong in my configure... | 20:53 |
wjohnsto | where is the file where you're reading from to input the classes? | 20:56 |
smalekgh | scheduleedit.pt | 20:57 |
smalekgh | courses do implement annotatable, right? | 20:57 |
smalekgh | yes, nvm, they do... | 20:57 |
wjohnsto | yeah | 20:58 |
wjohnsto | what I'm saying is, where is u'otaku' coming from? | 20:58 |
smalekgh | it was the name of a course | 20:58 |
smalekgh | This is when I wish I had a magical wand >_< | 21:02 |
* wjohnsto wishes he knew zope | 21:04 | |
wjohnsto | I have traced it down to the very definition you're looking at | 21:05 |
wjohnsto | but I can't make sense of it | 21:05 |
smalekgh | ah well, thanks | 21:06 |
wjohnsto | traverser.AdapterTraverserPlugin('courserequirements', interfaces.ICourseRequirements) | 21:06 |
smalekgh | ... that wasn't part of the trace, was it? | 21:06 |
wjohnsto | no | 21:06 |
smalekgh | *whew* | 21:07 |
wjohnsto | so CourseRequirements is the "factory"? | 21:09 |
wjohnsto | and 'courserequirements' is the key? | 21:09 |
smalekgh | via the __init__ | 21:09 |
smalekgh | and yeppers | 21:10 |
wjohnsto | well | 21:10 |
wjohnsto | actually nvm | 21:10 |
wjohnsto | I would say just try it without a key, because factory has it's own key generator | 21:11 |
wjohnsto | but I don't think that's the problem | 21:11 |
smalekgh | TypeError: ('Could not adapt', u'programming', <InterfaceClass zope.annotation.interfaces.IAnnotations>) ... <-- hmmmm... | 21:11 |
wjohnsto | what was that? | 21:12 |
wjohnsto | just another course? | 21:12 |
wjohnsto | or did you change something? | 21:12 |
smalekgh | yep | 21:12 |
smalekgh | it's just another course | 21:12 |
smalekgh | I removed otaku, and tried it | 21:12 |
wjohnsto | well at least it's consistent | 21:12 |
smalekgh | it worked just fine, because there was no casting | 21:12 |
smalekgh | oh, well, I gotta eat lunch apparently.. | 21:12 |
wjohnsto | mmk | 21:13 |
*** smalekgh is now known as Masood[A] | 21:13 | |
* Masood[A] is now away - Reason : lunch | 21:13 | |
*** wjohnsto has quit IRC | 21:14 | |
*** Masood_ has joined #schooltool | 21:26 | |
Masood_ | back | 21:31 |
*** Masood_ is now known as smalekgh | 21:31 | |
smalekgh | Uhh, paul isn't back yet... darn | 21:32 |
*** jinty has quit IRC | 21:37 | |
smalekgh | how does one go about checking *your* running processes on maddog? | 21:37 |
smalekgh | because apparently I started cando/schooltool, and then I lost connection, and now I don't know how to kill it >_< | 21:38 |
smalekgh | nevermind... | 21:43 |
*** Masood[A] has quit IRC | 21:44 | |
*** wdickers has joined #schooltool | 21:44 | |
mlinnell | wdickers: hello! | 21:44 |
wdickers | hello | 21:45 |
mlinnell | wdickers: join #stagent | 21:45 |
*** pcardune_away has quit IRC | 21:46 | |
*** pcardune_away has joined #schooltool | 21:53 | |
smalekgh | hiya paul | 21:54 |
pcardune_away | smalekgh: ps aux | grep schooltool-server | 21:55 |
smalekgh | oye, I figured it out already >_< | 21:55 |
smalekgh | I just killed all of the other non-connected SSH terminals | 21:55 |
pcardune_away | ah | 21:57 |
smalekgh | anyways, I have a question | 21:57 |
smalekgh | er, a few questions | 21:57 |
smalekgh | in 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 |
smalekgh | If something implements IAttributeAnnotatable, it means it can be cast to an IAnnotations, right? | 22:29 |
smalekgh | And Course implements it, but apparently, it cannot be cast to an IAnnotations... | 22:30 |
*** ignas has joined #schooltool | 22:32 | |
*** wdickers has quit IRC | 22:40 | |
*** mlinnell has quit IRC | 22:43 | |
*** cpcarey has quit IRC | 23:01 | |
*** pcardune_away is now known as pcardune | 23:15 | |
pcardune | smalekgh: you should use PersistentList instead of [] | 23:16 |
gpaci | pcardune! | 23:17 |
smalekgh | he's alive! | 23:17 |
gpaci | In Thailand? | 23:17 |
pcardune | not anymore | 23:17 |
gpaci | Sunburn? | 23:18 |
pcardune | it only pealed a bit | 23:18 |
smalekgh | PersistentList is in zope.persistence.PersistentList, right? | 23:21 |
pcardune | nope | 23:21 |
smalekgh | crud | 23:21 |
pcardune | smalekgh: you should really install etags | 23:21 |
pcardune | apt-get install etags | 23:21 |
smalekgh | *points to windows machine* | 23:21 |
pcardune | *ouch* | 23:21 |
pcardune | it is in persistent | 23:22 |
pcardune | from persistent.list import PersistentList | 23:22 |
smalekgh | thanks | 23:22 |
smalekgh | TypeError: ('Could not adapt', u'programming', <InterfaceClass zope.annotation.interfaces.IAnnotations>) | 23:24 |
pcardune | that is because you are trying to adapt a string | 23:25 |
pcardune | you can never adapt a string, only objects | 23:25 |
smalekgh | oof | 23:25 |
smalekgh | thanks | 23:25 |
smalekgh | I could have sworn I got the actual course out of it tho | 23:25 |
smalekgh | wait a minute... I am... | 23:26 |
smalekgh | lisppaste5:url | 23:27 |
lisppaste5 | To use the lisppaste bot, visit http://paste.lisp.org/new/schooltool and enter your paste. | 23:27 |
lisppaste5 | smalekgh pasted "My view-class + calls" at http://paste.lisp.org/display/43317 | 23:27 |
smalekgh | In ScheduleEdit, I have a call to getCourseRequirements | 23:28 |
smalekgh | in getCourseAbleToBeTaken | 23:28 |
smalekgh | unless 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 reading | 23:30 | |
pcardune | it does not return a list nor a list of names | 23:31 |
pcardune | smalekgh: it returns a dictionary-like object | 23:31 |
pcardune | try this in python: | 23:31 |
pcardune | d={1:'a',2,'b'}; for x in d: print x | 23:32 |
pcardune | also, what is the deal with the __cmp__? | 23:32 |
pcardune | in general you shouldn't have to do that... | 23:32 |
smalekgh | oh | 23:32 |
smalekgh | I didn't think it was a dict | 23:33 |
smalekgh | that's why I used cmp | 23:33 |
smalekgh | I thought it was a list >_< | 23:33 |
smalekgh | but uh, if you mean __cmp__ as opposed to 'is' or something along those lines, then, I don't know >_< | 23:34 |
pcardune | maybe you mean: if course.title == coursename? | 23:34 |
smalekgh | hooray overloaded operators <_< | 23:35 |
pcardune | smalekgh: 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 list | 23:35 |
pcardune | but rather a dictionary | 23:35 |
pcardune | in which case you would use persistent.dict.PersistentDict | 23:36 |
smalekgh | right... | 23:36 |
* smalekgh kicks himself in the face | 23:36 | |
pcardune | smalekgh: don't worry. It's not your fault you learned java first ;) | 23:37 |
smalekgh | Actually I learned C++ first >_< but then Java was forced down my throat for 2 years | 23:38 |
smalekgh | then again, they're pretty much the same thing... | 23:40 |
pcardune | yeah, I'll admit to learning logo, true basic (random?), and C++ before I learned Python... and I was *very* skeptical of python at first too | 23:41 |
smalekgh | it seemed too freeform? | 23:41 |
pcardune | it didn't seem hard enough | 23:42 |
smalekgh | for me it was more like sonnets to free-verse | 23:42 |
smalekgh | actually, change 'was' to 'is' | 23:42 |
pcardune | smalekgh: you want to see my continuation of the zcontact application? | 23:42 |
smalekgh | er, sure I guess | 23:43 |
ignas | i found it quite easy to transfer to python | 23:43 |
ignas | and the motivation was sound ;) | 23:43 |
smalekgh | >_< | 23:43 |
pcardune | http://maddog.yhspatriot.net:8122/zcontact | 23:43 |
ignas | learn python - get a job | 23:43 |
pcardune | ignas: what happened to learn java - get a job? | 23:43 |
pcardune | (that's why I still haven't learned lisp) | 23:43 |
smalekgh | holy shiznatch | 23:44 |
smalekgh | so green and black and hackish | 23:44 |
ignas | pcardune: hmm, no idea, i had to learn php to get my first job, and had to learn python to get the second one | 23:44 |
pcardune | thank god for you second job eh? | 23:44 |
ignas | the improvement in coworkers was higher than the improvement in languages used ;) | 23:44 |
ignas | so - yes, thank god | 23:44 |
pcardune | *sting* | 23:45 |
smalekgh | ? | 23:45 |
ignas | and you know - languages they used were VB6, java and php | 23:45 |
* pcardune runs away | 23:46 | |
smalekgh | have 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 |
pcardune | yes, I have done that before... with the word schedule no less | 23:50 |
lisppaste5 | smalekgh pasted "AHHH!!!" at http://paste.lisp.org/display/43320 | 23: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 |
smalekgh | wait a minute... | 23:52 |
smalekgh | paul | 23:52 |
smalekgh | you're using jama's port | 23:52 |
smalekgh | I can't run my thing >_< | 23:52 |
pcardune | smalekgh: oh sorry | 23:54 |
pcardune | you can run it now | 23:54 |
smalekgh | yay! thanken! | 23:54 |
pcardune | I can't find the page with the ports on it | 23:54 |
pcardune | so i just started searching for an open one :) | 23:55 |
smalekgh | <_< | 23:55 |
smalekgh | YAY!!! THANK YOU THANK YOU THANK YOU | 23:55 |
* smalekgh dances | 23:55 | |
ignas | pcardune: you could add some sane error message to schooltool-server | 23:59 |
ignas | if port is already bound | 23:59 |
smalekgh | lol | 23:59 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!