Пример #1
0
        # connect factory to this host and port
        reactor.connectTCP('unlimited.newshosting.com', 9000, nsf)
        #reactor.connectTCP('unlimited.newshosting.com', 9000, nsf)
        #reactor.connectTCP('unlimited.newshosting.com', 9000, nsf)
        #reactor.connectTCP('unlimited.newshosting.com', 9000, nsf)
    
        # run
        #reactor.run()
        print 'running'
        reactor.run(installSignalHandlers = False)
# ---------------------------------------------------------------------------

if __name__ == '__main__3':
    nzbq = NZBSegmentQueue()
    print 'k'
    nzbq.parseNZB(sys.argv[1])
    while 1:
        try:
            #print nzbq.get(True)[1].__repr__()
            print nzbq.get()
        except:
            print 'doh'
            break
            
#if __name__ == '__main__':
if __name__ == '__main__2':
        import sys
        #(newsgroups, posts) = ParseNZB(sys.argv[1], [1, 2])
        (newsgroups, posts) = ParseNZB(sys.argv[1])
        for n in newsgroups:
                print 'n: ' + n
Пример #2
0
        #reactor.connectTCP('unlimited.newshosting.com', 9000, nsf)
        #reactor.connectTCP('unlimited.newshosting.com', 9000, nsf)
        #reactor.connectTCP('unlimited.newshosting.com', 9000, nsf)

        # run
        #reactor.run()
        print 'running'
        reactor.run(installSignalHandlers=False)


# ---------------------------------------------------------------------------

if __name__ == '__main__3':
    nzbq = NZBSegmentQueue()
    print 'k'
    nzbq.parseNZB(sys.argv[1])
    while 1:
        try:
            #print nzbq.get(True)[1].__repr__()
            print nzbq.get()
        except:
            print 'doh'
            break

#if __name__ == '__main__':
if __name__ == '__main__2':
    import sys
    #(newsgroups, posts) = ParseNZB(sys.argv[1], [1, 2])
    (newsgroups, posts) = ParseNZB(sys.argv[1])
    for n in newsgroups:
        print 'n: ' + n