예제 #1
0
def convertToSCV(inputFolder, outputFolder):
    """
        Standard function to convert wave files in folders
        to their respective csv files
    """
    src = files.listDir(inputFolder)
    for f in src:
        waves = wave.loadWave(inputFolder + f)
        frames = wave.getSamples(waves)
        files.write(outputFolder + f[:-4] + ".csv", frames)
예제 #2
0
def convertToSCV(inputFolder, outputFolder):
    """
        Standard function to convert wave files in folders
        to their respective csv files
    """
    src = files.listDir(inputFolder)
    for f in src:
        waves = wave.loadWave(inputFolder+f)
        frames = wave.getSamples(waves)
        files.write(outputFolder + f[:-4] + ".csv", frames)
예제 #3
0
def interactiveAppend():
    #Define new instance of account to append
    accountToAdd = account.Account()

    while accountToAdd.setServer(raw_input('Remote server of your mail service: ')) is False:
        print 'Empty or invalid server'

    while accountToAdd.setProtocol(raw_input('Protocol [IMAP/POP3]: ')) is False:
        print 'Invalid input, IMAP or POP3 expected'

    while accountToAdd.setEmail(raw_input('Email address: ')) is False:
        print 'Empty or invalid email'

    while accountToAdd.setPassword(getpass.getpass('Password: '******'Empty or invalid password'

    while accountToAdd.setKeep(raw_input('Keep read emails [y/n] (default to yes): ')) is False:
        print 'Invalid input, \'y\' or \'n\' expected'

    #Format data to fetch procmail syntax
    parsedAccount = accountToAdd.format()
    
    #Write down to fetchmail configuration file
    files.write(conf.FETCHMAILRC, parsedAccount)
예제 #4
0
 def export(self, filename):
     write(filename, self.graph.serialize(format='ttl').decode('utf-8'))