Re: [sage-support] cut-and-paste file into sage session gives different answers to loading file with execfile??

2014-04-09 Thread William Stein
On Wed, Apr 9, 2014 at 11:24 AM, Kevin Buzzard wrote: > What I am doing wrong here? > > I have a file called test.py and it looks like this: > > *** > > def slop(p,e,k): > Gamma=DirichletGroup(p^e) > chi=Gamma.gens()[len(Gamma.gens())-1] > assert chi(-1)==(-1)**k > return chi(-1),(-1)**k > > #

[sage-support] cut-and-paste file into sage session gives different answers to loading file with execfile??

2014-04-09 Thread Kevin Buzzard
What I am doing wrong here? I have a file called test.py and it looks like this: *** def slop(p,e,k): Gamma=DirichletGroup(p^e) chi=Gamma.gens()[len(Gamma.gens())-1] assert chi(-1)==(-1)**k return chi(-1),(-1)**k # indicator that I've left a blank line *** If I cut-and-paste that file int