| nburlett | exarkun: cool, thanks |
| Ragzouken | How is it intended to be used then? |
| habnabit | Ragzouken, try looking at examples? |
| exarkun | Ragzouken: I'm not sure what Peaker just said actually makes sense as a stand-alone statement. Ragzouken: Take a look. Maybe it will be obvious what you need to do. If not, then at least you'll have some more specific questions to ask. |
| Ragzouken | Ok. |
| peaker | exarkun: reactor.run() will not work if he wrote his own mainloop.. ? |
| habnabit | Peaker, well, if he had a mainloop that dealt with sockets, he'd have to rewrite it all anyway. |
| exarkun | Peaker: Most random assemblies of software won't work. Take about hypothetical concoctions doesn't strike me as productive. s/Take/Talking/ |
| peaker | Its not hypothetical, because if he didn't write a mainloop yet, he can use his code with twisted with less work (or less redoing of things) |
| exarkun | Peaker: You have no idea what his code looks like. Peaker: At the very least, you should ask. Peaker: Otherwise you're basing your suggestions on unfounded assumptions. Peaker: And that's generally not helpful. |
| peaker | That's why I said "if" |
| Ragzouken | What would you expect me to have if I wasn't using my own main loop? |
| peaker | Ragzouken: blocking use of a single socket? |
| Ragzouken | hm |
| fursts | Umm.. how do I format the current date/time like this: 2007-05-12 17:08:13 |
| tjansson-2 | I am trying to make this generic "Create a checkbox" function, but I am little clueless on how to call an item from a dict, so far this is what I got http://deadbeefbabe.org/paste/4733 |
| habnabit | fursts, time.strftime? |
| noam_ | what's self.self? what's self, anyway? are you sure you need to take a self parameter? is this function a method in a class? |
| ivazquez | tjansson-2: Very wrong unfortunately. |
| habnabit | There's also datetime.strftime if you're using date/time objects. |
| ivazquez | tjansson-2: Keep the names in a list. tjansson-2: The dict should be initially empty. tjansson-2: Then add items as needed. tjansson-2: Then refer to them in the dict using the name. tjansson-2: self.checkbutton['LNCOL']..... |
| tjansson-2 | ivazquez: hmm - okay - i guess missunderstood quite a bit |
| fursts | habnabit: strftime("%Y-%m-%d %H:%m:%S", gmtime()) - correct? |
| habnabit | fursts, well, if you're just doing the current time, the gmtime() is redundant. |
| tjansson-2 | ivazquez: sound easy now - but if want to join the name extracted from the dict with some other string - how should that be done? |
| ivazquez | Well, won't you know the name already? Aren't you using the name as the key in the first place? |
| tjansson-2 | ivazquez: i am not sure if do ... :D Maybe this function is a little over head. I guess I was looking for a way to join strings as "." does in PHP |
| Zao | tjansson-2: 'foo' + 'bar' |