I installed Yahoo BOSS (it's a python installation that allows you to use their search features). I followed everything perfectly. However, when I run the example, to confirm that it works, I got this:
$python ex3.py
Traceback (most recent call last):
File "ex3.py", line 16, in ?
from yos.yql import db
File "/usr/lib/python2.4...
So I am trying to import a module "foo" that contains directories "bar" and "wiz". "bar" contains python files a.py, b.py, and c.py. "wiz" contains python files x.py, y.py and z.py.
$ ls foo
__init__.py bar wiz
$ ls foo/bar
__init__.py a.py b.py c.py
$ ls foo/wiz
__init__.py x.py y.py z.py
In th...
Some functions are really easy to implement in OCaml (for example, map from a list) but you may use the map of the OCaml library: List.map
However, we can wonder which code will be more efficient. Calling a module of a separate compilation unit (a library) may void some possible optimizations. I read in the news group fa.caml that when ...
Can a python module have a __repr__? The idea would be to do something like:
import mymodule
print mymodule
EDIT: precision: I mean a user-defined repr!
...
Hello, I am new to joomla and I need to work on a joomla website for a school project. I modified an existing module to make it display featured projects and it does that flawlessly when I test the site locally. However, when I uploaded my files to the hosted copy of the website, the module will load but does not display anything. It jus...
I have a Python module with a function in it:
== bar.py ==
def foo(): pass
== EOF ==
And then I import it into the global namespace like so:
from bar import *
So now the function foo is available to me. If I print it:
print foo
The interpreter happily tells me:
<function foo at 0xb7eef10c>
Is there a way for me to find...
I want to be able to use a module kept in the lib directory of my source code repository, and I want the only prerequisite for a developer to use the scripts that I'm writing is to have a standard Perl installation, but I'm not sure how to accomplish this.
In my scripts, I have
use FindBin qw($Bin);
use lib "$Bin/lib"; # store non sta...
I need to limit access of content on Drupal site based on the Drupal User's Role.
http://site.com/managers/intro
http://site.com/managers/reviews
http://site.com/managers/up-for-raises
The content can be of multiple content types and isn't limited to one specific content-type. These content types will be used elsewhere on the site s...
I am looking for a way to get the same functionality as "Views Filter Block" ( see http://drupal.org/project/views%5Ffilterblock) but for Drupal 6. Taken from the description:
"The views_filterblock module basically moves the horizontal filter from the views page content area into a (vertical) block."
Anyone?
...
I encountered a problem when trying to test a module with Test::Unit. What I used to do is this:
my_module.rb:
class MyModule
def my_func
5 # return some value
end
end
test_my_module.rb:
require 'test/unit'
require 'my_module'
class TestMyModule < Unit::Test::TestCase
include MyModule
def test_my_func
assert_equal(...
I am refactoring a hugh action script solution in Flash builder (beta 2) using the flex 4 sdk.
The project does NOT use the mx framework.
What i want to have is:
A big 'MAIN' project
several small 'MODULE' projects. each 'MODULE' class refrences the 'MAIN' project as an External reference (doesnt compile into swf) - this is done by se...
I am having an issue with call Drupal node.save using MooTool's JSONP. Here is an example.
Here is my request:
callback Request.JSONP.request_map.request_1
method node.save
sessid 123123123123123
node {"type":"blog","title":"New Title","body":"This is the blog body"}
Here is my result
HTTP/1.0 500 Internal Server Error
I got this wo...
Is there any tool available to automatically convert Python 2.x scripts to Python 3.x? Or do you still have to convert it manually? 2.x-3.x auto-converter would be really helpful (to everyone else too, I guess).
Ofcourse I'm not looking to convert large programs, just about 8-10 modules.
Thanks
...
I'm unable to test-run a cssparser that I'd like to use.
test.py:
from css.parse import parse
data = """
em {
padding: 2px;
margin: 1em;
border-width: medium;
border-style: dashed;
line-height: 2.4em;
}
p { color: red; font-size: 12pt }
p:first-letter { color: green; font-size: 200% }
p:first-l...
I have a python module.
I want to populate some values to it at runtime, how do I do it.
Eg. I have a list,
['A', 'B', 'C']
I am creating there classes with these names, and want them to available as if I created them normally
for el in ['A', 'B', 'C']:
type(el, (object,), {})
...
deal all,
i am a newbie for writing Linux Kernel Module.
i used printk function in linux kernel source code (2.4.29) for debugging and display messages.
now, i have to read all the messages i added via httpd.
i tried to write the messages into a file instead of printk function, so i can read the file directly.
but it's not work ver...
I'm trying to write code like this:
assert_throws(:ExtractionFailed) { unit.extract_from('5 x 2005')}
ExtractionFailed is a trivial subclass of Exception, and under test/unit, I'm trying to assert that it is thrown when I call unit.extract_from(... bad data...)
I've moved ExtractionFailed into the SemanticText module, so now test/un...
As I understand, using modules allows us to control some dependencies.
I mean that we can allow one module to interact with another one but not vise versa. We also can make some reusable things and we can make deploying easier, if, for example, put all tests stuff into a separate module and won't deploy it to production.
I haven't eve...
Is there a way to limit the Filtered word match in the dotnetnuke forum to whole words only. For example, if the word 'bum' is a filtered word replaced by a '~' then the word 'bumble bee' is also affected becoming '~ble bee'
I'd like to limit to a full word match rather than a partial. Any help is most appreciated.
Thanks
...
Hi,
One of the best features of gwt is the edit/save/refresh development cycle. This has worked great when working with only one module. But what about when the application is broken down into multiple modules?
More specifically, we've moved towards a structure where we have a main ui module with an entry point and multiple additional...