pyXAMPP Control Panel v0.1 released

for latest package and info’s, see: http://code.emka.web.id/index.php/pyxampp/

pyXAMPP is a simple foolish XAMPP for Linux Control Panel (see http://www.apachefriends.org). This is is a simple dialog to start, stop and reload the XAMPP server. This is pure writed in python and GTK+. Please install python and GTK+ to used it.

Screenshoot

pyXAMPP – main dialog

pyXAMPP – About dialog

Sourcecode

#!/usr/bin/python

# pyXAMPP Control Panel
#
# a simple foolish Linux XAMPP Control Panel (dont blame me please :D )
#
#
# author: Luthfi Emka
# website: http://code.emka.web.id/index.php/pyxampp
# version: 0.1

import gtk
import subprocess

class PyApp(gtk.Window):
    def __init__(self):
        super(PyApp, self).__init__()

        self.set_size_request(400, 200)
        self.set_position(gtk.WIN_POS_CENTER)
        self.connect("destroy", gtk.main_quit)
        self.set_title("pyXAMPP Control Panel")

        table = gtk.Table(2, 2, True);

        startlampp	= gtk.Button("Start Apache-MySQL")
        stoplampp	= gtk.Button("Stop Apache-MySQL")
        restartlampp	= gtk.Button("Restart Apache-MySQL")
        aboutdlg	= gtk.Button("About")

        startlampp.connect("clicked", self.on_startlampp)
        stoplampp.connect("clicked", self.on_stoplampp)
        restartlampp.connect("clicked", self.on_restartlampp)
        aboutdlg.connect("clicked", self.on_aboutdlg)

        table.attach(startlampp, 0, 1, 0, 1)
        table.attach(stoplampp, 1, 2, 0, 1)
        table.attach(restartlampp, 0, 1, 1, 2)
        table.attach(aboutdlg, 1, 2, 1, 2)

        self.add(table)
        self.show_all()

    def on_startlampp(self, widget):
        md = gtk.MessageDialog(self,
            gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
            gtk.BUTTONS_CLOSE, "Apache-MySQL server started...")
        subprocess.call(["/opt/lampp/lampp", "start"]);
        md.run()
        md.destroy()

    def on_stoplampp(self, widget):
        md = gtk.MessageDialog(self,
            gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
            gtk.BUTTONS_CLOSE, "Apache-MySQL server stopped...")
        subprocess.call(["/opt/lampp/lampp", "stop"]);
        md.run()
        md.destroy()

    def on_restartlampp(self, widget):
        md = gtk.MessageDialog(self,
            gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
            gtk.BUTTONS_CLOSE, "Apache-MySQL server restarted...")
        subprocess.call(["/opt/lampp/lampp", "restart"]);
        md.run()
        md.destroy()

    def on_aboutdlg(self, widget):
        md = gtk.MessageDialog(self,
            gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
            gtk.BUTTONS_CLOSE, "v0.1 \n\npyXAMPP Control Panel is a simple foolish control panel for XAMPP Linux. \n\n(c) 2012 Luthfi Emka, emka.web.id. \nLicense: GPLv2. \n\nhttp://code.emka.web.id/index.php/pyxampp")
        md.run()
        md.destroy()

PyApp()
gtk.main()

Download

via emka.web.id: https://emka.web.id/wp-content/uploads/2012/10/xampp-panel.zip

See yaa…

Wagiman Wiryosukiro

Petani Sistem Informasi, tukang las plugin & themes Wordpress. Co-Founder SistemInformasi.biz. Saat ini aktif sebagai Developer & kontributor di OpenMandriva Linux.

You may also like...

2 Responses

  1. Benyamin says:

    gimana cara installnya, udh dalam bentuk debian ta?

    • admin says:

      just copy dan ekstrak ke direktori /usr/bin. jangan lupa chmod +x supaya bisa dieksekusi. belum sempat bikin .deb dan .rpmnya mas ben…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: