I am developing a Python package using a text editor and IPython. Each time I change any of the module code I have to restart the interpreter to test this. This is a pain since the classes I am developing rely on a context that needs to be re-established on each reload.
I am aware of the reload() fuction, but this appears to be frowned ...
I've got a problem trying to get python to accept an import 'globally'
In a module it needs to import another module depending on another variable but it doesn't seem to import it into all of the module functions if i have it in the start function; for example:
def start():
selected = "web"
exec("from gui import " + selected + ...
I'm writing a Drupal module that deals with creating new nodes from CSV files. The way I've been doing it currently, the user provides a node type, and my module goes to the database to find the fields for that node.
After the user matches the node fields to the CSV fields, I want to validate the data. This requires finding out the typ...
I'm writing a custom plugin thing which needs to search the product catalog. Based on some sample code I saw somewhere (possibly this site), I came up with this working prototype:
$searcher = Mage::getSingleton('catalogsearch/advanced')
-> addFilters(array('name' => $_REQUEST['name']))
-> addFilters(array('sku' => $_REQUEST['sku'...
I think my brain died, but I thought there was a simple way of using 'Modules' in Ruby to create a namespace for my own classes - or did I dream that ?
What I'm after is the Ruby equivalent to the Java-way of putting my class defs in a package ...
Or do I have to just invent a new name for my objects ???
...
I am trying to create a file in Apache for writing debugging messages (Just to write some log messages).. But unable to create a file under Apache module.
Just check out my code & kindly help me out!
Do advice me with a code snippet, is there any way to log debugging messages under Apache??
============
(Header files are removed for ...
from here I got an idea about how using variables from other modules. this all works fine with
import foo as bar
But I don't want to import my modules as "bar" I want to use it without any prefix like
from foo import *
Using this it´s impossible to modify variables from other modules. reading will work! any idea? suggestions?
...
I need to execute a Python script from an already started Python session, as if it were launched from the command line. It should be similar to doing source in bash or sh.
...
I'm trying to print the book navigation in a block in a drupal book node.
This is the previous/next pager and the list of child nodes, templated in book-navigation.tpl.php.
Is it something like?
print $node->book_navigation ?
(I already loaded the node so no worries there).
Here's what I discovered when I did a variable dump. This g...
Hello,
When writing python modules, is there a way to prevent it being imported twice by the client codes? Just like the c/c++ header files do:
#ifndef XXX
#define XXX
...
#endif
Thanks very much!
...
Greetings all helpers!
I have been reading and testing Drupal features recently and I find this CMS very scalable and interesting. I began working with themes, views, content types and ect... but I am looking for something I cannot find on the internet.
Context : I am creating a new website for one non-profit organization of mine for t...
First of all I want to state that I've just started with Drupal so I'm a noob.
I'll try to explain what I think is a powerful URL and Alias system.
Lets say we have some structured content with some subcontent shared between main sections.
The main sections could be Visitor, Customer and Website. Now every main section has it's own men...
Hello Fellow stackoverflowers,
I´m stuck writing a piece of code.
I have application with a viewstack witch load 5 modules.
each module is loaded via the moduleLoader tag and they all have an id.
Every loaded module has a context menu. the context menu has 5 menuItems.
one menuItem for each view for the viewstack.
The context menu is ...
Hi there.
I have a plugin module that extends the AR with a before_save callback to log all changes made into a relating acts_as_commentable comment. This works fine.
However, I want to add more details to the comment such as who made the change etc. I have made a couple of fields available to the model instance log_message and log_ow...
Any good software modules, or combination of them, where one can key in sales figures from the excel, then upload them to a web app for user to see? User access need to be controlled to the sales item level, or a group of sales items.
Ideally, the web app can hosted for cheap price. Thus, I suppose PHP related modules would be better.
...
I'm playing with Modules and they work as advertised: the module swf's ares
built and deployed in the output directories automatically.
My problem is that if I use descendants of mx:Module, the IDE does NOT do all
this nice work for me. I've listed the module in the Flex Modules section of the
project properties, but still nothing.
I'm...
How can I check if a Perl module is part of the core - i.e. it is part of the standard installation?
I'm looking for:
a command-line command:
a Perl subroutine/function to check within code
Thanks in advance.
Update
Perhaps I should re-write the question to be: "How can I tell what modules were originally provided with the specifi...
I'm a complete newbie to nInject
I've been pulling apart someone else's code and found several instances of nInject modules - classes that derive from Ninject.Modules.Module, and have a load method that contains most of their code.
These classes are called by invoking the LoadModule method of an instance of StandardKernel and passing i...
I tried to install a Python module by typing: sudo python setup.py install
After I typed this command I got a lot of output to the screen.
The lest few lines are bellow:
writing manifest file 'scikits.audiolab.egg-info/SOURCES.txt'
removing '/usr/lib/python2.5/site-packages/scikits.audiolab-0.10.2-py2.5.egg-info' (and everything under i...
I want to install Realplexor (a Perl comet server) on Mac and it requires
# apt-get install libevent-dev gcc
# perl -MCPAN -e "install Event::Lib"
I installed the first one using:
port install libevent
but I can't find "Event::Lib" with port nor fink.
Does anyone know how I could install that dependency?
...