mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fixes to auto-link remapper
This commit is contained in:
parent
7eab265994
commit
5177efe129
17 changed files with 74 additions and 2740 deletions
|
|
@ -18,8 +18,10 @@ to you, but some things may still be useful.
|
|||
|
||||
## Coding away
|
||||
|
||||
- [Coding Introduction](./Coding-Introduction)
|
||||
- [Ways to Debug](./Debugging)
|
||||
- [Adding unit-tests](./Unit-Testing)
|
||||
- [Things to remember when importing from evennia](./Flat-API)
|
||||
|
||||
## Advanced concepts
|
||||
|
||||
|
|
|
|||
|
|
@ -1,47 +1,7 @@
|
|||
# Evennia API
|
||||
|
||||
|
||||
Evennia makes much of its programming tools available directly from the top-level `evennia` package.
|
||||
This is often referred to as Evennia's "flat" [Application Programming
|
||||
Interface](https://en.wikipedia.org/wiki/Application_programming_interface) (API). The flat API
|
||||
tries to collect and bring the most commonly used resources to the front in a way where everything
|
||||
is available at a glance (in a flat display), making it a good place to start to learn Evennia.
|
||||
|
||||
> Evennia's flat (and full) API can be perused through the auto-generated [API Library
|
||||
refence](github:evennia).
|
||||
|
||||
A good, interactive way to explore the flat API is to use [IPython](http://ipython.org/), a more
|
||||
flexible version of the default Python shell. Inside your virtual environment you can install
|
||||
IPython simply by
|
||||
|
||||
pip install ipython
|
||||
|
||||
Windows users should also install [PyReadline](http://ipython.org/pyreadline.html):
|
||||
|
||||
pip install pyreadline
|
||||
|
||||
With IPython installed, go to your game directory and run
|
||||
|
||||
evennia shell
|
||||
|
||||
This should give you the IPython shell automatically. Inside IPython
|
||||
you then do
|
||||
|
||||
import evennia
|
||||
|
||||
Followed by
|
||||
|
||||
evennia.<TAB>
|
||||
|
||||
That is, write `evennia.` and press the TAB key. What pops up is the contents of the `evennia` top-
|
||||
level package - in other words [the "flat" API](github:evennia#the-flat-api).
|
||||
|
||||
evennia.DefaultObject?
|
||||
|
||||
Starting to write the name of an API entity and pressing `<TAB>` will auto-complete the name. Adding
|
||||
a question mark (`?`) to its name will show you its documentation. Append `??` to get the actual
|
||||
source code. This way you can quickly explore Evennia and see what is available.
|
||||
# Things to remember about the flat API
|
||||
|
||||
The flat API is a series of 'shortcuts' on the `evennia` main library root (defined in
|
||||
`evennia/__init__.py`). Its componentas are documented [as part of the auto-documentation](../Evennia-API).
|
||||
|
||||
## To remember when importing from `evennia`
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue