473,385 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

special case loading modules with imp

Alright, this is my first post here. =) Let's try to get this right?

I have a slight problem right now. I wrote a plugin architecture in Python,
allowing any python app or python using app to use plugins. It's very flexible
and open-ended, except for one thing: It has to use imp to load python source
from files. Now, using imp is not the problem really. The plugin module works
very well as of now, and I've used it lots of my other projects. What I need
to do now is I've read Python code out of an SQLite database into a string, and
I need my plugin module to use imp to load that string of code as a module.
(I don't use import because I simply store the module object in an array. makes
it unloadable later.)

So, I just want to switch from using real files to being able to use strings.
The goal is to get a module object that I can place in an array.

Thanks, Rob.

Jul 18 '05 #1
0 1186

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: fowlertrainer | last post by:
Hello ! I have used mod_python. But it is don't reload my modules when I editing them. I try with this: -------------------- # Module importer import os import traceback
0
by: Jacob Kroon | last post by:
Hi, I'm having some problems with implementing dynamical module loading. First let me describe the scenario with an example: modules/ fruit/ __init__.py apple.py banana.py
1
by: Carl Bolstad | last post by:
I'm writing a C# class library, to be registered as COM and used as an extension to a commercial application called ArcMap. This approach has worked great for a long time, until... ...
1
by: Andras Balogh | last post by:
The project I'm working on is written mainly C/C++, spiced with some Python scripts. Now, I have several dlls, which work both as a Python extension modules, exporting functions to Python via...
1
by: tyler | last post by:
I've written a small python extension but I'm having difficulty loading it at runtime. The source for my extension is a module which is a member of a package is organized as follows. ...
42
by: John Doty | last post by:
I realized that I have a little job on the table that is a fine test of the Python versus Standard Forth code availability and reusability issue. Note that I have little experience with either...
7
by: Ben Finney | last post by:
Howdy all, Ned Batchelder blogged about a debate over checking function parameters, and to what extent dynamic typing should be relied upon. I was one of many who commented, but I wrote what...
4
by: Frank | last post by:
Hi, I have the following weird behavior when I load modules: 8 Everything is fine. Traceback (most recent call last):
7
by: 2b|!2b==? | last post by:
I am attempting to manually load debug symbols for a module. I am doing it by carrying out the ff steps: i). Select the call stack window ii). right click and select 'Load Symbols' from...
4
by: BL | last post by:
I am very new to python. I am installing it as part of a bazzar version control installation. I have installed the Crypto, paramiko and cElementTree modules. I am running Solaris10x86. When...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.