source: orange/Orange/doc/modules/sql2.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 393 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1# Description: Reads a data base from MySQL
2# Category:    file formats
3# Classes:     orngMySQL.Connect
4# Referenced:  orngMySQL.htm
5
6import orange
7import orngMySQL
8
9t = orngMySQL.Connect('localhost','root','','test')
10
11data = t.query("SELECT * FROM busclass WHERE line='10'")
12for x in data:
13    print x
14
15print
16for a in data.domain.attributes:
17    print a
18print 'Class:', data.domain.classVar
Note: See TracBrowser for help on using the repository browser.