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

Re: [Tutor] Python Bind DNS Zone config

2017-05-03 Thread boB Stepp
Hello Nathan! On Wed, May 3, 2017 at 4:40 AM, Nathan D'Elboux wrote: > > What i am trying to do is have the below syntax somehow stored into a block > of strings exactly in this syntax. I dont know what data type i should be > trying to store this as, a string obviously but how would i preserve

[Tutor] Python Bind DNS Zone config

2017-05-03 Thread Nathan D'Elboux
Hi all, I am new to python and have been studying Python 3 at uni and in my spare time for the past 6 months or so. I could probably do this in BASH given its on a linux system but am really incorporating python into my daily work as much as i can, so i have chosen python3 to implement this What