[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Python binding and function calls

From: Alexis Boutillier <alexis.boutillier_at_libertysurf.fr>
Date: 2004-09-20 09:36:15 CEST

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
Received on Mon Sep 20 09:45:05 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.