[nanny] Initial nanny-daemon-win.py
- From: Roberto Majadas <telemaco src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nanny] Initial nanny-daemon-win.py
- Date: Sun, 23 Jan 2011 18:00:30 +0000 (UTC)
commit 73a61b3951051958d1b5cca657dc303de45f1782
Author: Roberto Majadas <roberto majadas openshine com>
Date: Tue Sep 14 19:19:02 2010 +0200
Initial nanny-daemon-win.py
daemon/Makefile.am | 6 +++++-
daemon/nanny-daemon-win.py | 29 +++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index c730102..3babaf1 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -3,5 +3,9 @@ SUBDIRS=data src
tapdir = $(datadir)/nanny/daemon
tap_DATA = nanny.tap
-EXTRA_DIST=$(tap_DATA)
+if NANNY_WIN32_SUPPORT
+sbin_SCRIPTS = nanny-daemon-win.py
+endif
+
+EXTRA_DIST=$(tap_DATA) nanny-daemon-win.py
diff --git a/daemon/nanny-daemon-win.py b/daemon/nanny-daemon-win.py
new file mode 100644
index 0000000..300dd63
--- /dev/null
+++ b/daemon/nanny-daemon-win.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+# Copyright (C) 2009 Roberto Majadas, Cesar Garcia, Luis de Bethencourt
+# <openshine.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+import os
+import sys
+
+#Add nanny module to python paths
+root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+nanny_lib_path = os.path.join(root_path, "lib", "python2.6", "site-packages")
+sys.path.append(nanny_lib_path)
+
+print sys.path
+import nanny
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]