Gisle V.


"Computers are useless. They can only give answers"  --Pablo Picasso
Chris Angelico <ros...@gmail.com> wrote:

> For SQL? Ignore the extra spaces, it's a free-form language. The only
> reason to consider dedent() would be if you're worried about how your
> log files will look. The actual execution of SQL won't be bothered by
> newlines and spaces/tabs.

Regrading handy uses of ''', you learned me one trick when using Python 
code in a Windows .bat file:


  rem = '''
  @echo off
  echo This is 
batch
  \python32\python %0
  echo All done
  exit /b
  rem '''
  import 
sys
  print("This is Python")
  for i,p in 
enumerate(sys.path):
     print('sys.path[%2d]: %s' % (i, p))
  print("Python 
done")

You'll have a variable in Python called 'rem' which contains all 
your
batch code :) It exploits the fact that 'rem' makes a 
one-line
comment, but the triple quotes go across multiple lines.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to