Also, we tried removing the raw input, but it wouldn't print correct
On Sat, Jun 18, 2011 at 9:55 PM, aditya wrote:
>
>
> On Sat, Jun 18, 2011 at 9:35 PM, Jacob Bender wrote:
>
>> Dear Tutors,
>>
>> Alright, I'm using linux (ubuntu) and I took all of your advice and I got
>> something that works
Well, that's a trick me and jake learned in a book to stop the program
from changing.
On Saturday, June 18, 2011, aditya wrote:
>
>
> On Sat, Jun 18, 2011 at 9:35 PM, Jacob Bender wrote:
>
> Dear Tutors,
>
> Alright, I'm using linux (ubuntu) and I took all of your advice and I got
> something t
On Sat, Jun 18, 2011 at 9:35 PM, Jacob Bender wrote:
> 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
"Jacob Bender" 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 error caused
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
As always, Alan has given a lot of great advice and useful information.
There's just one piece at the end I would question, however:
On 14-Jun-11 16:36, Alan Gauld wrote:
> python reader.py < `python writer.py`
Almost, but not quite. The backticks mean the command is executed and
the output
"Jacob Bender" wrote
I know how to do it in the command line, but not through another
program.
Generating the random tries for the password isn't the issue, but
entering
the password(s) in between the two programs is an issue because I
don't know
how to make programs communicate through raw
On 14-Jun-11 15:48, Steven D'Aprano wrote:
Normally you would do this by redirecting standard input. What operating
system are you using? In Linux, you would do something like:
# run script foo.py taking input from the output of bar.py
foo.py < bar.py
Actually, no, that will send the *source
Jacob Bender wrote:
Dear Python Tutors,
I was wondering how to break into my one program I made using brute force
methods. Here's the code:
password = "Helloworld"
try= raw_input("What's the password?")
while try != password:
try = raw_input("Incorrect, what's the password?")
I know how t
Dear Python Tutors,
I was wondering how to break into my one program I made using brute force
methods. Here's the code:
password = "Helloworld"
try= raw_input("What's the password?")
while try != password:
try = raw_input("Incorrect, what's the password?")
I know how to do it in the command
10 matches
Mail list logo