by: Alex Hopson |
last post by:
I'm trying to read an html file from my local server into a string, I'm
using the following code:
$attfile = $attachment; //create filenames
$file_name = basename ($attfile);
$lines =...
|
by: Rajarshi Guha |
last post by:
Hi
I have a file containing 168092 lines (each line a single word) and when
I use
for line in f:
s = s + line
it takes for ages to read it all in - so long in fact that it makes the
program...
|
by: Kevin T. Ryan |
last post by:
Hi All -
I'm not sure, but I'm wondering if this is a bug, or maybe (more
likely) I'm misunderstanding something...see below:
>>> f = open('testfile', 'w')
>>> f.write('kevin\n')
>>>...
|
by: Xah Lee |
last post by:
# -*- coding: utf-8 -*-
# Python
# to open a file and write to file
# do
f=open('xfile.txt','w')
# this creates a file "object" and name it f.
# the second argument of open can be
|
by: sahukar praveen |
last post by:
Hello,
I have a question.
I try to print a ascii file in reverse order( bottom-top). Here is the logic.
1. Go to the botton of the file fseek(). move one character back to avoid the EOF.
2....
|
by: Michael Mair |
last post by:
Cheerio,
I would appreciate opinions on the following:
Given the task to read a _complete_ text file into a string:
What is the "best" way to do it?
Handling the buffer is not the problem...
|
by: Andrew Robert |
last post by:
Hi Everyone.
I tried the following to get input into optionparser from either a file
or command line.
The code below detects the passed file argument and prints the file
contents but the...
|
by: Ron |
last post by:
Hello everyone,
I've created a functioning ATM program, a bank machine.
Now I want to implement usernames and Pins into it. So I have a text
file with this info.
BILL, 1111
TOM, 2222...
|
by: 7stud |
last post by:
I can't break out of the for loop in this example:
------
import sys
lst =
for line in sys.stdin:
lst.append(line)
break
|
by: WATYF |
last post by:
Hi there... I have a huge text file that needs to be processed. At the
moment, I'm loading it into memory in small chunks (x amount of lines)
and processing it that way. I'd like the process to be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|