Skip to content
Commits on Source (2)
......@@ -18,3 +18,38 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
dlg = wx.TextEntryDialog(parent, _('Enter your name:'),_('New user'),'',
style=wx.OK | wx.CANCEL)
while dlg.ShowModal()==wx.ID_OK:
--- a/p_rotor.py
+++ b/p_rotor.py
@@ -160,7 +160,7 @@ class newrotor(object):
positions.append(rand(i))
erotor = id_rotor[:]
drotor = id_rotor[:]
- drotor[i] = erotor[i] = 1 + 2*rand(i/2) # increment
+ drotor[i] = erotor[i] = 1 + 2*rand(i//2) # increment
while i > 1:
r = rand(i)
i -= 1
@@ -200,9 +200,9 @@ def random_func(key):
# Oh, dear, for compatibility, we must evaluate the first seed transition
# the hard way, later it becomes much simpler
- x = 171 * (x % 177) - 2 * (x/177)
- y = 172 * (y % 176) - 35 * (y/176)
- z = 170 * (z % 178) - 63 * (z/178)
+ x = 171 * (x % 177) - 2 * (x//177)
+ y = 172 * (y % 176) - 35 * (y//176)
+ z = 170 * (z % 178) - 63 * (z//178)
if x < 0: x += 30269
if y < 0: y += 30307
if z < 0: z += 30323
--- a/save_load.py
+++ b/save_load.py
@@ -44,7 +44,7 @@ def Save_Cycle(name='cycle', passwd='123
objSave.append(['colour', [d, cal_year.cycle.colour_set[d].Get()] ])
tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )
- tmp="UserName="+pickle.dumps(name)+"==="+tmp
+ tmp=b"UserName="+pickle.dumps(name)+b"==="+tmp
p, f_name=get_f_name(file)
if not os.path.exists(p):