module

Creating a module system (dynamic loading) in C

How would one go about loading compiled C code at run time, and then calling functions within it? Not like simply calling exec(). EDIT: The the program loading the module is in C. ...

Drupal Aggregator input format

Drupal Aggregator core module is a useful one but suffers many problems. There are many talking about improving it in Drupal 7. Right now I'm using Aggregator module which comes with Drupal 6. I'm building an aggregation site, and there is one BIG problem. Sometimes feeds contain HTML tags attributes (e.g. style, dir, title), but Aggreg...

How would a loaded library function call a symbol in the main application?

When loaded a shared library is opened via the function dlopen(), is there a way for it to call functions in main program? ...

Why can't I find Perl modules after upgrading to Intrepid Ibex Ubuntu?

I upgraded to Ubuntu Intrepid Ibex yesterday and suddenly some of the Perl modules that I installed (on the Hardy Heron) have all gone missing! I get the usual "Can't locate module in @INC" error. Has any of the CPAN repositories changed or something for Intrepid? Google doesn't help at all. Thanks in advance. ...

How do YOU manage Perl modules when using a package manager?

A recent question here on SO got me thinking. On most Linux distributions that I tried, some Perl modules would be available through the package manager. Others, of course, not. For quite a while I would use my package manager whenever I needed to install some CPAN module to find out whether a package was available or not and to install...

How do you identify (and get access to) modules/debug symbols to use when provided a windows .dmp or .minidmp

In a way following on from reading a windows *.dmp file Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not have knowledge of the PC setup to such an extent that you can ensure you have the actually mo...

IIS Module for Blocking Heavy Site Traffic

Question Hello All, A little background on my issue... I currently have a site built for the ISP I work for that displays messages to users based on their billing status. When they are in Non-Pay I display a Non-Pay message and if they are in Abuse, I display an abuse message, etc. The traffic is generated by a Cisco SCE that redire...

How to write Linux driver module call/use another driver module?

I'm developing a Linux driver loadable module and I have to use another device in my driver.(kind of driver stacked on another driver) How do I call/use another driver in my driver? I think they are both in the kernel so there might be a way that can use another driver directly. ...

How to get current time in Python

Can anybody tell what is the module/method used to get current time ??? ...

Modularising a C# Compact Framework 2.0 Application

Morning guys, We're currently developing a new piece of hand-held software. I cant discuss the nature of the application, so I'll use an example instead. We've designing hand-held software for managing a school. We want to modularise each aspect of the system so that different schools can use different features. Our system will start...

What is the difference between new Some::Class and Some::Class->new() in Perl?

Many years ago I remember a fellow programmer counselling this: new Some::Class; # bad! (but why?) Some::Class->new(); # good! Sadly now I cannot remember the/his reason why. :( Both forms will work correctly even if the constructor does not actually exist in the Some::Class module but instead is inherited from a parent somewhere....

Python: import the containing package

In a module residing inside a package, i have the need to use a function defined within the __init__.py of that package. how can i import the package within the module that resides within the package, so i can use that function? Importing __init__ inside the module will not import the package, but instead a module named __init__, leadin...

How do I unload (reload) a Python module?

I have a long-running python server and would like to be able to upgrade a service without restarting the server. What's the best way do do this? if foo.py has changed: unimport foo <-- how do I do this? import foo myfoo=foo.Foo() ...

Is there a way to "use" a single file that in turn uses multiple others in Perl?

I'd like to create several modules that will be used in nearly all scripts and modules in my project. These could be used in each of my scripts like so: #!/usr/bin/perl use Foo::Bar; use Foo::Baz; use Foo::Qux; use Foo::Quux; # Potentially many more. Is it possible to move all these use statements to a new module Foo::Corge and the...

Easing debugging with interchangable singletons?

I have a few classes, such as those that outline database table structure or those that outline the application's configuration, which do not change state at all throughout the program's execution. I currently have these classes as singletons and the classes that wish to retrieve information request the class instances (eg. from the comm...

Why does Paramiko hang if you use it while loading a module?!

Put the following into a file hello.py (and easy_install paramiko if you haven't got it): hostname,username,password='fill','these','in' import paramiko c = paramiko.SSHClient() c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) c.connect(hostname=hostname, username=username, password=password) i,o,e = c.exec_command('ls /') print(...

Communication between modules

I have an application that consists from the following three modules: Search (to search for objects) List (to display the search results) Painter (to allow me to edit objects) - this module isn't always loaded (Each object is a figure that I can edit in the painter). When I open an object in the painter it's added to the objects tha...

What is __init__.py for?

What is __init__.py for in a python source directory? ...

How do I make private functions in a Perl module?

I am working on a little Perl module and for some reason I had the test driver script that was using my new module call one of the functions that I thought would be private, and it was successful. I was surprised, so I started searching google and I couldn't really find any documentation on how to make private functions in Perl modules....

How can I install the Beautiful Soup module on the Mac?

I read this without finding the solution: http://docs.python.org/install/index.html ...