The search for PHP IDEs

A short while ago I wrote about using Netbeans for my PHP development. I have been using it for a while until 1) the linux version of Netbeans begun hanging in mid code.

I got quickly tired of the inconsistencies between the windows versions and linux versions as I end up coding on both platforms.

Enter Aptana the IDE built specifically for dynamic scripted languages like PHP, ruby, python and such. Basically my neck of the woods. Aptana is about as heavy as netbeans as it is built on the eclipse platform. But the feature set in this IDE more than makes up for the weight of it.

It integrates nicely with my SSH, SVN, and FTP servers, which I basically need for my access, sync, and upload requirements respectively for most of my projects.

I am going to try this one out as well and see how it pans out. I am already impressed with it’s performance and feature set, so keep it tuned in for how it pans out.

My python scripts (1)

Recently I have had to do a few tasks that would have required a lot of man hours renaming files and creating xml documents.  First step was to remove any unwanted characters such as slashes quotes and so on.

print "Python script to clean up filenames removing any characters "
print "we do not want"
print "19 / 05 / 2009"
print "Arthur: K. Aning"
print " ------------------------------------- "
print
import os, time
unwantedchars = ("/","\\","'","\"") #you can always add to this list
directory = raw_input("What directory [eg: 'c:\\path\\to\\files']: ")
replacement = raw_input("Replacement Character? [default = ''] ")
for root, dirpath, fname in os.walk(directory):
    for files in fname:
        filepath = root+"\\"+files
        for char in unwantedchars:
            newfilename = files.replace(char, replacement)
        if(os.path.exists(filepath)):
            print "Renaming: "+newfilename
            #os.rename(filepath, newfilename)
            print "--------------------------------------------"
        else:
            print "did not find file: "+filepath
            print "skipping"
            time.sleep(0.5)