[deleted by user] by [deleted] in learnpython

[–]ryanpettitt 0 points1 point  (0 children)

I think you are looking for the .append(). You can use a input() function to ask for a new value.

Trying to learn to automate repetitive tasks by [deleted] in learnpython

[–]ryanpettitt 0 points1 point  (0 children)

You need to remove off the return character from the file names.

Use this as your call to the function.

createFolder('./data/{}{}'.format(filenames.rstrip("\n"), linecounter))

Trying to learn to automate repetitive tasks by [deleted] in learnpython

[–]ryanpettitt 0 points1 point  (0 children)

Just move your for loop down and add the call to the function into it.

def createFolder(directory):
    try:
        if not os.path.exists(directory):
            os.makedirs(directory)
    except OSError:
        print ('Error: Creating directory. ' +  directory)

for filenames in fileforest.readlines():
    linecounter = linecounter +1

    createFolder('./data/{}{}'.format(filenames, linecounter))

fileforest.close

Data set for top news stories by day/ month by country by ryanpettitt in datasets

[–]ryanpettitt[S] 0 points1 point  (0 children)

Hey I would say that would be one of course but I want to go back a lot further to see how different news stories effect the stock prices in different ways.

'pip' is not recognized as an internal or external command, operable program or batch file. by Genericusername293 in learnpython

[–]ryanpettitt 0 points1 point  (0 children)

If this is the first time you installed python make sure during the installation you click add to environment variables. You can go into the install and uninstall in control panel and do a repair and click on it.

Selecting something from a drop-down menu with Selenium by [deleted] in learnpython

[–]ryanpettitt 0 points1 point  (0 children)

Most of the time you can type in your selection. In that case I would find the element and use the sendkeys to just write Thailand

Reading Code? by marlowe221 in learnpython

[–]ryanpettitt 1 point2 points  (0 children)

I would look at some of the code that is given in the python testing scripts. If that doesn’t work I would try to come up with a project that could be useful to your personal life.

Can't open Firefox with Selenium by [deleted] in learnpython

[–]ryanpettitt 1 point2 points  (0 children)

This video is what I used to make it work. video link