Questions tagged [tell]
37 questions
0
votes
2 answers
decrease counter in iterable obtained using 'enumerate' after a calling seek
I am reading a file using Python, and within the file there are sections that are enclosed with the '#' character:
#HEADER1, SOME EXTRA INFO
data first section
1 2
1 233
...
// THIS IS A COMMENT
#HEADER2, SECOND SECTION
452
134
// ANOTHER…

aaragon
- 2,314
- 4
- 26
- 60
0
votes
0 answers
Adding clause in Prolog
I am about to write code for my project, which is to create a database in SWI-Prolog. The program should contain ADDING, DELETING, SORTING and SEARCHING entries. My problems are:
I want to ADD 'runners' with capital letters.
When I'm addin/deleting…

Adam The Businessman
- 180
- 1
- 7
0
votes
3 answers
Perl read seek tell, and text files. Too many bytes being read. Layers and newline handling
I've a Perl script which analyses a text file (can be UNIX or windows line endings) storing file offsets when it find something of interest.
open(my $fh, $filename);
my $groups;
my %hash;
while(<$fh>) {
if($_ =~ /interesting/ ) {
…

Chris
- 538
- 8
- 19
0
votes
1 answer
python .tell() giving unexpected position in file?
I'm trying to work on a function that will change a variable in the script depending on user-input. I started to use the .tell() built-in to pinpoint the variable to be compared but, the position that it writes to is off by at least 10 bytes?
#!…

tijko
- 7,599
- 11
- 44
- 64
0
votes
1 answer
Magento "Tell a Friend " redirects to 404 page inside tab
I have showed "Tell a Friend " form in tabs on product detail page using the code below

Ayesha A
- 1
- 1
-1
votes
2 answers
Pointer position does not start from 0
i want to ask about tell() method. So, have code like this
op = open('data.txt', 'r')
pos = op.tell()
data = op.readline()
key = []
while data:
pos = op.tell()
data = op.readline()
key.append(pos)
and the result
key[:3]
[[87], [152],…

Ai Chan
- 33
- 6
-1
votes
1 answer
Telling applications to open and then to quit isn't working properly on applescript
This script is to open microsoft apps and then quit after 3 seconds
tell application "Finder"
set myFolder to ((startup disk as text) & "Applications:Microsoft Office 2011") as alias
set myFiles to (every item of myFolder) as alias list
open…
user4060984