txt is the conventional filename extension of text files.
Questions tagged [txt]
1467 questions
1
vote
2 answers
How to use *args for unlimited parameters with concatenation
I am coding a python database relying on txt file's. I have one function that has some parameters. Here is the base code:
def store_new_content(mainfield,filename,f1 = None,f2 = None,f3 = None,*arg):
file1 = open(f"{filename}.txt","w")
…
user15651060
1
vote
2 answers
C# .NET5 Single File Application Read and Parse Json / Txt or other file formats from directory
I am reading files on .NET Framework like this:
string path = AppDomain.CurrentDomain.BaseDirectory + @"sources\settings.json";
string jsonResult = File.ReadAllText(path);
return JsonConvert.DeserializeObject(jsonResult);
When I switch to…

fatihyildizhan
- 8,614
- 7
- 64
- 88
1
vote
1 answer
txt. file not editible from website local hosted on raspberry pi using php
I've programmed a web app for my Family, to regulate the Meals in a week, this website is locally hosted on my new Raspberry Pi. To store the Data (The Meals for everyday) a txt.file is used. I've also programmed a Site where Family members can…

student
- 11
- 1
1
vote
2 answers
Loading the nth line of a txt file in python without loading the whole file
I have a large txt file that is split into lines. I want to load the nth line of this file for use in a for loop in my code. I can't however load the whole array then slice it because of the RAM (the whole file is like 500GB!). Any help would be…

user13375288
- 11
- 1
1
vote
3 answers
A beginner task in python with txt data processing, sum of numbers in a column
I have a big txt file, with datas like this format:
Name Points
Joe 1
Joe 5
Anna 6
Anna 1
Eva 9
Eva 6
(There is more line and name, but the same number of lines per name.)
And I need the sum of the numbers by names in a list, and the main goal is…

Calm
- 23
- 2
1
vote
1 answer
How to convert non-English characters into a string that can be read and on which string similarity can be performed?
This is a javascript/node/Express problem. I am working on the backend to make speech recognition, and specifically scoring that speech for similarity to some reference sentence, work. When I use English for the language, there is no problem and I…

Honeybear65
- 311
- 1
- 10
1
vote
0 answers
I'm trying do download a simple .txt with a php file but it does not work
In my project there is a part where when the user click a button, it downloads a .txt file containing some strings.
I run this code in a file .php. The .php file creates ever the .txt file but it doesn't download it into the…

Leonardo Carlassare
- 17
- 4
1
vote
0 answers
Powershell multiple .sql files to custom .txt files
I am totally new to Powershell. I feel as though I have exhausted looking on the internet, but I also know that this answer should be easy.
I want a loop to:
Run 50 SQL files
Save them as a custom named txt file
For example, if SQL Files…

Leigh
- 11
- 3
1
vote
2 answers
Scala Map from Test File
Looking to create a scala map from a test file. A sample of the text file (a few lines of it) can be seen below:
Alabama (9),Democratic:849624,Republican:1441170,Libertarian:25176,Others:7312
Alaska…

l0kation
- 31
- 6
1
vote
0 answers
Verify Domain In Apple Business Manager With AWS
I have set up an account up with Apple Business Manager, I have added a custom domain and it requires verification of domain ownership. My domain is registered with AWS and I can not find any documentation on how to do this. There are examples for…

user3182518
- 217
- 4
- 6
- 13
1
vote
1 answer
Read TXT or DAT file in Python
I need to read a .DAT or .TXT file, extract the column names and assign them to new names and write the data to a pandas dataframe.
I have an environment variable called 'filetype' and based on it's value(DAT or TXT), I need to read the file…

user11580242
- 63
- 8
1
vote
1 answer
How do I replace a line in a txt file with a line from another txt file in Python
I have two txt files:
Dummy-dates.txt contains:
0/0/0000|
1/0/0000|
2/0/0000|
etc... up to 31.
single-dates.txt contains:
2/0/0000|Johns Bday
6/0/0000|Some other cool date
etc.. can have random number of lines within 1-31 in the start
I need to…

Jacob
- 29
- 4
1
vote
2 answers
Convert TXTto CSV
I'm working on a project where I need to take a text file and make it an excel file. So far what I've come up with is this.
cls
Remove-Item -path D:\Users\zabin\OneDrive\Desktop\ITS3410\WEEK8\MainWarehouse.csv
Add-Content -path…

edward zabinski
- 39
- 4
1
vote
1 answer
How to modify the value of a Yolo .txt file in python
I want to modify a folder with .txt files
The txt file look like this:
3 0.695312 0.523958 0.068750 0.052083
3 0.846875 0.757292 0.071875 0.031250
3 0.830469 0.719792 0.067187 0.035417
My idea is take all the .txt files and change inline the first…

José Benítez
- 37
- 6
1
vote
1 answer
Is there a way to load in multiple .txt files and list them after so the encoding can be changed?
I am trying to load multiple .txt files into a corpus. I've set up the working directory and then have the following to load the files:
filenames <- list.files(getwd(),pattern="*.txt", full.names=FALSE)
The problem is, some of the text file names…

Katherine Drotos
- 11
- 2