Python - creating directories after button click
<p>I'm a bit new to Python so forgive the ignorance.</p>

<p>I am currently toying with a little app to create directories based on user input. I have made a bash script that does this perfectly but would like put a GUI on it.</p>

<p>So far i have got this function that works:</p>

<pre><code>def on_TextEntry_activate(self, widget):
    ParentFolder = widget.get_text()
    os.chdir("/home/user/folder/")
    if not os.path.exists(ParentFolder):
        os.makdirs(ParentFolder), 0755)
    os.chdir(ParentFolder)
    os.makedirs("FolderA", 0755)
    os.makedirs("FolderB", 0755)
    os.makedirs("FolderC", 0755)
    print "Your new folders have been created"
</code></pre>

<p>So, like i said, this particular function works. What i would like to happen is to have a "create" button that runs this function instead of the text entry box doing it. As i would eventually like to add other text entry box for other things but that's more than likely going to be another post though!!</p>

<p>So if you could then that would be great .. please be gentle with me! :D</p>

<p>Thanks in advance.</p>