Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-platform username #9

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
unittest
RELEASE-VERSION
*DS_Store
*.pyc
Expand Down
4 changes: 2 additions & 2 deletions hashpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

"""

from hashpype import HashPype, HashError
from doublecouple import DoubleCouple
from .hashpype import HashPype, HashError
from .doublecouple import DoubleCouple

__version__ = "0.5.6"

4 changes: 2 additions & 2 deletions hashpy/hashpype.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using this version of HASH.
"""
import os
from pwd import getpwuid
from getpass import getuser

import numpy as np

Expand Down Expand Up @@ -262,7 +262,7 @@ def __init__(self, **kwargs):
self.esaz = np.empty(npick0, float)
self.arid = np.empty(npick0, int) * 0

self.author = getpwuid(os.getuid()).pw_name
self.author = getuser()

if kwargs:
self.__dict__.update(kwargs)
Expand Down
6 changes: 3 additions & 3 deletions hashpy/tests/test_dbhash.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def dbhash_run(dbname, orid=None, pf=None):
try:
hp.driver2(check_for_maximum_gap_size=False)
except HashError as e:
print "Failed! " + e.message
print("Failed! " + e.message)
except:
raise

Expand Down Expand Up @@ -115,7 +115,7 @@ def save_plot_to_db(fmplotter, dbname=args.dbout, dump_bitmap=args.image):
p = FocalMechPlotter(ev, save=save_plot_to_db)
else:
# quick orid/strike/dip/rake line
print hp.output()
print(hp.output())
p = 0
if args.dbout:
db = hp.output(format="ANTELOPE", dbout=args.dbout)
Expand All @@ -128,4 +128,4 @@ def save_plot_to_db(fmplotter, dbname=args.dbout, dump_bitmap=args.image):
import time
t0 = time.time()
ret = main()
print time.time() - t0
print(time.time() - t0)
2 changes: 1 addition & 1 deletion hashpy/tests/test_hashpype.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/usr/bin/env python
#!/usr/bin/env python
#
# test_hashpype.py -MCW 2013
#
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
import os
import inspect
import setuptools #enables develop

from numpy.distutils.core import setup, Extension

Expand Down