diff --git a/examples/get-public-streams b/examples/get-public-streams index 8eb2e63..58fa1da 100755 --- a/examples/get-public-streams +++ b/examples/get-public-streams @@ -22,7 +22,7 @@ # SOFTWARE. import sys -import os +from os import path import optparse usage = """get-public-streams --user= [options] @@ -45,7 +45,7 @@ parser.add_option('--user', action='store') (options, args) = parser.parse_args() -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) +sys.path.append(path.join(path.dirname(__file__), '../..')) import api.common client = api.common.HumbugAPI(email=options.user, api_key=options.api_key, diff --git a/examples/list-subscriptions b/examples/list-subscriptions index 57a7abd..df91516 100755 --- a/examples/list-subscriptions +++ b/examples/list-subscriptions @@ -22,7 +22,7 @@ # SOFTWARE. import sys -import os +from os import path import optparse usage = """list-subscriptions --user= [options] @@ -45,7 +45,7 @@ parser.add_option('--user', action='store') (options, args) = parser.parse_args() -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) +sys.path.append(path.join(path.dirname(__file__), '../..')) import api.common client = api.common.HumbugAPI(email=options.user, api_key=options.api_key, diff --git a/examples/print-messages b/examples/print-messages index 2a8e7a7..afa2af0 100755 --- a/examples/print-messages +++ b/examples/print-messages @@ -22,7 +22,7 @@ # SOFTWARE. import sys -import os +from os import path import optparse usage = """print-messages --user= [options] @@ -45,7 +45,7 @@ parser.add_option('--user', action='store') (options, args) = parser.parse_args() -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) +sys.path.append(path.join(path.dirname(__file__), '../..')) import api.common client = api.common.HumbugAPI(email=options.user, api_key=options.api_key, diff --git a/examples/print-next-message b/examples/print-next-message index 191a570..f5e919f 100755 --- a/examples/print-next-message +++ b/examples/print-next-message @@ -22,7 +22,7 @@ # SOFTWARE. import sys -import os +from os import path import optparse usage = """print-next-message --user= [options] @@ -45,7 +45,7 @@ parser.add_option('--user', action='store') (options, args) = parser.parse_args() -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) +sys.path.append(path.join(path.dirname(__file__), '../..')) import api.common client = api.common.HumbugAPI(email=options.user, api_key=options.api_key, diff --git a/examples/send-message b/examples/send-message index 85d13cd..97b7b8d 100755 --- a/examples/send-message +++ b/examples/send-message @@ -22,7 +22,7 @@ # SOFTWARE. import sys -import os +from os import path import optparse usage = """send-message [options] @@ -54,7 +54,7 @@ parser.add_option('--type', if len(args) == 0: parser.error("You must specify recipients") -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) +sys.path.append(path.join(path.dirname(__file__), '../..')) import api.common client = api.common.HumbugAPI(email=options.sender, api_key=options.api_key, diff --git a/examples/subscribe b/examples/subscribe index 1f07cbb..d776941 100755 --- a/examples/subscribe +++ b/examples/subscribe @@ -22,7 +22,7 @@ # SOFTWARE. import sys -import os +from os import path import optparse usage = """subscribe --user= [options] --streams= @@ -49,7 +49,7 @@ parser.add_option('--user', action='store') (options, args) = parser.parse_args() -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) +sys.path.append(path.join(path.dirname(__file__), '../..')) import api.common client = api.common.HumbugAPI(email=options.user, api_key=options.api_key, diff --git a/examples/unsubscribe b/examples/unsubscribe index eaf7cc3..3dd363b 100755 --- a/examples/unsubscribe +++ b/examples/unsubscribe @@ -22,7 +22,7 @@ # SOFTWARE. import sys -import os +from os import path import optparse usage = """unsubscribe --user= [options] --streams= @@ -49,7 +49,7 @@ parser.add_option('--user', action='store') (options, args) = parser.parse_args() -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) +sys.path.append(path.join(path.dirname(__file__), '../..')) import api.common client = api.common.HumbugAPI(email=options.user, api_key=options.api_key,