--- /dev/null
+#!/usr/bin/env python
+
+"""
+ Base class for running NextShare client instances
+ 2010, Adriana Draghici, adriana.draghici@cti.pub.ro
+"""
+
+import sys
+import os
+import os.path
+import logging
+from Util import *
+from BitTorrentClientRun import BitTorrentClientRun
+
+DEBUG = True
+
+
+class TriblerRun(BitTorrentClientRun):
+ def __init__(self, base_path):
+
+ os.environ["PYTHONPATH"] = base_path
+ BitTorrentClientRun.__init__(self, base_path,
+ "python $base_path/BaseLib/Tools/cmdlinedl.py -o $download_dir $torrent_file 2>> $log_dir/$log_file >> $output_dir/$output_file",
+ "python $base_path/Tribler/Tools/cmdlinedl.py -o $download_dir $torrent_file 2>> $log_dir/$log_file >> $output_dir/$output_file")
+
+ self.my_logger = logging.getLogger('autorun.NextShareRun')
+ self.my_logger.setLevel(logging.DEBUG)
+
+
+def main():
+
+ """
+ Test case
+ """
+
+ tr = TriblerRun("/home/p2p/p2p-clients/next-share")
+ tr.config_run("/home/p2p/p2p-dld/next-share",
+ "/home/p2p/p2p-log/next-share", "test.out",
+ "/home/p2p/p2p-log/next-share", "test.log",
+ 10150,0, 0, # port, dl, up limits
+ "/home/p2p/cs-p2p-next/testing/torrent-files/fedora13-i386-DVD.torrent")
+ tr.start()
+
+ tr.run_client(tr.simple_run_command, NEXTSHARE)
+
+if __name__ == "__main__":
+ sys.exit(main())