Re: [Tutor] Lengthy copyright notices?

2019-07-18 Thread Ben Finney
David L Neil writes: > There can be quite an accumulation of 'paper-work' at the top of > modules, which then has to be scrolled-through before we can get > stuck-in to function/class/__main__ code - even with an editor's > code-folding assistance. > > Should it be left to the (far) end of the fi

Re: [Tutor] Web framework module for Python.

2019-07-18 Thread Ben Finney
writes: > The web page is not going to have any fancy structure or visual effects at > all. I am more than happy to hand-code the HTML/JavaScript. I have had a > quick search and found a range of modules. Most of them indicate they are > for CMS web sites and look far to complex for my needs. >

Re: [Tutor] pass arg to list

2019-07-18 Thread Steven D'Aprano
On Thu, Jul 18, 2019 at 11:34:09AM -0700, Anirudh Tamsekar wrote: > My script below is blowing index out of range after adding the args. > version = sys.argv[1] > Traceback (most recent call last): > File "/Users/atamsekar/Projects/PulseSO/trunk/swrelease/samplexls.py", > line 5, in > ver

Re: [Tutor] pass arg to list

2019-07-18 Thread Alan Gauld via Tutor
On 18/07/2019 19:34, Anirudh Tamsekar wrote: > # User Args > > version = sys.argv[1] > build = sys.argv[2] > > add_file = (... > ) > Traceback (most recent call last): > > File "/Users/atamsekar/Projects/PulseSO/trunk/swrelease/samplexls.py", > line 5, in > > version = sys.argv[1] > >

[Tutor] pass arg to list

2019-07-18 Thread Anirudh Tamsekar
Hi, I'm trying to pass arguments to list. This script needs to generate csv files. I want to pass the version and build number to the script and it should be passed to the list. My script below is blowing index out of range after adding the args. However, if I hardcode the version, it works fin

Re: [Tutor] How would I replace the data of a Pandas Series with the values of a dictionary?

2019-07-18 Thread Albert-Jan Roskam
On 16 Jul 2019 23:31, Daniel Bosah wrote: Hi all, I have a problem trying to match items in a dict and pandas series in Python. I have a dict ( called city_dict )of cities and city_id's ; for each city ( which is a key in the dict ), a unique city_id is a value in that dict. So for example,