You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alexis Boutillier <al...@libertysurf.fr> on 2004/09/20 07:36:15 UTC
Python binding and function calls
Hi,
I have a question about python binding and function calls.
I try to use the wc.svn_wc_walk_entries() function but this function
require an svn_wc_entry_callbacks_t element that as a found_entry
function.
This function is called for each entry found in the working copy.
The problem is that a can't pass a python function to it.
I wonder if it is possible to pass a python function that will be called
as a C function ?
There is my small test program :
Subversion 1.0.6
# Initialize APR and get a POOL.
util.apr_initialize()
pool = util.svn_pool_create(None)
provider = client.svn_client_get_simple_provider(pool)
auth_baton = util.svn_auth_open([provider],pool)
util.SVN_AUTH_PARAM_DEFAULT_USERNAME = "alexis"
util.SVN_AUTH_PARAM_DEFAULT_PASSWORD = "Hotshot2"
util.SVN_AUTH_PARAM_NON_INTERACTIVE = True
work = wc.svn_wc_adm_open(None,"/home/bases/test",False,0,pool)
call = wc.svn_wc_entry_callbacks_t()
call.found_entry = lambda path,entry,baton,pool: True
print call
print dir(call)
p =
wc.svn_wc_walk_entries("/home/bases/test",work,call,auth_baton,True,pool)
print p
# Cleanup our POOL, and shut down APR.
util.svn_pool_destroy(pool)
util.apr_terminate()
Thanks for the help
--
Boutillier Alexis
Methodology engineer
Arteris SA
The Network-on-Chip Company TM
www.arteris.net
6 par Ariane Immeuble Mercure
78284 Guyancourt Cedex
France
Office: (+33) 1 61 37 38 71
Fac: (+33) 1 61 37 38 41
Alexis.Boutillier@arteris.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org