I have left the program intact below* because I am afraid that if I cut it I
may cut out something that is essential. I am working from an existing
program that I have typed out under instructions, but am now trying to
replace the commented out section with just one command. The program with
Lisi wrote:
[...]
Fair enough. the closing quotation marks are not there.
But when they _are_ there, i.e. when that stanza reads:
target.write
line1\nline2\nline3\n
This is not the problem, but I just thought I'd mention that it's a bit
silly to go to the trouble of using newline escape
On Saturday 18 June 2011 13:37:38 Steven D'Aprano wrote:
Lisi wrote:
[...]
Fair enough. the closing quotation marks are not there.
But when they _are_ there, i.e. when that stanza reads:
target.write
line1\nline2\nline3\n
This is not the problem, but I just thought I'd mention
Lisi wrote:
But I still can't write to the file.
If I do:
target.write(line1)
The value of the variable line1 is written to the file. But if I put the
three variables into the write command, what gets printed is the name of the
variables, not their values. I am clearly still doing
Lisi lisi.re...@gmail.com wrote
But I still can't write to the file.
If I do:
target.write(line1)
The value of the variable line1 is written to the file.
That will work provided line1 is a string.
But if I put the three variables into the write command,
what gets printed is the name of
Dear Tutors,
Alright, I'm using linux (ubuntu) and I took all of your advice and I got
something that works and doesn't work at the same time. Here's the source
code for my two programs called Lock and Key:
*Lock.py: *
password = a
psswd_try = raw_input(What's the password? )
if psswd_try ==
Hello i made this program which interprets brainf***
But i don't understand why it doesn't endsand also it doesn't print
anything
import sys
cell=[0] * 3
code_pointer=0
cell_pointer=0
close_brace_pos=0
open_brace_pos=0
bf=raw_input(Input bf program:)
while
On Sat, Jun 18, 2011 at 10:02 PM, Kaustubh Pratap chand
warr...@programmer.net wrote:
Hello i made this program which interprets brainf***
But i don't understand why it doesn't endsand also it doesn't print
anything
can you tell us more about the code other than it doesn't end and
it
Jacob Bender benderjaco...@gmail.com wrote
*Lock.py: *
password = a
psswd_try = raw_input(What's the password? )
if psswd_try == password:
print correct!!!
raw_input()
else:
print wrong
raw_input()
*
Key.py*:
import sys
sys.stdout.write(a)
And all went well except for an EOF
Hello all,
I am using the configobj package to handle a ridiculously simple ini
file, which takes the form:
[favorites]
search name = search terms, search type
for any number of searches stored in the favorites section. I need the
search type, term, and name to be read in as strings, but they
On Sat, Jun 18, 2011 at 9:35 PM, Jacob Bender benderjaco...@gmail.comwrote:
Dear Tutors,
Alright, I'm using linux (ubuntu) and I took all of your advice and I got
something that works and doesn't work at the same time. Here's the source
code for my two programs called Lock and Key:
Alex Hall wrote:
Hello all,
I am using the configobj package to handle a ridiculously simple ini
What's configobj?
import configobj
Traceback (most recent call last):
File stdin, line 1, in module
ImportError: No module named configobj
It's not in the 3.1 standard library. Is it a
On 6/18/11, Steven D'Aprano st...@pearwood.info wrote:
Alex Hall wrote:
Hello all,
I am using the configobj package to handle a ridiculously simple ini
What's configobj?
import configobj
Traceback (most recent call last):
File stdin, line 1, in module
ImportError: No module named
Alex Hall wrote:
Still, it is odd (well, to me at least) that when I write
the string to the file with no quotes, I get no quotes, but using
double quotes in the string's value gives me both single and double
quotes.
Sounds to me like bad design on the part of configobj, but perhaps I'm
14 matches
Mail list logo