<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 08/06/2015 03:21 AM, Rustom Mody
      wrote:<br>
    </div>
    <blockquote
      cite="mid:eee731aa-08ab-4d92-a972-dee3af5574d8@googlegroups.com"
      type="cite">
      <pre wrap="">On Thursday, August 6, 2015 at 6:36:56 AM UTC+5:30, Terry Reedy wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">There have been discussions, such as today on Idle-sig , about who uses 
Idle and who we should design it for.  If you use Idle in any way, or 
know of or teach classes using Idle, please answer as many of the 
questions below as you are willing, and as are appropriate

Private answers are welcome. They will be deleted as soon as they are 
tallied (without names).

I realized that this list is a biased sample of the universe of people 
who have studied Python at least, say, a month.  But biased data should 
be better than my current vague impressions.

0. Classes where Idle is used:
Where?
Level?

Idle users:

1. Are you
grade school (1=12)?
undergraduate (Freshman-Senior)?
post-graduate (from whatever)?

2. Are you
beginner (1st class, maybe 2nd depending on intensity of first)?
post-beginner?

3. With respect to programming, are you
amateur (unpaid)
professional (paid for programming)

-- 
Terry Jan Reedy, Idle maintainer
</pre>
      </blockquote>
      <pre wrap="">
I used idle to teach a 2nd year engineering course last sem
It was a more pleasant experience than I expected
One feature that would help teachers:
It would be nice to (have setting to) auto-save the interaction window
[Yeah I tried to see if I could do it by hand but could not find where]
Useful for giving as handouts of the class
So students rest easy and dont need to take 'literal' notes of the session

I will now be teaching more advanced students and switching back to emacs
-- python, C, and others -- so really no option to emacs.
Not ideal at all but nothing else remotely comparable
</pre>
    </blockquote>
    <br>
    I've been using Idle full time to simultaneously manage my financial
    holdings, develop the management system and manually fix errors.
    While the ultimate goal is a push-button system, I have not reached
    that stage and am compelled to work trial-and-error style. For this
    way of working I found Idle well-suited, since the majority of jobs
    I do are hacks and quick fixes, not production runs running
    reliably.
    <br>
    <br>
    I recently came up with a data transformation framework that greatly
    expedites interactive development. It is based on transformer
    objects that wrap a transformation function. The base class
    Transformer handles the flow of the data in a manner that allows
    linking the transformer modules together in chains. With a toolbox
    of often used standards, a great variety of transformation tasks can
    be accomplished by simply lining up a bunch of toolbox transformers
    in chains. Bridging a gap now and then is a relatively simple matter
    of writing a transformation function that converts the output format
    upstream of the gap to the required input format downstream of the
    gap.
    <br>
    <br>
    The system works very well. It saves me a lot of time. I am
    currently writing a manual with the intention to upload it for
    comment and also to upload the system, if the comments are not too
    discouraging. If I may show a few examples below . . .
    <br>
    <br>
    Frederic (moderately knowledgeable non-professional)<br>
    <br>
    ------------------------------------------------------<br>
    <br>
       >>> import TYX
    <br>
    <br>
       >>> FR = TYX.File_Reader ()
    <br>
       >>> CSVP = TYX.CSV_Parser ()
    <br>
       >>> TAB = TYX.Tabulator ()
    <br>
    <br>
       >>> print TAB (CSVP (FR ('Downloads/xyz.csv')))   #
    Calls nest
    <br>
       -------------------------------------------
    <br>
       Date,Open,Close,High,Low,Volume
    <br>
       07/18/2014,34.36,34.25,34.36,34.25,485
    <br>
       07/17/2014,34.55,34.50,34.55,34.47,"2,415"
    <br>
       07/16/2014,34.65,34.63,34.68,34.52,"83,477"
    <br>
       -------------------------------------------
    <br>
    <br>
       >>> CSVP.get ()   # display all parameters
    <br>
       CSV_Parser
    <br>
        dialect      > None
    <br>
        delimiter    > '\t'
    <br>
        quote        > '"'
    <br>
        has_header   > False
    <br>
        strip_fields > True
    <br>
        headers      > []
    <br>
    <br>
       >>> CSVP.set (delimiter = ',')
    <br>
       >>> TAB.set (table_format = 'pipe')
    <br>
       >>> print TAB (CSVP ())   # Transformers retain their
    input
    <br>
       |:-----------|:------|:------|:------|:------|:-------|
    <br>
       | Date       | Open  | Close | High  | Low   | Volume |
    <br>
       | 07/18/2014 | 34.36 | 34.25 | 34.36 | 34.25 | 485    |
    <br>
       | 07/17/2014 | 34.55 | 34.50 | 34.55 | 34.47 | 2,415  |
    <br>
       | 07/16/2014 | 34.65 | 34.63 | 34.68 | 34.52 | 83,477 |
    <br>
    <br>
       >>> class formatter (TYX.Transformer):
    <br>
              def __init__ (self):
    <br>
                 TYX.Transformer.__init__ (self, symbol = None) #
    declare parameter
    <br>
              def transform (self, records):
    <br>
                 symbol = self.get ('symbol')
    <br>
                 if symbol:<br>
                    out = [] <br>
                    for d, o, c, h, l, v in records [1:]: 
    # Clip headers<br>
                       month, day, year = d.split ('/')
    <br>
                       d = '%s-%s-%s' % (year, month, day)
    <br>
                       v = v.replace (',', '')
    <br>
                       out.append ((d, symbol, o, c, h, l, v))
    <br>
                    return out
    <br>
       >>> fo = formatter ()
    <br>
       >>> fo.set (symbol = 'XYZ')<br>
       >>> TAB.set (float_format = 'f') <br>
       >>> print TAB (fo (CSVP()))   # Transformers also retain
    their output
    <br>
      
|:-----------|:----|----------:|----------:|----------:|----------:|------:|<br>
       | 2014-07-18 | XYZ | 34.360000 | 34.250000 | 34.360000 |
    34.250000 |   485 |<br>
       | 2014-07-17 | XYZ | 34.550000 | 34.500000 | 34.550000 |
    34.470000 |  2415 |<br>
       | 2014-07-16 | XYZ | 34.650000 | 34.630000 | 34.680000 |
    34.520000 | 83477 |     <br>
    <br>
       >>> DBW = TYX.MySQL_Writer (DB, USER, PASSWORD,
    table_name = 'quotes')
    <br>
       >>> DBW (fo ())
    <br>
       0
    <br>
    <br>
       0 means it worked<br>
    <br>
       >>> Q2DB = Chain (FR, CSVP, fo, DBW)
    <br>
       >>> TL = TYX.Text_To_Lines ()
    <br>
       >>> SR = TYX.System_Read ()
    <br>
       >>> for file_name in TL (SR ('ls -1 ~<span
      class="moz-txt-slash"><span class="moz-txt-tag">/</span>Downloads<span
        class="moz-txt-tag">/</span></span>*.csv')):
    <br>
              symbol = file_name.rsplit ('/', 1)[1].split ('.')[0].upper
    ()
    <br>
              print symbol
    <br>
              Q2DB.set (symbol = symbol, file_name = file_name)
    <br>
              Q2DB ()
    <br>
       ABC
    <br>
       0
    <br>
       DEF
    <br>
       0
    <br>
       . . .
    <br>
    <br>
       End of hacking. The production Transformer is next.
    <br>
    <br>
       >>> class Quotes_CSV_To_DB (TYX.Chain):
    <br>
              def __init__ (self):
    <br>
                 TYX.Chain.__init__ (
    <br>
                     self,
    <br>
                     TYX.File_Reader (),
    <br>
                     TYX.CSV_Parser (delimiter = ','),
    <br>
                     formatter (),
    <br>
                     TYX.MySQL_Writer (DB, USER, PASSWORD, table_name =
    'quotes')
    <br>
                  )
    <br>
       >>> Q2DB = Quotes_CSV_To_DB ()
    <br>
       >>> for file_name in TL (SR ('ls -1 ~<i
      class="moz-txt-slash"><span class="moz-txt-tag">/</span></i><span
      class="moz-txt-slash">Downloads<span class="moz-txt-tag"></span></span><i
      class="moz-txt-slash"><span class="moz-txt-tag">/</span></i>*.csv')):
    <br>
              . . . <br>
    <br>
       >>> Q2DB.get ()  # display all parameters
    <br>
       ==============================================
    <br>
       Q2DB<br>
        symbol = 'QQQ'<br>
        file_name = '/home/fr/Downloads/qqq.csv' <br>
       ==============================================<br>
            File_Reader
    <br>
             file_name > '/home/fr/Downloads/qqq.csv'
    <br>
       ----------------------------------------------
    <br>
            CSV_Parser
    <br>
             dialect      > None
    <br>
             delimiter    > ','
    <br>
             headers      > []
    <br>
             quote        > '"'
    <br>
             strip_fields > True
    <br>
             has_header   > False
    <br>
       ----------------------------------------------
    <br>
            formatter
    <br>
             symbol  > QQQ
    <br>
       ----------------------------------------------
    <br>
            MySQL_Writer
    <br>
             db_name    > 'fr'
    <br>
             table_name > 'quotes'
    <br>
             user       > 'fr'
    <br>
             permit     > 2
    <br>
             password   > None
    <br>
       ----------------------------------------------
    <br>
       ==============================================<br>
    <br>
    <br>
  </body>
</html>