| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/11490/root/usr/bin/ |
Upload File : |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# GNOME Sudoku is a simple sudoku generator and player. Sudoku is a
# japanese logic puzzle. This is the startup script which imports
# the relevant modules. Please keep the startup script in sync
# between glChess and gnome-sudoku.
#
# Copyright (c) 2005 Tom Hinkle You may use and distribute this
# software under the terms of the GNU General Public License, version
# 2 or later.
# Ignore any exceptions writing to stdout using print statements
class SafeStdout:
def __init__(self):
self.stdout = sys.stdout
def fileno(self):
return self.stdout.fileno()
def write(self, data):
try:
self.stdout.write(data)
except:
pass
import sys
sys.stdout = SafeStdout()
# Setup bugbuddy to report unhandled exceptions.
try:
import bugbuddy
bugbuddy.install('gnome-sudoku')
except:
#No bugbuddy support
pass
import sys
try:
# Import gnome-sudoku module from source distribution.
import lib;
sys.modules["gnome_sudoku"] = sys.modules["lib"];
from gnome_sudoku.gnome_sudoku import start_game
except ImportError:
try:
# Import gnome-sudoku from pyexecdir or system installation.
from gnome_sudoku.gnome_sudoku import start_game
except ImportError:
# Import of gnome-sudoku failed. Show error message.
import gtk
import os.path
import gettext
from gettext import gettext as _
gettext.bindtextdomain('gnome-games', os.path.join('/usr', 'share', 'locale'))
gettext.textdomain('gnome-games')
title = _("Sudoku incorrectly installed")
description = _("""Sudoku is not able to start because required application files are not installed. If you are currently upgrading your system please wait until the upgrade has completed.""")
dialog = gtk.MessageDialog(type = gtk.MESSAGE_ERROR, message_format = title)
dialog.format_secondary_text(description)
dialog.add_button(gtk.STOCK_QUIT, gtk.RESPONSE_CLOSE)
dialog.run()
sys.exit(0)
start_game()