
import sys


def log(msg, *args):
  if args:
    msg = msg % args
  print >>sys.stderr, 'webpipe:', msg




import os
import sys

basename = os.path.basename(sys.argv[0])
prefix, _ = os.path.splitext(basename)

def log(msg, *args):
  if args:
    msg = msg % args
  print >>sys.stderr, prefix + ': ' + msg


Use the program name as the prefix.
Use the program name as the prefix.

  
+ import os
  import sys
  
+ basename = os.path.basename(sys.argv[0])
+ prefix, _ = os.path.splitext(basename)
  
  def log(msg, *args):
    if args:
      msg = msg % args
-   print >>sys.stderr, 'webpipe:', msg
+   print >>sys.stderr, prefix + ': ' + msg
  
  
- 
Use the program name as the prefix.
## Code Before:

import sys


def log(msg, *args):
  if args:
    msg = msg % args
  print >>sys.stderr, 'webpipe:', msg



## Instruction:
Use the program name as the prefix.
## Code After:

import os
import sys

basename = os.path.basename(sys.argv[0])
prefix, _ = os.path.splitext(basename)

def log(msg, *args):
  if args:
    msg = msg % args
  print >>sys.stderr, prefix + ': ' + msg

