Hack Forums
[Python] facebook acc save doesnt output txt file with output - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] facebook acc save doesnt output txt file with output (/showthread.php?tid=5549585)



facebook acc save doesnt output txt file with output - mr_pedowbear - Feb 12, 2017

hi
i wanted to make a simple program that takes my input and saves it in a txt file
sadly it doesnt want to work
PHP Code

<?php 
name 
= input("facebook user name: ")
email  = input("facebook user email : ")
password = input("facebook user password: ")
print (
name,email,password)
fw =open('Facebook.txt','w')
fw.write(' \n')
fw.write(name)
fw.write('\n')
fw.write(email)
fw.write('\n')
fw.write(password)
fw.write('\n') 



* - Riԁdle - Feb 12, 2017

try adding fw.close() at the end

Code
name = input("facebook user name: ")
email  = input("facebook user email : ")
password = input("facebook user password: ")

print("Name: %s \n Email: %s \n Password: %s" % (name, email, password))

fw =open('Facebook.txt','w')
fw.write(name + "\n" + email + "\n" + password)
fw.close()



* - HFDone - Feb 12, 2017

(Feb 12, 2017 09:41 AM)Ghosting12 Wrote:  try adding fw.close() at the end

try ? you need to close the file


* - Riԁdle - Feb 12, 2017

(Feb 12, 2017 09:44 AM)HFDone Wrote:  try ? you need to close the file

??? what was the point of this post


* - HFDone - Feb 12, 2017

the point was to learn you that if you open file you need to close it if you dont close it you will open new thread as op asking why its not working


* - mr_pedowbear - Feb 12, 2017

(Feb 12, 2017 09:53 AM)HFDone Wrote:  the point was to learn you that if you open file you need to close it if you dont close it you will open new thread as op asking why its not working

HFdone is correct i forgot to do that 🤝


* - Riԁdle - Feb 12, 2017

(Feb 12, 2017 09:53 AM)HFDone Wrote:  the point was to learn you that if you open file you need to close it if you dont close it you will open new thread as op asking why its not working

yeah I know that's why I told him to try it??? hello??


* - mr_pedowbear - Feb 12, 2017

only problem that i have now that it does not make a txt file for me idk why xD


* - HFDone - Feb 12, 2017

saying try means maybe while its not maybe its for sure which put you as guessing


* - Aveling - Feb 12, 2017

The .txt file should be generated at the same directory where your script is located. Are you getting any error? Try manually creating the .txt file and see if the script updates the file?


* - mr_pedowbear - Feb 12, 2017

(Feb 12, 2017 10:08 AM)Aveling Wrote:  The .txt file should be generated at the same directory where your script is located. Are you getting any error? Try manually creating the .txt file and see if the script updates the file?

i putted it in a map and tried to do it on my desktop still does not want to work