module

how do i get a python module's version number through code?

I remember someone showed me a way but its eluded me so far. I'm trying to get the version number of a specific few modules that I use. Something that I can store in a variable. ...

How can I make a module that imports many modules for the user?

I have a rather complex data structure I've implemented in Perl. This has been broken up into about 20 classes. Basically, any time you want to use one of these classes, you need to use all of them. Right now, if someone wants to use this data structure, they need to do something like: use Component::Root; use Component::Foo; use Com...

Submitting form custom module

Hi guys, I have a question regarding drupal 6 forms. I have 4 tables: location[locationid, name]; package[packageid, name], person[personid, name, locationid, address, etc...] pickup[pickupid, personid, packageid, locationid, _pickup_day_,...]. I've made forms and form_submit for the three tables: location, package, person (simple C...

Moving the Wordpress Publish Module

On the Wordpress dashborad page for writing a new/editing an existing post, is it possible to have the 'Publish' module appear at the bottom right (be the last module on the right) as a default, without having to drag and drop it there? I'm okay with changing the code in the core files, I just need to know how to do it ? ...

Megento Module action on ProductView

I have create a module which at this point does nothing but exist the next step I need to figure out is how to make it does something when someone views the a product at this point I don't care if it says hello world next to the image can someone help me I can't seem to figure out what I need to extend if i need to use and observer or w...

Visual Studio - Finding which modules are causing C1905 (processor incompatibility)

I'm attempting to make an x64 build of a project with Visual Studio 2005. It's currently failing with linker error C1905, 'Front end and back end not compatible (must target same processor).' From what I gather, this is essentially saying that my x64 build is attempting to link with x86 modules. Unfortunately, this project links with a ...

Zend Framework – Modules, Forms, ViewScripts and ViewHelpers

Hi, I have a search module. It has one form within it that produces the search field, I am using a viewScript that is stored within views/scripts/forms to render the form. I want this form to appear on ever screen so I have written a ViewHelper that creates the from and returns it. This works fine when I am within the search module bu...

How to change a module variable from another module?

Suppose I have a package named bar, and it contains bar.py: a = None def foobar(): print a and __init__.py: from bar import a, foobar Then I execute this script: import bar print bar.a bar.a = 1 print bar.a bar.foobar() Here's what I expect: None 1 1 Here's what I get: None 1 None Can anyone explain my misconception?...

Functors with multiple arguments in OCaml

Hello, I've the following situation: module type M = sig type s = ... end module Make(P: Something) : (M with type s = P.t) = struct type s = P.t ... end that works fine to generate modules of M type that use specific implementation of modules of type Something inside their implementation. Now suppose I have another module de...

Should a Perl module raise exceptions (die/croak)?

When writing a Perl module, is it a good practice to use croak/die inside the module? After all, if the caller doesn't use an eval block, the module might crash the program calling it. What is the best practice in these cases? ...

About the syntax of module rewrite

i have some question about the syntax of module rewrite. i would like to know how to write a rule to not include/contain some file? For example: Directories structure: / /home.php /profile.php /pages /pages/index.php /pages/.htaccess About the /pages/index.php content: <?php include_once "../home.php" ?> About the /home.php cont...

How to adapt php page to jpolite2 template

Hi. I just discovered jpolite and think it looks very cool. I thought I would change my php page based on that. The problem is that I need allot of php code on each page to interpret _POST input and such. To do that I think I need to make index.html from jpolite, that normally just load different modules containing html like this: var ...

Determine if Magento module is enabled

What is the best way to determine if a particular module is enabled/active in Magento? I've tried using class_exists to check if my code has been loaded and parsed by PHP but lately I've noticed its pretty unreliable (returns true even when I delete the module's .xml configuration). Is there a core function I can call? ...

Joomla question about custom module

Hi, I'm very new to Joomla. I have a question about components/modules. I'm doing the development of a site for a firm and they provided me with custom news releases component that's supposed to show on the home page. From what I've seen, I can call modules to a page with "" based on their position. Do I do the same sort of thing to g...

Consdirations for making multiple handlers in same apache module or having seperate modules for each handler

I am writing an application where there are a bunch of handlers. I am trying to see if i should package these handlers within the same apache module or have a seperate module for each handler. I agree this is a generic question and would depend on my app, but i would like to know the general considerations that i have to make and also ...

how do python module variables work?

I used to think that once a module was loaded, no re-importing would be done if other files imported that same module, or if it were imported in different ways. For example, I have mdir/__init__.py, which is empty, and mdir/mymod.py, which is: thenum = None def setNum(n): global thenum if thenum is not None: raise ValueE...

Something quite tricky in a python exercise

I wrote a python script test1.py in which I import a module called test2, then in test2, I did import test1; when I run test1, it works correctly; to my very big suprise, when I try to run test2, it outputs exactlly the same result as I run test1, despite these two files have very very different contents. but when I remove import test2, ...

Python: Why should 'from <module> import *' be prohibited?

If you happen to have from <module> import * in the middle of your program (or module), you would get the warning: /tmp/foo:100: SyntaxWarning: import * only allowed at module level I understand why import * is discouraged in general (namespace invisibility), but there are many situations where it would prove convenient, especially...

Mapping module imports in Python for easy refactoring

I have a bunch of Python modules I want to clean up, reorganize and refactor (there's some duplicate code, some unused code ...), and I'm wondering if there's a tool to make a map of which module uses which other module. Ideally, I'd like a map like this: main.py -> task_runner.py -> task_utils.py -> deserialization.py -> file_...

jquery_update for Drupal does not get added to the page for non admin users

Hi, I have installed jQuery_update for Drupal because I needed an up to date version of the library. In my theme I have this line adds the scripts to my page: It works perfectly when I am logged in as an administrator. jQuery_update will appear in the source code and take control. The problem is when I am not authenticated: no jQuery ...