txt is the conventional filename extension of text files.
Questions tagged [txt]
1467 questions
1
vote
1 answer
Comparing dynamic files for common entries using Python Pandas
I have N number of .txt files each having thousands of IP addresses in a directory(for eg. /var/logs). The file's name starts with 'log', for example, log01.test.co.net, log02.hello.co.net, log01.domain.co.net, etc. I need to add the IPs from each…

Peter Walker
- 13
- 5
1
vote
2 answers
Take line from .txt file and display in html page
I want to make a small project for my girlfriend and what I had in mind was to have an HTML page that says "I Love". On the press of a button the website would display under the text a random line from a text document I have made with all the things…

Thomas Iacconi
- 31
- 3
1
vote
1 answer
combining thousands of list strings in python
I have a .txt file of "Alice in the Wonderland" and need to strip all the punctuation and make all of the words lower case, so I can find the number of unique words in the file. The wordlist referred to below is one list of all the individual words…

gavmross
- 21
- 4
1
vote
1 answer
PrintWriter writes some other characters in text file when trying to print prime numbers between 2 to 1000
I'm trying to print prime numbers between 2 and 1000 but it is writing some other characters in text file
Here is the contents of my TreeSet:
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89,
97, 101, 103,…

mps88
- 33
- 4
1
vote
0 answers
Is there a way to use an SQL Server Agent to write a .txt report file after multiple steps?
Goodmorning fellow programmers,
I'm working on a company's server, trying to implement daily check functions on our databases via SQL server agents.
These functions are scheduled to run every morning, do their things (mostly check on conflicts…

Redd0beard0
- 13
- 4
1
vote
1 answer
Parse nested JSON file, take out specific attributes and create .txt files out of it
So I am having here one big JSON file which looks like this:
data = {
"Module1": {
"Description": "",
"Layer": "1",
"SourceDir": "pathModule1",
"Attributes": {
"some",
},
"Vendor":…

John
- 230
- 2
- 12
1
vote
1 answer
php - Parsing Chinese text to json
txt I have looks like :
紐約建築藝術 陳偉銘 藝術 2016/02/15 在館內
人體百科全書 蘇煥文 科學 2017/09/30 已借出
塞納河畔 葉國威 文學 2017/09/25 已預約
性別與教育 陳文輝 社會學 2016/10/12 已借出
台灣當代社會變革 林東興 社會學 2014/04/17 已借出
and I want to output a json array file looks like :
{
"books":[
{"title":" 紐…

SAM_BOOM
- 33
- 6
1
vote
4 answers
Looping through a txt file
I have a txt file with a list of artists, songs, and genres in the following format:
song 1
genre 1
artist 1
song 2
genre 2
artist 2
etc.
I'm given an artists name and if the artist is in the file I have to return the name of their song. The…

lbarros
- 19
- 2
1
vote
2 answers
How can I read special characters from a file?
When I'm opening a .txt file with special characters such as ö and ä, they look like this in the .txt file � and like this when I open loop through the lines ¿½. How can I read them with the real special characters? I need to compare strings and if…

Nicke7117
- 187
- 1
- 10
1
vote
1 answer
issue with python and whatsapp
I extracted the data from whatsapp into a txt file
I need to create 4 columns Date, Time, Name and Message in my output file
import pandas as pd
# read file by lines
with open('D:\Analysis\example_chat_whatsapp.txt', encoding="utf-8") as f:
…

jfcb
- 9
- 4
1
vote
2 answers
Can't read text file in VS code (Python)
So I have this Python code in VS Code:
s = open("name.txt")
print("Your name is", s)
I have the text file "name.txt" in the same folder as the program I'm running. This text file just contain the text "Johnny".
When running the file, I first got…

KishuInu
- 61
- 7
1
vote
1 answer
Copy text file as string
How can I copy a text file as a single column in PostgreSQL (basically copy a text file with no delimiters for columns)?
drop table if exists txt_file;
create temp table txt_file
(
string text
);
copy txt_file (string) from '(...)/functions.txt'…

SamuelFernandes
- 35
- 3
1
vote
1 answer
Extracting specific value from multiple text files from folder using python and store it in Excel sheet
I have multiple text files in a folder where data is the form of-
text file 1 and text file 2
I want to extract the file name and IOS value from text file 1 and file name and MB/s value from text file 2 and store it in excel file
here's my…

sherkhan
- 17
- 3
1
vote
1 answer
Python3 fpdf is giving me an error latin-1 codec can't encode character
When I run the code below I get the following traceback:
Traceback (most recent call last):
File "C:\demo\test.py", line 11, in
pdf.output("splintered.pdf")
File "C:\demo\lib\site-packages\fpdf\fpdf.py", line 1065, in output
…

Silver Wolf2r
- 64
- 6
1
vote
3 answers
How do I transform a non-CSV text file into a CSV using Python/Pandas?
I have a text file that looks like this:
Id Number: 12345678
Location: 1234561791234567090-8.9
Street: 999 Street AVE
Buyer: john doe
Id Number: 12345688
Location: 3582561791254567090-8.9
Street: 123 Street AVE
Buyer: Jane doe @ buyer % LLC
Id…

SupaDupa
- 91
- 2
- 10