Example #1
0
    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
Example #2
0
    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
Example #3
0
#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)
Example #4
0
#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)

Example #5
0
#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)
Example #6
0
#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')
Example #7
0
#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)
Example #8
0
#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)
Example #9
0
#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)
Example #10
0
#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)
Example #11
0
#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)
Example #12
0
# 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)