++   * have_pythonprepend()
++   *    Check if there is a %pythonprepend directive and it has text
++   * ------------------------------------------------------------ */
++
++  bool have_pythonprepend(Node *n) {
++    String* str = Getattr(n, "feature:pythonprepend");
++    return (str != NULL && Len(str) > 0);
++  }
++  
++  /* ------------------------------------------------------------
++   * pythonprepend()
++   *    Get the %pythonprepend code, stripping off {} if neccessary
++   * ------------------------------------------------------------ */
++
++  String *pythonprepend(Node *n) {
++    String* str = Getattr(n, "feature:pythonprepend");
++    char* t = Char(str);
++    if (*t == '{') {
++      Delitem(str ,0);
++      Delitem(str,DOH_END);
++    }
++    return str;
++  }
++    
++  /* ------------------------------------------------------------
++   * have_pythonappend()
++   *    Check if there is a %pythonappend directive and it has text
++   * ------------------------------------------------------------ */
++
++  bool have_pythonappend(Node *n) {
++    String* str = Getattr(n, "feature:pythonappend");
+     return (str != NULL && Len(str) > 0);
+   }
+   
+   /* ------------------------------------------------------------
+-   * addtofunc()
+-   *    Get the %addtofunc code, stripping off {} if neccessary
++   * pythonappend()
++   *    Get the %pythonappend code, stripping off {} if neccessary