Author: duncan
Date: Wed Nov 28 13:09:47 2007
New Revision: 10164

Log:
Tidy up of epytext docstrings


Modified:
   branches/rel-1/freevo/src/menu.py
   branches/rel-1/freevo/src/osd.py
   branches/rel-1/freevo/src/playlist.py
   branches/rel-1/freevo/src/plugin.py
   branches/rel-1/freevo/src/util/amazon.py
   branches/rel-1/freevo/src/util/fxdimdb.py

Modified: branches/rel-1/freevo/src/menu.py
==============================================================================
--- branches/rel-1/freevo/src/menu.py   (original)
+++ branches/rel-1/freevo/src/menu.py   Wed Nov 28 13:09:47 2007
@@ -270,17 +270,16 @@
 
     def goto_media_menu(self, media='audio'):
         """
-        Go to a main menu item
-        media = 'tv' or 'audio' or 'video' or 'image' or 'games'
+        Go to a main menu item media = 'tv' or 'audio' or 'video' or 'image' 
or 'games'
         used for events:
-            MENU_GOTO_TVMENU
-            MENU_GOTO_TVGUIDEMENU #doesn't yet work
-            MENU_GOTO_VIDEOMENU
-            MENU_GOTO_AUDIOMENU
-            MENU_GOTO_IMAGEMENU
-            MENU_GOTO_GAMESMENU
-            MENU_GOTO_RADIOMENU
-            MENU_GOTO_SHUTDOWN
+            - MENU_GOTO_TVMENU
+            - MENU_GOTO_TVGUIDEMENU #doesn't yet work
+            - MENU_GOTO_VIDEOMENU
+            - MENU_GOTO_AUDIOMENU
+            - MENU_GOTO_IMAGEMENU
+            - MENU_GOTO_GAMESMENU
+            - MENU_GOTO_RADIOMENU
+            - MENU_GOTO_SHUTDOWN
         """
         self.menustack = [self.menustack[0]]
         menu = self.menustack[0]

Modified: branches/rel-1/freevo/src/osd.py
==============================================================================
--- branches/rel-1/freevo/src/osd.py    (original)
+++ branches/rel-1/freevo/src/osd.py    Wed Nov 28 13:09:47 2007
@@ -983,22 +983,21 @@
 
         Parameters:
         @param string: the string to be drawn, supports also <nl>. <tab> is 
not supported
-          by pygame, you need to replace it first
+            by pygame, you need to replace it first
         @param x: horizontal position
         @param y: vertical position
         @param width: frame width
         @param height: frame height == -1 defaults to the font height size
         @param fgcolor, bgcolor: the color for the foreground and background
-          respectively. (Supports the alpha channel: 0xAARRGGBB)
-        @param font, ptsize: font and font point size
+            respectively. (Supports the alpha channel: 0xAARRGGBB)
+        @param font, ptsize: font and font point size font can also be a skin 
font
+            object. If so, this functions also supports shadow and border. 
fgcolor and
+            bgcolor will also be taken from the skin font if set to None when 
calling this
+            function.
         @param align_h: horizontal align. Can be left, center, right, justified
         @param align_v: vertical align. Can be top, bottom, center or middle
         @param mode: the way we should break lines/truncate. Can be 
'hard'(based on chars)
-          or 'soft' (based on words)
-
-        font can also be a skin font object. If so, this functions also 
supports
-        shadow and border. fgcolor and bgcolor will also be taken from the skin
-        font if set to None when calling this function.
+            or 'soft' (based on words)
         """
         if not pygame.display.get_init():
             return '', (x,y,x,y)

Modified: branches/rel-1/freevo/src/playlist.py
==============================================================================
--- branches/rel-1/freevo/src/playlist.py       (original)
+++ branches/rel-1/freevo/src/playlist.py       Wed Nov 28 13:09:47 2007
@@ -51,12 +51,13 @@
         """
         Init the playlist
 
-        playlist: a) a filename to a playlist file (e.g. m3u)
-                  b) a list of items to play, this list can include
-                     1) Items
-                     2) filenames
-                     3) a list (directoryname, recursive=0|1)
-        build:    create the playlist. This means unfold the directories
+            1. a filename to a playlist file (e.g. m3u)
+            2. a list of items to play, this list can include
+                - Items
+                - filenames
+                - a list (directoryname, recursive=0|1)
+
+        @param build: create the playlist, this means unfold the directories
         """
         Item.__init__(self, parent)
 
@@ -150,14 +151,14 @@
         """
         This is the (ssr) slideshow reading function.
 
-        Arguments: ssrname - the slideshow filename
-        Returns:   The list of interesting lines in the slideshow
-
-        File line format:
+        File line format::
 
-            FileName: "image file name"; Caption: "caption text"; Delay: "sec"
+        FileName: "image file name"; Caption: "caption text"; Delay: "sec"
 
         The caption and delay are optional.
+
+        @param ssrname: the slideshow filename
+        @returns: the list of interesting lines in the slideshow
         """
 
         (curdir, playlistname) = os.path.split(ssrname)
@@ -522,7 +523,7 @@
 
     def fxdhandler(self, fxd, node):
         """
-        parse audio specific stuff from fxd files
+        parse audio specific stuff from fxd files::
 
         <?xml version="1.0" ?>
         <freevo>

Modified: branches/rel-1/freevo/src/plugin.py
==============================================================================
--- branches/rel-1/freevo/src/plugin.py (original)
+++ branches/rel-1/freevo/src/plugin.py Wed Nov 28 13:09:47 2007
@@ -129,17 +129,20 @@
     background while Freevo is running
 
     A DaemonPlugin can have the following functions:
+
     def poll(self):
-        this function will be called every poll_intervall*0.1 seconds
+    this function will be called every poll_intervall*0.1 seconds
+
     def draw(self(type, object), osd):
-        this function will be called to update the screen
+    this function will be called to update the screen
+
     def eventhandler(self, event, menuw=None):
-        events no one else wants will be passed to this functions, when
-        you also set the variable event_listener to True, the object will
-        get all events
+    events no one else wants will be passed to this functions, when you also 
set
+    the variable event_listener to True, the object will get all events
+
     def shutdown(self):
-        this function may be called to shutdown the plugin and will
-        be called on freevo shutdown
+    this function may be called to shutdown the plugin and will be called on 
freevo
+    shutdown
     """
     def __init__(self):
         Plugin.__init__(self)
@@ -417,7 +420,7 @@
 def register_callback(name, *args):
     """
     register a callback to the callback handler 'name'.
-    @note The format of args depends on the callback
+    @note: The format of args depends on the callback
     """
     global __callbacks__
     if not __callbacks__.has_key(name):

Modified: branches/rel-1/freevo/src/util/amazon.py
==============================================================================
--- branches/rel-1/freevo/src/util/amazon.py    (original)
+++ branches/rel-1/freevo/src/util/amazon.py    Wed Nov 28 13:09:47 2007
@@ -28,28 +28,24 @@
 #
 # -----------------------------------------------------------------------
 
-"""Python wrapper
+"""Python wrapper for Amazon web APIs
 
-
-for Amazon web APIs
-
-This module allows you to access Amazon's web APIs,
-to do things like search Amazon and get the results programmatically.
-Described here:
-  http://www.amazon.com/webservices
-
-You need a Amazon-provided license key to use these services.
-Follow the link above to get one.  These functions will look in
-several places (in this order) for the license key:
-- the "license_key" argument of each function
-- the module-level LICENSE_KEY variable (call setLicense once to set it)
-- an environment variable called AMAZON_LICENSE_KEY
-- a file called ".amazonkey" in the current directory
-- a file called "amazonkey.txt" in the current directory
-- a file called ".amazonkey" in your home directory
-- a file called "amazonkey.txt" in your home directory
-- a file called ".amazonkey" in the same directory as amazon.py
-- a file called "amazonkey.txt" in the same directory as amazon.py
+This module allows you to access Amazon's web APIs, to do things like search
+Amazon and get the results programmatically.  Described here:
+http://www.amazon.com/webservices
+
+You need a Amazon-provided license key to use these services.  Follow the link
+above to get one.  These functions will look in several places (in this order)
+for the license key:
+    - the "license_key" argument of each function
+    - the module-level LICENSE_KEY variable (call setLicense once to set it)
+    - an environment variable called AMAZON_LICENSE_KEY
+    - a file called ".amazonkey" in the current directory
+    - a file called "amazonkey.txt" in the current directory
+    - a file called ".amazonkey" in your home directory
+    - a file called "amazonkey.txt" in your home directory
+    - a file called ".amazonkey" in the same directory as amazon.py
+    - a file called "amazonkey.txt" in the same directory as amazon.py
 
 Sample usage:
 >>> import amazon
@@ -63,24 +59,24 @@
 ...
 
 Other available functions:
-- browseBestSellers
-- searchByASIN
-- searchByUPC
-- searchByAuthor
-- searchByArtist
-- searchByActor
-- searchByDirector
-- searchByManufacturer
-- searchByListMania
-- searchSimilar
-- searchByWishlist
+    - browseBestSellers
+    - searchByASIN
+    - searchByUPC
+    - searchByAuthor
+    - searchByArtist
+    - searchByActor
+    - searchByDirector
+    - searchByManufacturer
+    - searchByListMania
+    - searchSimilar
+    - searchByWishlist
 
 Other usage notes:
-- Most functions can take product_line as well, see source for possible values
-- All functions can take type="lite" to get less detail in results
-- All functions can take page=N to get second, third, fourth page of results
-- All functions can take license_key="XYZ", instead of setting it globally
-- All functions can take http_proxy="http://x/y/z"; which overrides your system 
setting
+    - Most functions can take product_line as well, see source for possible 
values
+    - All functions can take type="lite" to get less detail in results
+    - All functions can take page=N to get second, third, fourth page of 
results
+    - All functions can take license_key="XYZ", instead of setting it globally
+    - All functions can take http_proxy="http://x/y/z"; which overrides your 
system setting
 """
 
 __author__ = "Mark Pilgrim ([EMAIL PROTECTED])"
@@ -252,41 +248,43 @@
     this function every time, or set it globally; see the module docs for 
details.
 
     Parameters:
-    keyword - keyword to search
-    search_type - in (KeywordSearch, BrowseNodeSearch, AsinSearch, UpcSearch, 
AuthorSearch, ArtistSearch, ActorSearch, DirectorSearch, ManufacturerSearch, 
ListManiaSearch, SimilaritySearch)
-    product_line - type of product to search for.  restrictions based on 
search_type
+    @param keyword - keyword to search
+    @param search_type - in (KeywordSearch, BrowseNodeSearch, AsinSearch,
+        UpcSearch, AuthorSearch, ArtistSearch, ActorSearch, DirectorSearch,
+        ManufacturerSearch, ListManiaSearch, SimilaritySearch)
+    @param product_line - type of product to search for.  restrictions based 
on search_type
         UpcSearch - in (music, classical)
         AuthorSearch - must be "books"
         ArtistSearch - in (music, classical)
         ActorSearch - in (dvd, vhs, video)
         DirectorSearch - in (dvd, vhs, video)
         ManufacturerSearch - in (electronics, kitchen, videogames, software, 
photo, pc-hardware)
-    http_proxy (optional) - address of HTTP proxy to use for sending and 
receiving SOAP messages
+    @param http_proxy: (optional) - address of HTTP proxy to use for sending 
and receiving SOAP messages
 
-    Returns: list of Bags, each Bag may contain the following attributes:
-      Asin - Amazon ID ("ASIN" number) of this item
-      Authors - list of authors
-      Availability - "available", etc.
-      BrowseList - list of related categories
-      Catalog - catalog type ("Book", etc)
-      CollectiblePrice - ?, format "$34.95"
-      ImageUrlLarge - URL of large image of this item
-      ImageUrlMedium - URL of medium image of this item
-      ImageUrlSmall - URL of small image of this item
-      Isbn - ISBN number
-      ListPrice - list price, format "$34.95"
-      Lists - list of ListMania lists that include this item
-      Manufacturer - manufacturer
-      Media - media ("Paperback", "Audio CD", etc)
-      NumMedia - number of different media types in which this item is 
available
-      OurPrice - Amazon price, format "$24.47"
-      ProductName - name of this item
-      ReleaseDate - release date, format "09 April, 1999"
-      Reviews - reviews (AvgCustomerRating, plus list of CustomerReview with 
Rating, Summary, Content)
-      SalesRank - sales rank (integer)
-      SimilarProducts - list of Product, which is ASIN number
-      ThirdPartyNewPrice - ?, format "$34.95"
-      URL - URL of this item
+    @eturns: list of Bags, each Bag may contain the following attributes:
+        Asin - Amazon ID ("ASIN" number) of this item
+        Authors - list of authors
+        Availability - "available", etc.
+        BrowseList - list of related categories
+        Catalog - catalog type ("Book", etc)
+        CollectiblePrice - ?, format "$34.95"
+        ImageUrlLarge - URL of large image of this item
+        ImageUrlMedium - URL of medium image of this item
+        ImageUrlSmall - URL of small image of this item
+        Isbn - ISBN number
+        ListPrice - list price, format "$34.95"
+        Lists - list of ListMania lists that include this item
+        Manufacturer - manufacturer
+        Media - media ("Paperback", "Audio CD", etc)
+        NumMedia - number of different media types in which this item is 
available
+        OurPrice - Amazon price, format "$24.47"
+        ProductName - name of this item
+        ReleaseDate - release date, format "09 April, 1999"
+        Reviews - reviews (AvgCustomerRating, plus list of CustomerReview with 
Rating, Summary, Content)
+        SalesRank - sales rank (integer)
+        SimilarProducts - list of Product, which is ASIN number
+        ThirdPartyNewPrice - ?, format "$34.95"
+        URL - URL of this item
     """
     license_key = getLicense(license_key)
     url = buildURL(search_type, keyword, product_line, type, page, license_key)

Modified: branches/rel-1/freevo/src/util/fxdimdb.py
==============================================================================
--- branches/rel-1/freevo/src/util/fxdimdb.py   (original)
+++ branches/rel-1/freevo/src/util/fxdimdb.py   Wed Nov 28 13:09:47 2007
@@ -125,9 +125,12 @@
 
 
     def searchImdb(self, name):
-        """name (string), returns id list
-        Search for name and returns an id list with tuples:
-            (id , name, year, type)"""
+        """
+        @param name: name to search for
+        @type name: string
+        @returns: id list with tuples:
+            (id , name, year, type)
+        """
 
         _debug_('searching imdb for "%s"' % (name))
         url = 'http://us.imdb.com/Tsearch?title=%s&restrict=Movies+and+TV' % 
urllib.quote(str(name))

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to