aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md30
1 files changed, 14 insertions, 16 deletions
diff --git a/README.md b/README.md
index fd2252c..2cc6722 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,10 @@
# Python Extensions for QtCreator
This plugin for QtCreator makes it possible to extend the QtCreator by
-writing Python extensions. These extensions consist of a directory
-containing a `main.py` and any other Python files necessary. They can
-be shared as zip archives, installed and managed through the included
-extension manager (which is a Python extension itself) and thus allow
-the QtCreator to be easily extended with custom functionality.
+writing Python extensions. These extensions are simply Python packages,
+so they are directories containing a `__init__.py` and any other Python
+files necessary. They can be shared as zip archives, installed and managed
+through the included extension manager (which is a Python extension itself) and thus allow the QtCreator to be easily extended with custom functionality.
**WARNING:** This is a first draft / proof of concept and only offers
very limited functionality. There will still be many bugs and so far
@@ -129,21 +128,20 @@ The following process allows the plugin to work:
2. When QtCreator is executed, the C++ plugin searches the standard
QtCreator plugin directories for a directory named `python`, the
first directory found is the Python extension directory.
- - Now, each subdirectory represents it's own Python extension. For each
- subdirectory the C++ plugin checks whether it contains a `setup.py`.
- If it does, this setup script is executed.
- - After all the setup scripts have been executed, each subdirectory is
- checked for a file named `main.py`. This file is the extensions entry
- point and is executed by the C++ plugin.
+ - Now, each package in this directory represents it's own Python extension.
+ For each package the C++ plugin checks whether it
+ contains a `setup.py`. If it does, this setup script is executed.
+ - After all the setup scripts have been executed, each package is loaded
+ with `import`, which executes the initialization code in its
+ `__init__.py`.
3. Now all Python extensions have registered their actions / menus / etc.,
which can be triggered from the QtCreator interface.
When executed, the Python extensions can import any modules / packages
-installed for the system Python or found in their own directory. While
-the C++ plugin takes some precautions to isolate the Python extensions
-when executed, they are still all run in the same Python instance,
-which means that they are not completely isolated. However, so far
-this did not turn out to be a problem.
+installed for the system Python, in Qt Creator's extensions directory, or
+found in their own directory.
+Python extensions are all run in the same Python instance,
+which means that they are not completely isolated.
For a more detailed description, please refer to the documentation in
`docs`.