Forum Discussion
Justin_Adrian_3
Nimbostratus
Aug 18, 2009pyControl and py2exe
I am currently developing a quick and dirty check for our code promotion folks in where they just enter a VIP and it displays back the status of the pools.
I am currently developing this using wxPython and it works great on linux and windows guests.
This is assuming you have the development packages installed.
I know python has the deploying functionality to compile or merge all python libraries and support dll's for windows for a quick an dirty deployment.
I am having issues however making this work as the pyControl is an egg, and those eggs sure act rotten at times. I am making an effort to not require having the full python, + pyControl, + wxPython install on the machines I wish the app to run.
Anybody have any success??
I attached a quick peek at what it looks like..
--J
15 Replies
- Let me know if you can't get it working. I can whip up a C windows GUI app in a matter of minutes that I can put the CodeShare. In fact, maybe I will so that others in the Microsoft development world can benefit from it as well.
If you do get deployment packages working, please let us know as I'm sure others would be glad to hear about it.
-Joe - L4L7_53191
Nimbostratus
What is the specific error you're seeing?
-Matt - Justin_Adrian_3
Nimbostratus
The compile works fine.
When I go to run the executable, I am challenged with:
Traceback (most recent call last):
File "f5_Vip_Status_Gui.py", line 115, in
File "zipextimporter.pyo", line 82, in load_module
File "pycontrol\pyControl.pyo", line 54, in
File "pkg_resources.pyo", line 841, in resource_filename
File "pkg_resources.pyo", line 1303, in get_resource_filename
NotImplementedError: resource_filename() only supported for .egg, not .zip
--J - L4L7_53191
Nimbostratus
Ah yes. This is a problem with the resource_filename() method from the pkg_resources module. A possible workaround (taken from http://osdir.com/ml/python.distutils.devel/2005-10/msg00043.html) is to include the pycontrol egg in the zip file. If you do this, I'd try and yank as many of the WSDLS out of the WSDL_CACHE_DIR as possible to keep your package small.
I may be able to patch this, although using resource_filename() in pkg_resources was a big time saver for us so I'll need to look into another way of doing it that's more friendly for this type of thing but just as portable.
-Matt - Justin_Adrian_3
Nimbostratus
Ok, so in the actual zip, include the compressed egg? or a uncompressed directory with same name as the egg.
I want to say I tried both, I will try again.
Thx.
--J - L4L7_53191
Nimbostratus
I believe you add the uncompressed egg to the zip. In the meantime I think I may be able to fix this, although it'll be hard to carve out some time - this month is real busy...I'll give it another look tonight.
-Matt - Justin_Adrian_3
Nimbostratus
Much appreciated.
Once I am comfortable, I will defiantly share my code/hack/app.. (pick the appropriate word here).
This is a learning experience for me, but I am rather pleased with the output.
Thanks again.
--J - As promised, here's a little Windows app I put together that let's you view pool members via virtual server default pools or from the full pool listing. I've added right click support on the listview (right pane) to enable you to bulk enable/disable as a bonus. Enjoy!
The source and binaries can be found here:http://devcentral.f5.com/downloads/codeshare/VSStatus.zip
Click here
-Joe - JRahm
Admin
Nice work Joe! - Good point B-) Obviously the tree view isn't optimal for 100+ objects. What was I thinking! Any idea on the best way to present it? I can easily modify the app to go another route.
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
