Skip to content

Examples

KA Xplorer codes edited this page Jan 28, 2026 · 1 revision

Importing Easycode There are three ways to bring the library into your project. Use the one that fits your workflow best.

    1. The Shortcut Way (Recommended) This is the intended way to use the library. It makes classes like ec.pg_sprite or ec.pg_group much shorter and faster to type than standard Pygame code.
import easycode as ec

Example usage:

class Player(ec.pg_sprite):
    pass
    1. The Standard Way Use this if you prefer to see the full library name in your code for clarity.
import easycode

Example usage:

class Player(easycode.pg_sprite):
    pass
    1. The "From" Import (Experimental) You can technically import all functions directly into your script. Note: This method is currently experimental. While it may work, it can cause "naming conflicts" with Pygame or Arcade functions. Use with caution.
from easycode import *

Clone this wiki locally