Beispiel #1
0
    #def global_error(self, level, text):
    #    self.d.error(text)

    #def error(self, torrent, level, text):
    #    self.d.error(text)

    def failed(self, torrent, is_external):
        self.doneflag.set()

    def finished(self, torrent):
        self.d.finished()


if __name__ == '__main__':
    uiname = 'anondownloadcurses'
    defaults = get_defaults(uiname)

    if len(sys.argv) <= 1:
        printHelp(uiname, defaults)
        sys.exit(1)
    try:
        config, args = configfile.parse_configuration_and_args(defaults,
                                       uiname, sys.argv[1:], 0, 1)
        if args:
            if config['responsefile']:
                raise BTFailure, 'must have responsefile as arg or ' \
                      'parameter, not both'
            config['responsefile'] = args[0]
        try:
            if config['responsefile']:
                h = file(config['responsefile'], 'rb')
Beispiel #2
0
assert sys.version_info >= (2, 3), "Install Python 2.3 or greater"

from threading import Event

import gtk
import gobject

from Anomos.GUI import *
from Anomos import Desktop
from Anomos import version
from Anomos import configfile
from Anomos.defaultargs import get_defaults
from Anomos.makemetafile import make_meta_files
from Anomos.parseargs import makeHelp

defaults = get_defaults('makeatorrentgui')
defconfig = dict([(name, value) for (name, value, doc) in defaults])
del name, value, doc


class MainWindow(Window):

    def __init__(self, config, parent=None):
        Window.__init__(self)
        if parent is None:
            self.mainwindow = self # temp hack to make modal win32 file choosers work
        else:
            self.mainwindow = parent # temp hack to make modal win32 file choosers work
        self.connect('destroy', self.quit)
        self.set_title('%s metafile creator %s'%(app_name, version))
        self.set_border_width(SPACING)
Beispiel #3
0
    #def global_error(self, level, text):
    #    self.d.error(text)

    #def error(self, torrent, level, text):
    #    self.d.error(text)

    def failed(self, torrent, is_external):
        self.doneflag.set()

    def finished(self, torrent):
        self.d.finished()


if __name__ == '__main__':
    uiname = 'anondownloadcurses'
    defaults = get_defaults(uiname)

    if len(sys.argv) <= 1:
        printHelp(uiname, defaults)
        sys.exit(1)
    try:
        config, args = configfile.parse_configuration_and_args(
            defaults, uiname, sys.argv[1:], 0, 1)
        if args:
            if config['responsefile']:
                raise BTFailure, 'must have responsefile as arg or ' \
                      'parameter, not both'
            config['responsefile'] = args[0]
        try:
            if config['responsefile']:
                h = file(config['responsefile'], 'rb')
Beispiel #4
0
assert sys.version_info >= (2, 3), "Install Python 2.3 or greater"

from threading import Event

import gtk
import gobject

from Anomos.GUI import *
from Anomos import Desktop
from Anomos import version
from Anomos import configfile
from Anomos.defaultargs import get_defaults
from Anomos.makemetafile import make_meta_files
from Anomos.parseargs import makeHelp

defaults = get_defaults('makeatorrentgui')
defconfig = dict([(name, value) for (name, value, doc) in defaults])
del name, value, doc


class MainWindow(Window):
    def __init__(self, config, parent=None):
        Window.__init__(self)
        if parent is None:
            self.mainwindow = self  # temp hack to make modal win32 file choosers work
        else:
            self.mainwindow = parent  # temp hack to make modal win32 file choosers work
        self.connect('destroy', self.quit)
        self.set_title('%s metafile creator %s' % (app_name, version))
        self.set_border_width(SPACING)