dcsimg
Linux Today: Linux News On Internet Time.




More on LinuxToday


Python4Kids New Tutorial: Minecraft config editor ? Part, the Ultimate

Apr 01, 2012, 19:03 (0 Talkback[s])

WEBINAR:
On-Demand

Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers


[ Thanks to Brendan Scott for this link. ]

"This is our final instalment [sic] of our Minecraft config editor. In the earlier tutorials we have done everything except actually updating the file. Before we do update the file though, we need to make a backup of it, so it?s these two things that we?re going to do now.

"All of the action will be in changing the behaviour of the ?Ok? button so that it makes a copy of server.properties into a new file called server.properties.bup and then writes the updated data to the server.properties file. There is a small amount of work in making a copy of the file so we are going to do it in a separate function. The function is not very smart. It reads all of the data from the existing file and then just writes it out to the new file:"

Complete Story

Related Stories: