python

What are the required functionnalities of ETL frameworks ?

I am writing an ETL (in python with a mongodb backend) and was wondering : what kind of standard functions and tools an ETL should have to be called an ETL ? This ETL will be as general purpose as possible, with a scriptable and modular approach. Mostly it will be used to keep different databases in sync, and to import/export datasets ...

How to use the same widget twice in pygtk?

This doesn't work well: image_log = gtk.Image() image_log.set_from_file("test.png") self.out_button = gtk.Button() self.out_button.add(image_log) self.err_button = gtk.Button() self.err_button.add(image_log) another_box.pack_start(self.out_button, False) another_box.pack_start(self.err_button, False) ...

Creating a single exe file from Python code

Possible Duplicate: py2exe - generate single executable file A friend of mine managed to pack some a Ruby script he wrote in a single exe file. When I tried to do the same thing for a Python script, with py2exe, I also got several pyd files and a dll. Is it possible to pack a Python script with all it's DLL's and pyd files int...

Python and data mining

Iam learning data mining and wondered how Python figures when it comes to data mining? Are there good tools for data mining in python? ...

Grant anonymous access to a specific url/action in Plone

I am running Plone 3.2.3 and I have installed HumaineMailman so that the users on the website can subscribe and unsubscribe themselves from our various mailinglists. HumaineMailman works very simple. There is a special URL/action that gives you a plain text list of all e-mail addresses that are subscribed on a list. For example: http://...

Vim python's buffer.append(line) switch window's focus

Hello Guys, I am trying to fill Vim's buffer from separate thread by using this python code. python << PYTHON_CODE import vim import time buffer_number = -1 class AppendLineTest( Thread ): def run(self): buffer = vim.buffers[buffer_number - 1] for i in range(10): buffer.append('Line number %s' % i) t...

Is it possible to use Panda3D inside a wxPython app?

I'm developing a wxPython application. Will it be possible to embed a 3D animation controlled by Panda3D inside the gui? Bonus question: Do you think that Panda3D is the best choice? (My interest is physical simulations, and no, I don't need an engine that supports Physics, my program is responsible for calculating the physics, I just n...

to restrict parameter values strictly with in bounds

Hi, I am trying to optimize a function using l_bfgs constraint optimization routine in scipy. But the optimization routine passes values to the function, which are not with in the Bounds. my full code looks like, def humpy(aParams): aParams = numpy.asarray(aParams) print aParams #### # connect to some other software for simulation...

How to determinate: Is Python variable is instance of built-in type?

I need to determinate is Python variable is instance of native type: str, int, float, bool, list, dict and so on. Is there elegant way to doing it? Or if myvar in (str, int, float, bool): are only way to do it? ...

gotchas where Numpy differs from straight python ?

Folks, is there a collection of gotchas where Numpy differs from python, points that have puzzled and cost time ? "The horror of that moment I shall never never forget !" "You will, though," the Queen said, "if you don't make a memorandum of it." For example, NaNs are always trouble, anywhere. If you can explain this without...

Django Admin - Bulk editing data?

Are there any admin extensions to let bulk editing data in Django Admin? (ie. Changing the picture fields of all product models at once. Note that this is needed for a users POV so scripting doesn't count.) Any thoughts on subject welcome. ...

python time format check

Hello At python, I want to check if the input string is in "HH:MM" such as 01:16 or 23:16 or 24:00. Giving true or false by the result. How can I achieve this by using regular expression ? ...

Python - How to edit hexadecimal file byte by byte

I want to be able to open up an image file and extra the hexadecimal values byte-by-byte. I have no idea how to do this and googling "python byte editing" and "python byte array" didn't come up with anything, surprisingly. Can someone point me towards the library i need to use, specific methods i can google, or tutorials/guides? ...

Ipython common problems

I love iPython's so many features, magic functions. I recently upgraded to the latest 0.10 version. But I face following common problems: %hist one of the most frequently used magic functions, doesn't exist. dreload doesn't seems to work (works only for modules?). run -d for debugging doesn't work At times, typed characters are not di...

What numbers can you pass as verbosity in running Python Unit Test Suites?

The Python unittest framework has a concept of verbosity that I can't seem to find defined anywhere. For instance, I'm running test cases like this (like in the documentation): suite = unittest.TestLoader().loadTestsFromTestCase(MyAwesomeTest) unittest.TextTestRunner(verbosity=2).run(suite) The only number I've ever seen passed as ver...

What would be the best way to use python's functions from excel ?

Somebody really needs to fix this "subjective questions evaluator" I usually compile my functions in a DLL and call them from excel. That works fine (well, let's just say it works) Unfortunatelly, python cannot be compiled. I know of py2exe but I don't know that it can make a DLL. So, ..., is there any other way ? I appreciate all ide...

Finding "closest" strings in a Python list (alphabetically)

Hello, I have a Python list of strings, e.g. initialized as follows: l = ['aardvark', 'cat', 'dog', 'fish', 'tiger', 'zebra'] I would like to test an input string against this list, and find the "closest string below it" and the "closest string above it", alphabetically and case-insensitively (i.e. no phonetics, just a<b etc). If the...

Multiprocessing with renewable queue

I'm trying to figure out how to write a program in python that uses the multiprocessing queue. I have multiple servers and one of them will provide the queue remotely with this: from multiprocessing.managers import BaseManager import Queue import daemonme queue = Queue.Queue() class QueueManager(BaseManager): pass daemonme.creat...

How to extend and modify PyUnit

I'm about to embark upon extending and modifying PyUnit. For instance, I will add warnings to it, in addition to failures. I'm interested in hearing words of advice on how to start, for instance, subclass every PyUnit class? What to avoid and misc caveats. Looking for input from those that have extended PyUnit already. ...

Getting Wing IDE to stop catching the exceptions that wxPython catches

I started using Wing IDE and it's great. I'm building a wxPython app, and I noticed that Wing IDE catches exceptions that are usually caught by wxPython and not really raised. This is usually useful, but I would like to disable this behavior occasionally. How do I do that? ...