def __init__(self): Window.__init__(self, 0, 0, getDesktop().width, \ getDesktop().height/4, topmost = 1) self.setLayout(pyui.layouts.BorderLayoutManager()) self.outputBox = LineDisplay() self.addChild(self.outputBox, pyui.locals.CENTER) self.pack() Events.addCallbacks('keyDown', self.keyDown) self.oldout = sys.stdout sys.stdout = self
def __init__(self): Window.__init__(self, 0, 0, getDesktop().width, \ getDesktop().height/4, topmost = 1) self.setLayout(pyui.layouts.BorderLayoutManager()) self.outputBox = LineDisplay() self.addChild(self.outputBox, pyui.locals.CENTER) self.pack() Events.addCallbacks('keyDown', self.keyDown) self.oldout = sys.stdout sys.stdout = self
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Initializes the User module from StreetModules import Events, User Events.addCallbacks('net bindUDP', User.bindUDP)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Initialize core event callbacks at startup time. from StreetModules import Events from StreetModules.Client import Core Events.addCallbacks('init', Core.init) Events.addCallbacks('run', Core.run) Events.addCallbacks('quit', Core.quit) Events.addCallbacks('command-quit', Core.quit)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Sets up the Core module. from StreetModules import Events from StreetModules.Server import Core Events.addCallbacks('init', Core.init) Events.addCallbacks('run', Core.run) Events.addCallbacks('quit', Core.quit)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Sets up events for the Scripts module. from StreetModules import Scripts, Events Events.addCallbacks('runscript', Scripts.run) Events.addCallbacks('command-run', Scripts.run) Scripts.install('StreetScripts')
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Initialize core event callbacks at startup time. from StreetModules import Events from StreetModules.Client import Core Events.addCallbacks('init', Core.init) Events.addCallbacks('run', Core.run) Events.addCallbacks('quit', Core.quit) Events.addCallbacks('command-quit', Core.quit) Events.addCallbacks('cleanup', Core.cleanup)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Set up the chat callbacks from StreetModules import Events from StreetModules.Server import Chat Events.addCallbacks('net tell', Chat.tell)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Initializes one quake-like console window. from StreetModules import Events from StreetModules.Client import Console Events.addCallbacks('init_END', Console.init) Events.addCallbacks('showConsole', Console.showConsole) Events.addCallbacks('hideConsole', Console.hideConsole) Events.addCallbacks('run_END', Console.close)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Sets up the callbacks for the Login module. from StreetModules import Events from StreetModules.Client import LoginClient Events.addCallbacks('init_END', LoginClient.init) Events.addCallbacks('net login', LoginClient.login) Events.addCallbacks('net logout', LoginClient.logout)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Set up the chat callbacks from StreetModules import Events from StreetModules.Client import Chat Events.addCallbacks('net tell', Chat.recvTell) Events.addCallbacks('command-tell', Chat.sendTell)
# Copyright (C) 2004-2005 Randall Leeds # # This file is part of The Street. # # The Street is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # The Street is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with The Street; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 # Initialize core event callbacks at startup time. from StreetModules import Events from StreetModules.Client import Core Events.addCallbacks("init", Core.init) Events.addCallbacks("run", Core.run) Events.addCallbacks("quit", Core.quit) Events.addCallbacks("command-quit", Core.quit)
#Copyright (C) 2004-2005 Randall Leeds # #This file is part of The Street. # #The Street is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #The Street is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with The Street; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #Provides a small command bar at the bottom of the screen from StreetModules import Events from StreetModules.Client import CommandLine Events.addCallbacks('start', CommandLine.init)