Shinobi Life Online

Art Category => Programming => Topic started by: KimotoHaikye on July 10, 2016, 17:25:35

Title: Python - File usage
Post by: KimotoHaikye on July 10, 2016, 17:25:35
So,
I'm quite good with python already,
But I need to know how to use pythons file usage thing, (Where you bring in the file normally using)
file = open('FILENNAME.txt, 'r'')
Yeah, that ^
And my problem is,
How do I use two files one holding usernames and the next holding passwords, and use them so I can successfully get prompt to log-in when the right username and the right password are entered.
If you need any more info about it just ask,
Also if you need help with python, just PM.
-Arigato
Title: Re: Python - File usage
Post by: Dragon6624 on July 11, 2016, 00:59:32
So,
I'm quite good with python already,
But I need to know how to use pythons file usage thing, (Where you bring in the file normally using)
file = open('FILENNAME.txt, 'r'')
Yeah, that ^
And my problem is,
How do I use two files one holding usernames and the next holding passwords, and use them so I can successfully get prompt to log-in when the right username and the right password are entered.
If you need any more info about it just ask,
Also if you need help with python, just PM.
-Arigato

Starting notice: I'm terrible at all things detail/logistics related -- including Python (which is why I haven't gotten past the first two pages of the tutorial; I zone out a lot due to a pathetic work ethic). Hooowwweever, I'm always up for trying my hand at theory. In this case, would it work to utilize some sort of argument based on *If X Then Y*? If username is entered and rings true, move on to password entering -- if password is entered and rings true in accordance to the username, then et cetera...?

At least, that's the simplest thing I can think of...probably because I'm a simpleton to start. If you --likely-- already tried that, apologies for wasting your time, twas only trying to help (Aka: I am newb, plz don't bash me).