On 06/07/16 15:04, loh...@tuta.io wrote:
> script, filename = argv
> txt = open (filename)
>
> print "Here's your file %r: " % filename
> print txt.read()
>
> print "Type the filename again: "
> file_again = raw_input("> ")
>
> txt_again = open(file_again)
> print txt_again.read()
> why do I
On Wed, Jul 6, 2016 at 10:59 AM wrote:
> why do I have to create a variable txt_again to assign it to the open
> function and them print the file?
> why is it that I can't only write something like open(file_again).read()?
>
Good insight. In fact you don't need to create the variable. The code `
first, sorry everyone for having attached the file instead of just typing it
here.
second, thanks a lot for the replies; even though I gave you no code it was
quite helpful!
the code was this:
from sys import argv
script, filename = argv
txt = open (filename)
print "Here's your file %r: " % fi
loh...@tuta.io wrote:
> hey everyone. this is my first time trying this -- actually, I've been
> studying python only for some days now, and I'm afraid my questions are
> going to be rally simple, but I can't seem to understand this piece of
> code and thus can't move on.
You seem to be talki
On 06/07/16 00:56, loh...@tuta.io wrote:
> hey everyone. this is my first time trying this
Welcome, but...
> you probably know the book,
Sorry, I don't and I suspect I'm not alone.
It's probably a fine book, but we don't all know it.
> so you know that zed always makes us write code
> so tha
On Tue, Jul 5, 2016 at 8:24 PM wrote:
> I'm having trouble with most of the lines here.
>
It looks like you tried to attach a file. This mailing list does not allow
attachments. Instead, could you paste the code into your email?
> things that I don't understand:
> 1. the need to put script int
Hi Heloisa, and welcome.
Do you have a link to the code? Or better still, if it is short (say
under fifty lines) can you copy it into an email and send it?
On Wed, Jul 06, 2016 at 12:56:19AM +0100, loh...@tuta.io wrote:
[...]
> 1. the need to put script into an estipulation for argv (line 3)
I
Welcome!
On 07/05/2016 06:56 PM, loh...@tuta.io wrote:
hey everyone. this is my first time trying this -- actually, I've been
studying python only for some days now, and I'm afraid my questions are going
to be rally simple, but I can't seem to understand this piece of code and
thus can't mov
hey everyone. this is my first time trying this -- actually, I've been
studying python only for some days now, and I'm afraid my questions are going
to be rally simple, but I can't seem to understand this piece of code and
thus can't move on.
you probably know the book, so you know that zed