File: test_pycxx_iter.py

package info (click to toggle)
pycxx 7.1.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,392 kB
  • sloc: cpp: 6,767; python: 1,138; sh: 85; ansic: 60; makefile: 18
file content (19 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import sys

def message( msg ):
    sys.stdout.write( msg )
    sys.stdout.write( '\n' )
    sys.stdout.flush()

message( 'Info: ---- %s ----' % (sys.argv[0],) )

sys.path.insert( 0, 'pyds%d%d' % (sys.version_info[0], sys.version_info[1]) )

import pycxx_iter

it = pycxx_iter.IterT( 5, 7 )

for i in it:
    message( '%r %r' % (i, it) )

message( 'refcount of it: %d' % (sys.getrefcount( it ),) )