ftp_client module

exception ftp_client.CouldNotFindPropertiesException[source]

Bases: exceptions.Exception

An Exception that is raised when the ‘server.properties’ file could not be found at the default directory of the FTP Server

exception ftp_client.CouldNotFindWorldFolderException[source]

Bases: exceptions.Exception

An Exception that is raised when the world directory that is specified in the the ‘server.properties’ cannot be found

class ftp_client.FTPClient(ip, username='anonymous', password='')[source]

Wrapper client to download and upload worlds to a FTP Server

cleanup()[source]

Closes the FTP connection and removes all leftover files from the ‘ftp’ directory

download()[source]

Downloads all files in the current FTP directory with their corresponding paths

get_level_path()[source]

Gets the local path to the downloaded FTP world

safe_download()[source]

Changes the FTP client’s working directory, downloads the world, then switches back to the original working directory

upload()[source]

Uploads an edited world to the current FTP server connection

upload_new_world(world)[source]

Uploads a new world to the current FTP server connection

Parameters:world (InfiniteWorld) – The InfiniteWorld object for the world to upload
exception ftp_client.InvalidCreditdentialsException[source]

Bases: exceptions.Exception

An Exception that is raised when the supplied Username/Password is denied by the FTP Server