[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > When I copy code from a source file into a Google Groups message, the > > indentation is messed up, making my Python code illegal and all my > code > > ugly. Are there tricks to avoid this? > > Try putting a # at the start of every line. Everyone should > understand what you mean (and you can always tell them to remove > the #'s once they copy the listing). > > #import gmpy > #i = 7 > #while i<100000: > ## conjecture 1 > # > # if ((i % 3)>0) and ((i % 5)>0): > # f = gmpy.fib(i) > # ip = gmpy.is_prime(i) > # fm = f % i > # if (fm==(i-1)) and (ip==0): > # print "fib %5d: %5d (mod %5d)" % (i,fm,i), > # print gmpy.is_prime(i) > # i += 2 > # > #""" > #Conjecture #1: if i ends in 3 or 7 and fib(i) == i-1 (mod i) > # then i is prime > # > #run #1 print all fib(i) == i-1 (mod i) that are composite > # > #fib 5777: 5776 (mod 5777) 0 <-- counter example > #fib 10877: 10876 (mod 10877) 0 <-- counter example > #fib 17261: 17260 (mod 17261) 0 > #fib 75077: 75076 (mod 75077) 0 <-- counter example > #fib 80189: 80188 (mod 80189) 0 > #""" > > Preview looked ok, so let's see what happens when I post it.
In looking at this, I noticed the tabs in the code were preserved, but the double space between "fib" and "5777" in the comments was not. But if you click on the "show original" link, the spaces come back, so maybe you don't to any thing except "show original" when you want to copy source code. Testing 1 Testing 2 Testing 3 -- http://mail.python.org/mailman/listinfo/python-list