module

How to use the _Qt python module?

There is a python module called "_Qt". PyQt is not what I want. I was wondering if there was any documentation for the _Qt module installed with python as a standard module. I have a mac. ...

Perl IO modules possibly causing issues in Net::DNS module

Hi! I’m porting some software that I wrote for a White Russian OpenWRT system to a new Kamikaze 8.09.1 OpenWRT system but I am having some serious issues that I’m hoping you can help me with. Old system Linux kernel 2.4.34 MIPSEL arch Perl 5.8.7 Net::DNS 0.48 IO 1.21 IO::Socket 1.28 IO::Socket::INET 1.28 New system Linux kernel 2.6.26...

Alternative module of Net::SSH::Expect or how to connect remote server and get the output of command

I want to use Net::SSH::Expect in my unix box but unfortunately, it is not available and I am not able to convince the admin to install any perl module. Do you know how could I connect to a remote server using expect. I know that I can archive that by using python but python is also not avai in my unix box. Second attempt: though I use ...

Checking for module availability programmatically in Python?

given a list of module names (e.g. mymods = ['numpy', 'scipy', ...]) how can I check if the modules are available? I tried the following but it's incorrect: for module_name in mymods: try: import module_name except ImportError: print "Module %s not found." %(module_name) thanks. ...

Can I force Apache 2.2 connection close from inside a C module?

Hello, We'd like to have a more fine-grained control on the connections we serve in a C++ Apache 2.2 module (on CentOS 5). One of the connections needs to stay alive for a few multiple requests, so we set "KeepAlive" to "On" and set a short keep-alive period. But for every such connection we have a few more connections from the browse...

Python module seeing a full list as empty in another module

I'm working on a pygame project and have the main engine layed out. The problem is I hit a bug that I just can not seem to figure out. What happens is one module can't read a variable from another module. It's not that the variable can't be read, it just sees an empty list instead of what it really is. Instead of posting the entire s...

How can I de-install a Perl module installed via `cpan`?

I am using Perl running in user space (not installed via root) and installing modules via the command-line cpan. I would like to know if there is a simple way to remove a module without having to do a lot of work deleting individual files. I searched for this question on the internet and found some answers, but the answers I've found se...

Drupal Custom Form with Filters

I'm displaying cars on a page created with a view and displays. I want to be able to create a form on the home page to allow people to select the 'make', which will then update the 'models' list based on the 'make' the user selects, 'year' to and from, and 'amount' to and from. What the user selects will of course alter the list of use...

Can Python directory names be keywords? E.g. 'import'?

Am I allowed to have a directory named 'import' containing Python code? Or will the import command fail to parse it as a result? Is there any way around that? ...

Easiest way to automatically download required modules in Python?

I would like to release a python module I wrote which depends on several packages. What's the easiest way to make it so these packages are programmatically downloaded just in case they are not available on the system that's being run? Most of these modules should be available by easy_install or pip or something like that. I simply want ...

how to get $form_state outside of FAPI's functions?

I'm writing a custom module and I'd like to use $form_state of the current form in another non-form api function -> custom_facet_view_build(). any help is appreciated :) <?php /** * Implementation of hook_perm(). */ function custom_facet_perm() { return array( 'access foo content', 'access baz content', ); } /** * Imp...

How to override module classes in Kohana 3?

In Kohana 3, how can I override/extend a module class? E.g. I want to add functionality to the Auth module that is specific to my application. In this case I want to extend the abstract Auth class located in the classes folder of the Auth module. What naming convention should I use for my Auth class and where in the file system do I p...

Node.js appears to be missing the multipart module

I am trying to parse form data, including upload files with a node.js http server. All of the tutorial type articles I have found use a require("multipart"); to include the multipart module, but when I try the same I get: Error: Cannot find module 'multipart' I also can't find it in the current api docs (though it is in the google cac...

Class vs. Module in VB

What advantage is there, if any, to using Modules rather than classes in VB? How do they differ, and what advantages/disadvantages are there in using modules? In VB or VB.NET, I use both. ...

How can I use a variable as a module name in Perl?

I know it is possible to use a variable as a variable name for package variables in Perl. I would like to use the contents of a variable as a module name. For instance: package Foo; our @names =("blah1", "blah2"); 1; And in another file I want to be able be able to set the contents of a scalar to "foo" and then access the names arra...

Making an updates manager module for a program

Hi! I'm working on a program that shall have an "updates" module (online). I can't figure out how to do this. Initially i'm trying with a SVN repository. Any better idea? How is this normally done? (I'm not asking for a concrete languague, i only want an general idea about the procces) Thank you. ...

Flex: should I define components path in each module or just main application mxml ?

hi, I'm implementing a Flex application with several modules. I'm reusing the same component in all these modules. I was wondering if I'm correctly importing it in each mxml module definition: ... xmlns:hillelcoren="com.hillelcoren.components.*" ... Should I import it only once, in the main application mxml instead ? thanks ...

Drupal - moving module folder

Is it safe to move my modules From sites/all/modules/ To sites/all/modules/contrib and sites/all/modules/custom on a production site? That is, does Drupal automatically detect that the module is still there, but in a new path? ...

Send instance method to module

Given the following module, module Foo def bar :baz end end def send_to_foo(method) # ...? end send_to_foo(:bar) # => :baz What code should go in send_to_foo to make the last line work as expected? (send_to_foo is obviously not how I would implement this; it just makes clearer what I'm looking for.) I expected Foo.send(:b...

Arbitrary Form Processing with Drupal

I am writing a module for my organization to cache XML feeds to static files to an arbitrary place on our webserver. I am new at Drupal development, and would like to know if I am approaching this the right way. Basically I: Expose a url via the menu hook, where a user can enter in a an output directory on the webserver and press the ...