Import python3 compatible object.

This commit is contained in:
Ahmed Charles 2015-10-23 02:26:37 +00:00 committed by Griatch
parent 4f07da29c2
commit 11b61fe335
43 changed files with 43 additions and 0 deletions

View file

@ -13,6 +13,7 @@ See www.evennia.com for full documentation.
"""
from __future__ import print_function
from __future__ import absolute_import
from builtins import object
# Delayed loading of properties

View file

@ -63,6 +63,7 @@ can then implement separate sets for different situations. For
example, you can have a 'On a boat' set, onto which you then tack on
the 'Fishing' set. Fishing from a boat? No problem!
"""
from builtins import object
import sys
from importlib import import_module
from inspect import trace

View file

@ -23,6 +23,7 @@ update() on the channelhandler. Or use Channel.objects.delete() which
does this for you.
"""
from builtins import object
from evennia.comms.models import ChannelDB
from evennia.commands import cmdset, command

View file

@ -17,6 +17,7 @@ Channels are central objects that act as targets for Msgs. Players can
connect to channels by use of a ChannelConnect object (this object is
necessary to easily be able to delete connections on the fly).
"""
from builtins import object
from django.conf import settings
from django.utils import timezone

View file

@ -94,6 +94,7 @@ in-game.
"""
from __future__ import print_function
from builtins import object
from evennia import Command, DefaultScript, CmdSet

View file

@ -40,6 +40,7 @@ example of usage.
For a simple demonstration, add `CmdMenuTest` from this module to the default cmdset.
"""
from builtins import object
from types import MethodType
from evennia import syscmdkeys

View file

@ -69,6 +69,7 @@ Tall man (assuming his name is Tom) sees:
"""
from builtins import object
import re
from re import escape as re_escape

View file

@ -104,6 +104,7 @@ to any other identifier you can use.
"""
from __future__ import print_function
from builtins import object
import re
import inspect

View file

@ -13,6 +13,7 @@ Attributes are separate objects that store values persistently onto
the database object. Like everything else, they can be accessed
transparently through the decorating TypeClass.
"""
from builtins import object
from django.conf import settings
from django.db import models

View file

@ -5,6 +5,7 @@ These are the (default) starting points for all in-game visible
entities.
"""
from builtins import object
import traceback
from django.conf import settings

View file

@ -5,6 +5,7 @@ added to all game objects. You access it through the property
`scripts` on the game object.
"""
from builtins import object
from evennia.scripts.models import ScriptDB
from evennia.utils import create

View file

@ -54,6 +54,7 @@ a custom handler one can make a custom `AT_STARTSTOP_MODULE` entry to
call the handler's `save()` and `restore()` methods when the server reboots.
"""
from builtins import object
from twisted.internet.defer import inlineCallbacks
from django.core.exceptions import ObjectDoesNotExist
from evennia.scripts.scripts import ExtendedLoopingCall

View file

@ -11,6 +11,7 @@ the oobhandler's functionality to return data, register a monitor on
an object's properties or start a repeating action.
"""
from builtins import object
from collections import defaultdict
from django.conf import settings

View file

@ -1,6 +1,7 @@
"""
IMC2 client module. Handles connecting to and communicating with an IMC2 server.
"""
from builtins import object
from time import time
from twisted.internet import task

View file

@ -4,6 +4,7 @@ http://www.mudbytes.net/index.php?a=articles&s=imc2_protocol
"""
from __future__ import print_function
from builtins import object
import shlex
from django.conf import settings

View file

@ -14,6 +14,7 @@ terribly slow connection.
This protocol is implemented by the telnet protocol importing
mccp_compress and calling it from its write methods.
"""
from builtins import object
import zlib
# negotiations for v1 and v2 of the protocol

View file

@ -10,6 +10,7 @@ active players and so on.
"""
from builtins import object
from django.conf import settings
from evennia.utils import utils

View file

@ -13,6 +13,7 @@ http://www.mushclient.com/mushclient/mxp.htm
http://www.gammon.com.au/mushclient/addingservermxp.htm
"""
from builtins import object
import re
LINKS_SUB = re.compile(r'\{lc(.*?)\{lt(.*?)\{le', re.DOTALL)

View file

@ -9,6 +9,7 @@ NAWS allows telnet clients to report their current window size to the
client and update it when the size changes
"""
from builtins import object
from django.conf import settings
NAWS = chr(31)

View file

@ -8,6 +8,7 @@ by game/evennia.py).
"""
from __future__ import print_function
from builtins import object
import time
import sys

View file

@ -5,6 +5,7 @@ This connects an RSS feed to an in-game Evennia channel, sending messages
to the channel whenever the feed updates.
"""
from builtins import object
from twisted.internet import task, threads
from django.conf import settings

View file

@ -9,6 +9,7 @@ Using standard ssh client,
"""
from __future__ import print_function
from builtins import object
import os
from twisted.cred.checkers import credentials

View file

@ -18,6 +18,7 @@ for updating health bars etc. See also GMCP which is another standard
doing the same thing.
"""
from builtins import object
import re
import json
from evennia.utils.utils import to_str

View file

@ -10,6 +10,7 @@ etc. If the client does not support TTYPE, this will be ignored.
All data will be stored on the protocol's protocol_flags dictionary,
under the 'TTYPE' key.
"""
from builtins import object
# telnet option codes
TTYPE = chr(24)

View file

@ -8,6 +8,7 @@ by game/evennia.py).
"""
from __future__ import print_function
from builtins import object
import time
import sys
import os

View file

@ -6,6 +6,7 @@ connection actually happens (so it's the same for telnet, web, ssh etc).
It is stored on the Server side (as opposed to protocol-specific sessions which
are stored on the Portal side)
"""
from builtins import object
import re
import weakref

View file

@ -3,6 +3,7 @@ This module defines a generic session class. All connection instances
(both on Portal and Server side) should inherit from this class.
"""
from builtins import object
import time

View file

@ -12,6 +12,7 @@ There are two similar but separate stores of sessions:
handle network communication but holds no game info.
"""
from builtins import object
from time import time
from django.conf import settings

View file

@ -8,6 +8,7 @@ which is a non-db version of Attributes.
"""
from builtins import object
import re
import weakref

View file

@ -25,6 +25,7 @@ This module also contains the Managers for the respective models; inherit from
these to create custom managers.
"""
from builtins import object
from django.db.models import signals

View file

@ -9,6 +9,7 @@ used for storing Aliases and Permissions. This module contains the
respective handlers.
"""
from builtins import object
from django.conf import settings
from django.db import models

View file

@ -13,6 +13,7 @@ it is run by Evennia just before returning data to/from the
user.
"""
from builtins import object
import re
from evennia.utils import utils
from evennia.utils.utils import to_str, to_unicode

View file

@ -167,6 +167,7 @@ caller.msg("The object was created!")
script = create.create_script()
```
"""
from builtins import object
import re
import codecs

View file

@ -18,6 +18,7 @@ in-situ, e.g `obj.db.mynestedlist[3][5] = 3` would never be saved and
be out of sync with the database.
"""
from builtins import object
from functools import update_wrapper
from collections import defaultdict, MutableSequence, MutableSet, MutableMapping

View file

@ -33,6 +33,7 @@ and initialize it:
displayed in the editor.
"""
from builtins import object
import re
from django.conf import settings

View file

@ -135,6 +135,7 @@ form will raise an error.
"""
from __future__ import print_function
from builtins import object
import re
import copy

View file

@ -134,6 +134,7 @@ evennia.utils.evmenu`.
"""
from __future__ import print_function
from builtins import object
from textwrap import dedent
from inspect import isfunction, getargspec

View file

@ -25,6 +25,7 @@ long enough to need to scroll and **kwargs will be passed on to the
caller.msg() construct (text will be using the pager restrictor).
"""
from builtins import object
from django.conf import settings
from evennia import Command, CmdSet

View file

@ -115,6 +115,7 @@ table string.
"""
from __future__ import print_function
from builtins import object
#from textwrap import wrap
from django.conf import settings
from textwrap import TextWrapper

View file

@ -28,6 +28,7 @@ Pickle field implementation for Django.
Modified for Evennia by Griatch.
"""
from builtins import object
from ast import literal_eval
from copy import deepcopy

View file

@ -30,6 +30,7 @@
# POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
from builtins import object
__version__ = "trunk"
import copy

View file

@ -9,6 +9,7 @@ snippet #577349 on http://code.activestate.com.
(extensively modified by Griatch 2010)
"""
from __future__ import absolute_import
from builtins import object
import re
import cgi

View file

@ -7,6 +7,7 @@ be of use when designing your own game.
"""
from __future__ import division
from __future__ import print_function
from builtins import object
import os
import sys