source: orange/Orange/testing/regression/tests_20/reference_pf_progress.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 468 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

Line 
1import orngNetwork
2from orangeom import Pathfinder
3
4def myCb(complete):
5    """
6    The callback function.
7    """
8    print 'The procedure is %d%% complete.' % int(complete * 100)
9
10# Read a demo network from a file
11net = orngNetwork.Network.read('demo.net')
12
13# Choose some parameters
14r, q = 1, 6
15
16# Create a pathfinder instance
17pf = Pathfinder()
18
19# Pass the reference to the desired function
20pf.setProgressCallback(myCb)
21
22# Simplify the network
23pf.simplify(r, q, net)
Note: See TracBrowser for help on using the repository browser.