Questions tagged [txt]

txt is the conventional filename extension of text files.

1467 questions
1
vote
1 answer

IOException: The process cannot access the file 'fileName/textFile.txt' because it is being used by another process

I saw other threads about this problem, and non of them seems to solve my exact problem. static void RecordUpdater(string username,int points,string term) //Updates Record File with New Records. { int minPoints = 0; …
Bor1s
  • 13
  • 2
1
vote
3 answers

Parse flat-file (positional text-file) to read the wavelength

I have the next txt with data: FI R 83.0000m 34.960 1.1262 Fe 2 1.32055m 33.626 0.0522 N 2 5754.61A 33.290 0.0241 TI R 1800.00m 33.092 0.0153 Fe 2 1.24854m 32.645 0.0054 N 2…
Joan Lopez
  • 47
  • 6
1
vote
1 answer

Python - file does not write all of the data

I have JSON data which I am pulling in via API. here's my code # list of each api url to use link =[] #for every id in the accounts , create a new url link into the link list for id in accounts: …
mrOlympia
  • 311
  • 1
  • 2
  • 12
1
vote
2 answers

Python: how to save text + element from the list to the txt file

I'm learning Python and I'm trying to combine saving text + specific element from the list to a txt file. I managed to get the text out and it looks like this: Project name: Main worker: Project name: Main worker: and this is fine but I would like…
Brijac
  • 27
  • 4
1
vote
0 answers

txt file import in DBeaver

I'm novice user of sql, I just learned about that database management is convenient using DBeaver in offline environment. Questions are as follows: Attempt to retrieve txt file data with \t delimiter from dbeaver. When importing CSV file table from…
1
vote
2 answers

How to programmatically edit a text file?

I have a file called "answer" with "NO" written in it. But in a certain moment of my code I want to change it to "YES". Doing this: file = open("answer.txt", mode="r", encoding="utf-8") read = file.read() print(read) The output is: NO I know mode =…
andreadebe
  • 27
  • 3
1
vote
2 answers

What is the syntax for writing txt file with multiple numpy arrays+scalars and how to read it in again?

I have 2 numpy arrays of same length lets call them A and B and 2 scalar values named C and D. I want to store these values into a single txt file. I thought of the following structure: It doesnt have to have this format I just thought its…
trynerror
  • 219
  • 2
  • 12
1
vote
1 answer

Python how to export a print view to txt

I have a print that works perfectly to me since I use tabulate: print(tabulate(query, headers= 'keys', tablefmt = 'psql')) And I would like to export this print to a txt file just the way it looks in terminal. Thanks for your support!
Berny
  • 113
  • 11
1
vote
3 answers

Compare txt files - Powershell

I have two txt files. Both contain a list of usernames: List 1: user1 user2 user3 List 2: user1 user2 user7 I want to compare these two lists. I want to know which users do not exist in both lists. So the output in this case should be a this…
user18209625
  • 139
  • 2
  • 15
1
vote
2 answers

When I try to read a file, it returns a blank line

I am trying to open a file - a relatively simple block of code. I have done this before with no problems but this time, even after restarting my laptop and trying on other softwares than VSC, it is still not working. It is just returning a blank…
X123X
  • 11
  • 1
1
vote
1 answer

How to extract and sort specific elements from a huge txt file to csv?

I'm trying to create a powershell script to extract all lines containing "ERROR" and its database path to the item into a huge logs txt file and sort it into a csv file. Example of error : 2022-04-17 00:00:00.9999|ERROR|texte:texte|texte…
Heighties
  • 21
  • 3
1
vote
3 answers

Flutter can't find txt file

I'm trying to use the INI Package to read a file, but when I'm trying to access the file just by reading its contents I get the following error: No such file or directory. Here is the faulty code: class _FactsListScreenState extends…
Code Clickers
  • 85
  • 1
  • 10
1
vote
0 answers

Saving the content of an html input box

How can I save the contents of an input box into a .txt file in html? I am gonna steal your name

HTML Forms

user18465514
1
vote
1 answer

How do I line break while also disabling code being executed in textarea?

I have PHP set up for a textarea that prints text from a directory to separate divs.
",array_map(function ($v) { return file_get_contents($v); }, glob(__DIR__ . "/posts/*.txt"))); echo…
Tecior
  • 21
  • 6
1
vote
2 answers

Get content from txt file and put it in a list Flutter/Dart

this is my first question here on stackoverflow. Before i get into the question itself, i want to point out that i'm a beginner on Flutter and Dart and have no previous experience in mobile development. Now, as the title says i'm having some issues…