Path: csiph.com!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:IDLE': 0.04; "'')": 0.07; '(self,': 0.07; 'converts': 0.07; 'none)': 0.07; 'welcome.': 0.07; '(self):': 0.09; '(without': 0.09; '__init__': 0.09; 'delimiter': 0.09; 'tab': 0.09; 'to)': 0.09; 'python': 0.10; 'jan': 0.11; 'output': 0.13; 'thursday,': 0.13; 'def': 0.13; 'appropriate': 0.14; '>>>': 0.15; 'headers': 0.15; '\'"\'': 0.16; "','": 0.16; '(),': 0.16; '(fr,': 0.16; 'downstream': 0.16; 'file_name': 0.16; 'file_name)': 0.16; 'hacks': 0.16; 'idle,': 0.16; 'maintainer': 0.16; 'nest': 0.16; 'next.': 0.16; 'open\xa0': 0.16; 'received:195.186': 0.16; 'received:bluewin.ch': 0.16; 'reedy': 0.16; 'self.get': 0.16; 'skip:0 40': 0.16; 'skip:| 70': 0.16; 'skip:~ 20': 0.16; 'subject:ever': 0.16; 'symbol,': 0.16; 'toolbox': 0.16; 'used:': 0.16; 'v))': 0.16; 'where?': 0.16; 'wrote:': 0.16; 'beginner': 0.18; 'say,': 0.18; 'transform': 0.18; '>': 0.18; 'input': 0.18; 'runs': 0.18; '>>>': 0.20; '2015': 0.20; 'handles': 0.20; 'fix': 0.21; 'class,': 0.22; 'month,': 0.22; 'parameter': 0.22; 'am,': 0.23; 'tried': 0.24; 'import': 0.24; 'examples': 0.24; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'skip:- 40': 0.25; "i've": 0.25; 'header:User-Agent:1': 0.26; 'rest': 0.26; 'parameters': 0.27; 'errors.': 0.27; 'subject: -- ': 0.27; 'function': 0.28; 'skip:( 20': 0.28; 'accomplished': 0.29; 'remotely': 0.29; 'style.': 0.29; 'objects': 0.29; 'allows': 0.30; 'print': 0.30; 'classes': 0.30; 'comments': 0.30; 'system,': 0.30; 'saves': 0.30; 'window': 0.30; 'option': 0.31; 'ideal': 0.32; 'maybe': 0.33; 'useful': 0.33; 'class': 0.33; 'idle': 0.33; 'interaction': 0.33; 'programming,': 0.33; 'retain': 0.33; 'symbol': 0.33; 'wrap': 0.33; 'open': 0.33; "skip:' 20": 0.34; 'worked': 0.34; 'running': 0.34; 'list': 0.34; 'skip:- 50': 0.35; 'could': 0.35; 'false': 0.35; 'subject:please': 0.35; 'tasks': 0.35; 'comment': 0.35; 'expected': 0.35; 'respect': 0.65; 'today': 0.65; 'day,': 0.65; 'soon': 0.65; 'pleasant': 0.66; 'received:ch': 0.66; 'user,': 0.67; 'jobs': 0.67; 'production': 0.67; 'manner': 0.69; 'teaching': 0.69; '8bit%:100': 0.70; 'teach': 0.70; 'records': 0.70; 'august': 0.75; 'hand': 0.82; 'low': 0.83; '485': 0.84; 'amateur': 0.84; 'bridging': 0.84; 'comparable': 0.84; 'dialect': 0.84; 'discussions,': 0.84; 'gap': 0.84; 'hacking.': 0.84; 'high\xa0': 0.84; 'sem': 0.84; 'standards,': 0.84; 'transformer': 0.84; 'universe': 0.84; 'upstream': 0.84; 'utc+5:30,': 0.84; 'subject:you': 0.85; 'abc': 0.91; 'subject:Who': 0.91; 'subject:know': 0.91; '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0': 0.91; 'clip': 0.93; 'subject:answer': 0.93; 'ultimate': 0.93 Date: Fri, 07 Aug 2015 09:22:04 +0200 From: Friedrich Rentsch User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Who uses IDLE -- please answer if you ever do, know, or teach References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------030507000900020106090002" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 539 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1438932191 news.xs4all.nl 2936 [2001:888:2000:d::a6]:40150 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95107 This is a multi-part message in MIME format. --------------030507000900020106090002 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 08/06/2015 03:21 AM, Rustom Mody wrote: > On Thursday, August 6, 2015 at 6:36:56 AM UTC+5:30, Terry Reedy wrote: >> 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 > 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 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. 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. 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 . . . Frederic (moderately knowledgeable non-professional) ------------------------------------------------------ >>> import TYX >>> FR = TYX.File_Reader () >>> CSVP = TYX.CSV_Parser () >>> TAB = TYX.Tabulator () >>> print TAB (CSVP (FR ('Downloads/xyz.csv'))) # Calls nest ------------------------------------------- Date,Open,Close,High,Low,Volume 07/18/2014,34.36,34.25,34.36,34.25,485 07/17/2014,34.55,34.50,34.55,34.47,"2,415" 07/16/2014,34.65,34.63,34.68,34.52,"83,477" ------------------------------------------- >>> CSVP.get () # display all parameters CSV_Parser dialect > None delimiter > '\t' quote > '"' has_header > False strip_fields > True headers > [] >>> CSVP.set (delimiter = ',') >>> TAB.set (table_format = 'pipe') >>> print TAB (CSVP ()) # Transformers retain their input |:-----------|:------|:------|:------|:------|:-------| | Date | Open | Close | High | Low | Volume | | 07/18/2014 | 34.36 | 34.25 | 34.36 | 34.25 | 485 | | 07/17/2014 | 34.55 | 34.50 | 34.55 | 34.47 | 2,415 | | 07/16/2014 | 34.65 | 34.63 | 34.68 | 34.52 | 83,477 | >>> class formatter (TYX.Transformer): def __init__ (self): TYX.Transformer.__init__ (self, symbol = None) # declare parameter def transform (self, records): symbol = self.get ('symbol') if symbol: out = [] for d, o, c, h, l, v in records [1:]: # Clip headers month, day, year = d.split ('/') d = '%s-%s-%s' % (year, month, day) v = v.replace (',', '') out.append ((d, symbol, o, c, h, l, v)) return out >>> fo = formatter () >>> fo.set (symbol = 'XYZ') >>> TAB.set (float_format = 'f') >>> print TAB (fo (CSVP())) # Transformers also retain their output |:-----------|:----|----------:|----------:|----------:|----------:|------:| | 2014-07-18 | XYZ | 34.360000 | 34.250000 | 34.360000 | 34.250000 | 485 | | 2014-07-17 | XYZ | 34.550000 | 34.500000 | 34.550000 | 34.470000 | 2415 | | 2014-07-16 | XYZ | 34.650000 | 34.630000 | 34.680000 | 34.520000 | 83477 | >>> DBW = TYX.MySQL_Writer (DB, USER, PASSWORD, table_name = 'quotes') >>> DBW (fo ()) 0 0 means it worked >>> Q2DB = Chain (FR, CSVP, fo, DBW) >>> TL = TYX.Text_To_Lines () >>> SR = TYX.System_Read () >>> for file_name in TL (SR ('ls -1 ~/Downloads/*.csv')): symbol = file_name.rsplit ('/', 1)[1].split ('.')[0].upper () print symbol Q2DB.set (symbol = symbol, file_name = file_name) Q2DB () ABC 0 DEF 0 . . . End of hacking. The production Transformer is next. >>> class Quotes_CSV_To_DB (TYX.Chain): def __init__ (self): TYX.Chain.__init__ ( self, TYX.File_Reader (), TYX.CSV_Parser (delimiter = ','), formatter (), TYX.MySQL_Writer (DB, USER, PASSWORD, table_name = 'quotes') ) >>> Q2DB = Quotes_CSV_To_DB () >>> for file_name in TL (SR ('ls -1 ~/Downloads/*.csv')): . . . >>> Q2DB.get () # display all parameters ============================================== Q2DB symbol = 'QQQ' file_name = '/home/fr/Downloads/qqq.csv' ============================================== File_Reader file_name > '/home/fr/Downloads/qqq.csv' ---------------------------------------------- CSV_Parser dialect > None delimiter > ',' headers > [] quote > '"' strip_fields > True has_header > False ---------------------------------------------- formatter symbol > QQQ ---------------------------------------------- MySQL_Writer db_name > 'fr' table_name > 'quotes' user > 'fr' permit > 2 password > None ---------------------------------------------- ============================================== --------------030507000900020106090002 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit

On 08/06/2015 03:21 AM, Rustom Mody wrote:
On Thursday, August 6, 2015 at 6:36:56 AM UTC+5:30, Terry Reedy wrote:
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
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

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.

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.

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 . . .

Frederic (moderately knowledgeable non-professional)

------------------------------------------------------

   >>> import TYX

   >>> FR = TYX.File_Reader ()
   >>> CSVP = TYX.CSV_Parser ()
   >>> TAB = TYX.Tabulator ()

   >>> print TAB (CSVP (FR ('Downloads/xyz.csv')))   # Calls nest
   -------------------------------------------
   Date,Open,Close,High,Low,Volume
   07/18/2014,34.36,34.25,34.36,34.25,485
   07/17/2014,34.55,34.50,34.55,34.47,"2,415"
   07/16/2014,34.65,34.63,34.68,34.52,"83,477"
   -------------------------------------------

   >>> CSVP.get ()   # display all parameters
   CSV_Parser
    dialect      > None
    delimiter    > '\t'
    quote        > '"'
    has_header   > False
    strip_fields > True
    headers      > []

   >>> CSVP.set (delimiter = ',')
   >>> TAB.set (table_format = 'pipe')
   >>> print TAB (CSVP ())   # Transformers retain their input
   |:-----------|:------|:------|:------|:------|:-------|
   | Date       | Open  | Close | High  | Low   | Volume |
   | 07/18/2014 | 34.36 | 34.25 | 34.36 | 34.25 | 485    |
   | 07/17/2014 | 34.55 | 34.50 | 34.55 | 34.47 | 2,415  |
   | 07/16/2014 | 34.65 | 34.63 | 34.68 | 34.52 | 83,477 |

   >>> class formatter (TYX.Transformer):
          def __init__ (self):
             TYX.Transformer.__init__ (self, symbol = None) # declare parameter
          def transform (self, records):
             symbol = self.get ('symbol')
             if symbol:
                out = []
                for d, o, c, h, l, v in records [1:]:  # Clip headers
                   month, day, year = d.split ('/')
                   d = '%s-%s-%s' % (year, month, day)
                   v = v.replace (',', '')
                   out.append ((d, symbol, o, c, h, l, v))
                return out
   >>> fo = formatter ()
   >>> fo.set (symbol = 'XYZ')
   >>> TAB.set (float_format = 'f')
   >>> print TAB (fo (CSVP()))   # Transformers also retain their output
   |:-----------|:----|----------:|----------:|----------:|----------:|------:|
   | 2014-07-18 | XYZ | 34.360000 | 34.250000 | 34.360000 | 34.250000 |   485 |
   | 2014-07-17 | XYZ | 34.550000 | 34.500000 | 34.550000 | 34.470000 |  2415 |
   | 2014-07-16 | XYZ | 34.650000 | 34.630000 | 34.680000 | 34.520000 | 83477 |    

   >>> DBW = TYX.MySQL_Writer (DB, USER, PASSWORD, table_name = 'quotes')
   >>> DBW (fo ())
   0

   0 means it worked

   >>> Q2DB = Chain (FR, CSVP, fo, DBW)
   >>> TL = TYX.Text_To_Lines ()
   >>> SR = TYX.System_Read ()
   >>> for file_name in TL (SR ('ls -1 ~/Downloads/*.csv')):
          symbol = file_name.rsplit ('/', 1)[1].split ('.')[0].upper ()
          print symbol
          Q2DB.set (symbol = symbol, file_name = file_name)
          Q2DB ()
   ABC
   0
   DEF
   0
   . . .

   End of hacking. The production Transformer is next.

   >>> class Quotes_CSV_To_DB (TYX.Chain):
          def __init__ (self):
             TYX.Chain.__init__ (
                 self,
                 TYX.File_Reader (),
                 TYX.CSV_Parser (delimiter = ','),
                 formatter (),
                 TYX.MySQL_Writer (DB, USER, PASSWORD, table_name = 'quotes')
              )
   >>> Q2DB = Quotes_CSV_To_DB ()
   >>> for file_name in TL (SR ('ls -1 ~/Downloads/*.csv')):
          . . .

   >>> Q2DB.get ()  # display all parameters
   ==============================================
   Q2DB
    symbol = 'QQQ'
    file_name = '/home/fr/Downloads/qqq.csv'
   ==============================================
        File_Reader
         file_name > '/home/fr/Downloads/qqq.csv'
   ----------------------------------------------
        CSV_Parser
         dialect      > None
         delimiter    > ','
         headers      > []
         quote        > '"'
         strip_fields > True
         has_header   > False
   ----------------------------------------------
        formatter
         symbol  > QQQ
   ----------------------------------------------
        MySQL_Writer
         db_name    > 'fr'
         table_name > 'quotes'
         user       > 'fr'
         permit     > 2
         password   > None
   ----------------------------------------------
   ==============================================


--------------030507000900020106090002--