Re: [Tutor] selenium, automated testing and python

2017-05-04 Thread Alan Gauld via Tutor
On 04/05/17 22:09, Alan Gauld via Tutor wrote: > And the reasons above are only scratching the > surface, there are many more gains that apply to > testing in general but are only practical if > testing is automated. One thing I meant to add is that "automated" does not necessarily mean using a f

Re: [Tutor] selenium, automated testing and python

2017-05-04 Thread Alan Gauld via Tutor
On 04/05/17 19:44, Palm Tree wrote: > Sorry i'm a bit new to automated testing. > > I have explored python wide and deep but can someone just tell me why as a > coder i need automated testing? You don't, you can test it all by hand. But it will take you much longer, especially after you've done,

[Tutor] selenium, automated testing and python

2017-05-04 Thread Palm Tree
Sorry i'm a bit new to automated testing. I have explored python wide and deep but can someone just tell me why as a coder i need automated testing? i have tried some googling but the explanations are a bit crazy. thanks. ___ Tutor maillist - Tutor@p

Re: [Tutor] Index Out of Range?List

2017-05-04 Thread Mats Wichmann
> atm_chg.append(float( line.split()[-1] )) > > > np.asarray({atm_chg}) > > Execution still generates the errors: > > runfile('/home/comp/Apps/Python/Testing/ReadFile_2.py', > wdir='/home/comp/Apps/Python/Testing') that means you have a blank line it's reading, the result of splitting

Re: [Tutor] Index Out of Range?List

2017-05-04 Thread Alan Gauld via Tutor
On 04/05/17 13:50, Stephen P. Molnar wrote: >> I'll assume that's where the problem lies. >> Try checking if the string is not empty before using it: >> >> for line in f.readlines(): >> if line: >> atm_chg.append(float( line.split()[-1] )) > I have edited the code: >

Re: [Tutor] Pycharm Edu Lesson 3, Task 7

2017-05-04 Thread David Wolfe
Thanks all for the help. Pycharm just posted an update to their Pycharm Edu product, and when I re-ran the script, everything was fine. Best, David On Tue, May 2, 2017 at 4:27 AM, Alan Gauld via Tutor wrote: > On 02/05/17 01:42, David Wolfe wrote: > > > I'm working through Pycharm Edu, and I'm

Re: [Tutor] Index Out of Range?List

2017-05-04 Thread Stephen P. Molnar
On 05/03/2017 08:51 PM, Alan Gauld via Tutor wrote: On 04/05/17 00:32, Stephen P. Molnar wrote: import numpy as np name = input("Enter Molecule ID: ") name = str(name) You don't need the str(), input always returns a string. name_in =name[:]+'.lac.dat' And you don't need the [:]. Just us

Re: [Tutor] Index Out of Range?List

2017-05-04 Thread Alan Gauld via Tutor
On 04/05/17 13:21, Stephen P. Molnar wrote: > Here are the error messages: > > Enter Molecule ID: A > A.lac.dat > Traceback (most recent call last): > >File "", line 1, in > runfile('/home/comp/Apps/Python/Testing/ReadFile_1.py', > wdir='/home/comp/Apps/Python/Testing') There appears

Re: [Tutor] Index Out of Range?List

2017-05-04 Thread Stephen P. Molnar
On 05/03/2017 08:32 PM, Steven D'Aprano wrote: On Wed, May 03, 2017 at 07:32:53PM -0400, Stephen P. Molnar wrote: [...] When it is run I get: IndexError: list index out of range That alone is useless to us. Please post the full traceback, starting from the line Traceback (most recent c

Re: [Tutor] Python Bind DNS Zone config

2017-05-04 Thread Alan Gauld via Tutor
On 04/05/17 04:11, Nathan D'Elboux wrote: > when i run the above code it prompts me to enter the domain so i do, > then the out put is a "Value error: Unexpected '{' in field name Always, always, always post the full error message. Do not shorten it to the summary line. We can't see the location

Re: [Tutor] Python Bind DNS Zone config

2017-05-04 Thread Nathan D'Elboux
Thanks so much for your response. Ok so i now have the following code new_domain = input("Enter domain you wish to blacklist: ") print("""zone {} IN { type master; file "zones/1.2.3.4.zone"; allow-transfer { none; }; allow-query { test-test; }; };""".format(new_dom