/* sython */
/**
 * Header for misc sython stuff. 
 *
 *  
 *  @author: Michael Gaiman
 *  @version: 1 1/22/2005
 *  
 */
#ifndef Sy_HEAD_H
#define Sy_HEAD_H
#ifdef __cplusplus
extern "C" {
#endif


#define SY_DEBUG_TOK 0
#define SY_DEBUG_SYM 0
#define SY_DEBUG_EVAL 0

/**Declaration of a new Error Used for some sython related security errors*/
PyAPI_DATA(PyObject *) SySecurityError;

/**Initialize various Sython things*/
void Sy_Init(void);

/**Import any python modules that Sython needs to operate.*/
void Sy_ImportModules(void);

/**Call a python callable object with args and return the result*/
PyObject* Sy_CallObject(char*,char*,PyObject*);

/**Sends a NEW_SESSION message to the daemon if needed.*/
int Sy_ConnectIfNeeded(void);

/** 
 * Parses tuple for a syobj, retrieves the ID and then packages it in a tuple.
 * Returns NULL if there is an error (after having set an exception).
 */
PyObject* Sy_PackageID(PyObject*);

#ifdef __cplusplus
}
#endif
#endif /* !Sy_HEAD_H */
