Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cyberqinterface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
__author__ = 'Bryan Kemp'
__license__ = 'BSD New'

from cyberqinterface import CyberQInterface
from cyberqinterface_exceptions import *
from .cyberqinterface import CyberQInterface
from .cyberqinterface_exceptions import *

def debug(enable=True, level=1):
"""
Expand Down
14 changes: 7 additions & 7 deletions cyberqinterface/cyberqinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import requests
from lxml import objectify

from cyberqinterface_exceptions import *
from .cyberqinterface_exceptions import *

class CyberQInterface:
"""
Expand Down Expand Up @@ -173,7 +173,7 @@ def _validateParameters(self, parameters):
'COOK_SET' : '300'})
"""
badParameters = {}
for key in parameters.keys():
for key in list(parameters.keys()):
if key not in self.validParameters:
badParameters[key] = "Not a valid parameter"
return badParameters
Expand Down Expand Up @@ -334,7 +334,7 @@ def _lookup(self, table, code):
if isinstance(code, objectify.IntElement):
code = int(code)

if not codes.has_key(table):
if table not in codes:
raise LookupException("No lookup table for: %s", table)
try:
return codes[table][code]
Expand Down Expand Up @@ -450,9 +450,9 @@ def rampLookup(self, code):
help(CyberQInterface)

if args.version == True:
print "Version: %s" % __version__
print "Last Modified: %s" % __date__
print("Version: %s" % __version__)
print("Last Modified: %s" % __date__)

if args.license == True:
print "License: %s" % __license__
print __license_text__
print("License: %s" % __license__)
print(__license_text__)
24 changes: 12 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
master_doc = 'index'

# General information about the project.
project = u'CyberQInterface'
copyright = u'2013, The Brilliant Idea'
project = 'CyberQInterface'
copyright = '2013, The Brilliant Idea'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -183,8 +183,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'CyberQInterface.tex', u'CyberQInterface Documentation',
u'Bryan Kemp', 'manual'),
('index', 'CyberQInterface.tex', 'CyberQInterface Documentation',
'Bryan Kemp', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -213,8 +213,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'cyberqinterface', u'CyberQInterface Documentation',
[u'Bryan Kemp'], 1)
('index', 'cyberqinterface', 'CyberQInterface Documentation',
['Bryan Kemp'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -227,8 +227,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'CyberQInterface', u'CyberQInterface Documentation',
u'Bryan Kemp', 'CyberQInterface', 'One line description of project.',
('index', 'CyberQInterface', 'CyberQInterface Documentation',
'Bryan Kemp', 'CyberQInterface', 'One line description of project.',
'Miscellaneous'),
]

Expand All @@ -245,10 +245,10 @@
# -- Options for Epub output ---------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = u'CyberQInterface'
epub_author = u'Bryan Kemp'
epub_publisher = u'Bryan Kemp'
epub_copyright = u'2013, Bryan Kemp'
epub_title = 'CyberQInterface'
epub_author = 'Bryan Kemp'
epub_publisher = 'Bryan Kemp'
epub_copyright = '2013, Bryan Kemp'

# The language of the text. It defaults to the language option
# or en if the language is not set.
Expand Down
14 changes: 7 additions & 7 deletions src/CyberQInterface/cyberqinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import requests
from lxml import objectify

from cyberqinterface_exceptions import *
from .cyberqinterface_exceptions import *

class CyberQInterface:
"""
Expand Down Expand Up @@ -173,7 +173,7 @@ def _validateParameters(self, parameters):
'COOK_SET' : '300'})
"""
badParameters = {}
for key in parameters.keys():
for key in list(parameters.keys()):
if key not in self.validParameters:
badParameters[key] = "Not a valid parameter"
return badParameters
Expand Down Expand Up @@ -334,7 +334,7 @@ def _lookup(self, table, code):
if isinstance(code, objectify.IntElement):
code = int(code)

if not codes.has_key(table):
if table not in codes:
raise LookupException("No lookup table for: %s", table)
try:
return codes[table][code]
Expand Down Expand Up @@ -418,9 +418,9 @@ def rampLookup(self, code):
help(CyberQInterface)

if args.version == True:
print "Version: %s" % __version__
print "Last Modified: %s" % __date__
print("Version: %s" % __version__)
print("Last Modified: %s" % __date__)

if args.license == True:
print "License: %s" % __license__
print __license_text__
print("License: %s" % __license__)
print(__license_text__)
24 changes: 12 additions & 12 deletions src/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
master_doc = 'index'

# General information about the project.
project = u'CyberQInterface'
copyright = u'2013, The Brilliant Idea'
project = 'CyberQInterface'
copyright = '2013, The Brilliant Idea'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -183,8 +183,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'CyberQInterface.tex', u'CyberQInterface Documentation',
u'Bryan Kemp', 'manual'),
('index', 'CyberQInterface.tex', 'CyberQInterface Documentation',
'Bryan Kemp', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -213,8 +213,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'cyberqinterface', u'CyberQInterface Documentation',
[u'Bryan Kemp'], 1)
('index', 'cyberqinterface', 'CyberQInterface Documentation',
['Bryan Kemp'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -227,8 +227,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'CyberQInterface', u'CyberQInterface Documentation',
u'Bryan Kemp', 'CyberQInterface', 'One line description of project.',
('index', 'CyberQInterface', 'CyberQInterface Documentation',
'Bryan Kemp', 'CyberQInterface', 'One line description of project.',
'Miscellaneous'),
]

Expand All @@ -245,10 +245,10 @@
# -- Options for Epub output ---------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = u'CyberQInterface'
epub_author = u'Bryan Kemp'
epub_publisher = u'Bryan Kemp'
epub_copyright = u'2013, Bryan Kemp'
epub_title = 'CyberQInterface'
epub_author = 'Bryan Kemp'
epub_publisher = 'Bryan Kemp'
epub_copyright = '2013, Bryan Kemp'

# The language of the text. It defaults to the language option
# or en if the language is not set.
Expand Down