Subscribe: Sigabort's Weblog
http://sigabort.wordpress.com/feed/
Preview: Sigabort's Weblog

Sigabort’s Weblog



Some Cool and useful Stuff



Last Build Date: Thu, 26 Apr 2018 00:30:36 +0000

 



replace pattern recursively : Pythonsigabort

Wed, 28 May 2008 05:59:01 +0000

The following code replaces “patternA” by “patternB” for all files in a given directory recursively. “”” Replaces the patternA by patternB in a given directory recursively in each file “”” def replacePattern(pattern, file): “”” replace the given pattern in the file “”” (pattern1, pattern2) = pattern data = ” try: fd = open(file, ‘r+’) data […]


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G




Simple HTTPClient : Pythonsigabort

Wed, 28 May 2008 05:45:57 +0000

“”” A Simple HTTP Client: given url, fetches the response “”” import urllib2 import socket import httplib MAX_SOCK_TIME_OUT = 60 def getOpener(): “””Set the Headers””” # to avoid 401 Errors passwd_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() auth_handler = urllib2.HTTPBasicAuthHandler(passwd_mgr) opener = urllib2.build_opener(auth_handler) # to avoid 406 Errors opener.addheaders = [(‘Accept’, ‘*/’)] return opener def getResponse(url): “”” Get the […]


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G




Free Computer Science Video Lecturessigabort

Mon, 26 May 2008 12:55:21 +0000

Good computer science video lectures can be found at a. http://www.aduni.org/courses/ b. MIT CourseWare c. http://webcast.berkeley.edu/courses.php


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G




Flex-3: Using third-party libraries(flexvizgraphlib)sigabort

Mon, 26 May 2008 06:47:06 +0000

I had to do the following to use third-party libraries for Flex-3: — I was trying to use flexvizgraphlib. — After downloading it, I had to edit “frameworks/flex-config.xml” file to tell the Flex where the *.swc files for flexvizgraphlib are. — I had to add the following to element: flexvizgraphlib-read-only/ResDev/libs flexvizgraphlib-read-only/ResDev flexvizgraphlib-read-only/graphLayout/bin flexvizgraphlib-read-only/vgComponentLib/libs flexvizgraphlib-read-only/vgExplorer […]


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G




A Simple RSS Readersigabort

Mon, 26 May 2008 05:40:09 +0000

As part of learning python and action script, I wrote a simple RSS Reader. This includes the following: 1. A python server fetches the RSS Feeds and publishes them to the Flash object. 2. The reader (flash object) renders the received Feeds. 3. Right now, the reader does not automatically fetch the Feeds. The user […]


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G




Issues I faced Installing wxPython/GTK+sigabort

Sat, 24 May 2008 06:09:20 +0000

Are you installing wxPython on Linux? Beware of the following issues. wxPython needs : a. GTK+ b. GLIB c. Pango These need: TIFF Library, JPEG library, atk, Cairo Installing JPEG may not copy the include files to /usr/local/include/. You may have to copy the *.h manually. I had problem saying “X11/extensions/shape.h” missing. I had to […]


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G




Getting Child PIDs of a Process in Linuxsigabort

Fri, 23 May 2008 19:49:39 +0000

How do I find the child PIDs of a process? The following python code prints all the processes and their corresponding child processes. if __name__ == “__main__”: import commands #get the pids pids = commands.getoutput(‘ps -ewwaf | awk \'{print $2 ” ” $3}\”).split(‘\n’) #print pids #The list will have the list of [PID, PPID]s list […]


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G







Simple Threaded HTTPServer in pythonsigabort

Thu, 22 May 2008 18:19:10 +0000

import SimpleHTTPServer, SocketServer port=9090 #Change the reuse_address to True SocketServer.allow_reuse_address = True #create Threaded server instance server = SocketServer.ThreadingTCPServer(("localhost", port), SimpleHTTPServer.SimpleHTTPRequestHandler) #start serving the requests server.serve_forever()


Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G




Flex-3: How to display notes on mouse oversigabort

Wed, 21 May 2008 10:42:16 +0000

Q: How to display notes/help in case of “mouseOver” event for an object. For example, if I want to display some notes when I move my mouse to a “Label”. A: I found out that this can be done by using “toolTip” property of Label. Following MXML code is an example.
Media Files:
http://1.gravatar.com/avatar/a327a68364b2db81ac5c21f13fa4527d?s=96&d=identicon&r=G