~ubuntu-branches/ubuntu/karmic/imdbpy/karmic

« back to all changes in this revision

Viewing changes to bin/get_person.py

  • Committer: Bazaar Package Importer
  • Author(s): Ana Beatriz Guerrero Lopez
  • Date: 2008-04-20 19:51:14 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080420195114-csn8kwgswrqlr63h
Tags: 3.5-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
Show some info about the person with the given imdbID (e.g. '0000210'
8
8
for "Julia Roberts".
9
9
"""
10
 
# Parameters to initialize the IMDb class.
11
 
IMDB_PARAMS = {
12
 
    # The used access system. 'web' means that you're retrieving data
13
 
    # from the IMDb web server.
14
 
    'accessSystem': 'web'
15
 
    #'accessSystem': 'mobile'
16
 
    # XXX: if you've a local installation of the IMDb database,
17
 
    # comment the above line and uncomment the following two.
18
 
    #'accessSystem': 'local',
19
 
    #'dbDirectory':  '/usr/local/imdb' # or, in a Windows environment:
20
 
    #'dbDirectory':  'D:/imdb-20060107'
21
 
 
22
 
    # XXX: parameters for a SQL installation.
23
 
    #'accessSystem': 'sql',
24
 
    #'uri': 'mysql://userName:yourPassword@localhost/dbName'
25
 
}
26
10
 
27
11
import sys
28
12
 
41
25
 
42
26
imdbID = sys.argv[1]
43
27
 
44
 
i = imdb.IMDb(**IMDB_PARAMS)
 
28
i = imdb.IMDb()
45
29
 
46
30
out_encoding = sys.stdout.encoding or sys.getdefaultencoding()
47
31