Alan Gauld wrote:
This is a bad choice of class. It is a verb which is indicative
that its not an object. Objects are nearly always nouns.
You could use GuessableNumber.
Then it would have a number attribute which is the number
to guess. It could have a generate() ,method which produces
a new
Alan Gauld wrote:
"David" wrote
class GuessError(Exception): pass
class GuessedNumber:
def __init__(self,tries=None,limits=None):...
def generate(self, limits=None):...
def __cmp__(self, aNumber):
if self.count >= self.tries: raise GuessError
Thanks a
Charlie Reddington wrote:
Thanks for all the replies, I'll definitely look into it all.
Charlie
Something else for your consideration;
http://commandline.org.uk/python/sftp-python-really-simple-ssh/
--
Powered by Gentoo GNU/Linux
http://linuxcrazy.com
__
David wrote:
Charlie Reddington wrote:
Thanks for all the replies, I'll definitely look into it all.
Charlie
Something else for your consideration;
http://commandline.org.uk/python/sftp-python-really-simple-ssh/
almost forgot pexpect
#!/usr/bin/python
import pexpect
Hi Tutors,
I have a web cam that saves files in /var/log/motion and it can get
quite large so I clean it every few days. I came up with this;
#!/usr/bin/python
import commands
import os
from sys import exit
def clean_motion():
folder = '/var/log/motion'
if os.path.exists(folder):
Luke Paireepinart wrote:
On Tue, Jul 7, 2009 at 8:36 PM, David <mailto:da...@pythontoo.com>> wrote:
Hi Tutors,
Hiya david. Cool e-mail address :)
Thanks, want l...@pythontoo.com I have a few to spare :)
But if there are no files in the directory it never gets to
s at a time and check each one to make sure
it works, plus this gives me encouragement to continue.
-david
--
Powered by Gentoo GNU/Linux
http://linuxcrazy.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Windows system. Otherwise some of the tools Dawson introduces will not
work.
So, start here, and move on to McGugan's book thereafter.
David
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
as to
how to uncloud the thick information fog that any beginning programmer
has to wade through, the very first steps in learning Python could be
made more easy.
What insights can you share?
Curious,
David
___
Tutor maillist - Tutor@python.org
http:
Hi,
there also is:
"Invent Your Own Computer Games with Python", which apparently does not
use pygame (like Dawson).
http://pythonbook.coffeeghost.net/
I can't comment on the quality.
David
Mazhar Hussain wrote:
> Hello All! My name is Mazhar Hussain, and I am new to pytho
oes a new the director ID come from?
Thanks for your directions!
David
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Rich,
thanks a lot -- that was the problem.
David
Rich Lovely wrote:
> 2009/7/25 David :
>
>> Dear tutors,
>>
>> I am trying to teach myself the way Python's works with databases.
>> I decided to start with SQLite, and am looking at Summerfield's
>&
syntax:
help(random)
help('operator')
I figured this by trial and error, and I am keen to find out when the
help() function is to be supplied with a string, and when no '' is
required. It certainly does not seem intuitive to me!
Thanks to you all -- good stuff, as always!
David
Alan Gauld wrote:
>> help('operator')
>>
>> I figured this by trial and error, and I am keen to find out when the
>
> Oops, always try before posting! And don;t assume...
>
> I juast vdid and you are r
the [X] button!
Cheers for a hint,
David
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
try:
number = int(line)
except ValueErr as err:
print( "BLARGH : ", err )
continue
total += number
count += 1
else:
break
if count:
print "count =", count, "total =", total, "mean =
help but to make
it a python program I have used distutils;
http://wiki.python.org/moin/Distutils/Tutorial
Now to get it cross platform I have no idea.
-david
--
Powered by Gentoo GNU/Linux
http://linuxcrazy.com
___
Tutor maillist - Tutor@python.org
shellc...@juno.com wrote:
I want to know how to use multiple parameters for 1 function
def display(message):
print message
def rate_score():
score = rate_score
if rate_score <= 999:
print "that's nothing."
elif rate_score <= 1:
print "ok."
elif rate_score >=
David Jamieson wrote:
Hi All,
looking for some advice on using Python with MySQL for test data
storage. What builds of Python work well with MySQL and what modules
allow the connection to the database and data transfer activities.
SQLAlchemy is one option;
http://www.rmunn.com/sqlalchemy
David Eric wrote:
On Tue, Oct 13, 2009 at 5:17 PM, Kent Johnson <mailto:ken...@tds.net>> wrote:
On Tue, Oct 13, 2009 at 4:38 PM, David Eric mailto:cii...@gmail.com>> wrote:
> as far as print zip_command, i would add that to the program
however, doesnt
&
running 'make install' i am getting the following error :-
You are on the wrong list, try the Fedora mail list [1] or irc [2]
[1] https://www.redhat.com/mailman/listinfo/fedora-list
[2] http://fedoraproject.org/wiki/Communicate#IRC
--
David Abbot
Hi,
Kent Johnson wrote:
> Python in a Nutshell is good if you want a compressed but readable
> introduction.
I am thinking of buying this one, but the topical 2nd edition is from
2006. Does anyone know if a new version, covering Python 3, is coming to
market soonish?
tring or read-only character buffer, not int
Hi Ken,
From the docs if you are using 2.6
[snip]
To write something other than a string, it needs to be converted to a
string first:
>>> value = ('the answer', 42)
>>> s = str(value)
&
hat):
pass def
do(self): cmd =
raw_input('>') if cmd ==
'l':
self.look() elif cmd in
['n','s','e','w']:
self.move(cmd) elif cmd ==
'quit':
> You might want to make coords an init parameter for Room, rather than
> assigning it separately. You could also have Rooms register themselves
> with world as part of their initialization, that would be better than
> having to repeat yourself in the definition of world.
brilliant! i'll do th
i am attempting to write a dig function that will create rooms.
i have succeeded only in getting a headache :)
any suggestions on where i am going wrong would
be super helpful.
thanks,
david
world = {}class Room: def
__init__(self,name,coords):
self.contents = [] self.name
7;dig':
self.dig(target)
else:
print 'what?'
class Thing: def
__init__(self,name): self.name =
name
p =
Player('david')room1 = Room([0,0])room1.name = 'startroom'p.location
= room1sword = Thing('
hello :)
i have some questions that are more about
programming in general than python specifically.
suppose, for whatever reason, you had a burning
desire to write a simple text adventure.
how would you start? would you just start writing
some code?
i knew i wanted a room structure or object
self.describeroom()
else:
print 'what?'
class Thing: def
__init__(self,name): self.name =
name
def opdir(direction): if direction ==
'n': return
's' if direction ==
's': return
'n' i
sorry i forgot a subject line. i have looked at the
pickle module and was able to pickle world.
but i can't figure how to restore everything.
- Original Message -
From:
david
To: tutor@python.org
Sent: Saturday, December 03, 2005 8:36
PM
Subject: [Tutor
programs state (is that correct usage?)
could be important in many different
programs.
- Original Message -
From:
Dan Lowe
To: david
Cc: tutor@python.org
Sent: Sunday, December 04, 2005 1:24
AM
Subject: Re: [Tutor] my text
adventure
On Dec 3, 2005,
#x27;:
self.describeroom() elif verb ==
'save':
self.save()
else:
print 'what?'
class Thing: def
__init__(self,name): self.name =
name
def opdir(direction): if direction ==
'n': re
i fixed this myself !
i think i can get everything working now so please
disregard previous messages.
if you haven't already. :)
- Original Message -
From:
david
To: tutor@python.org
Sent: Sunday, December 04, 2005 10:06
AM
Subject: [Tutor] (no subject)
stance at
0x00E7BFD0>]startroom{'n': <__main__.Room instance at
0x00E7BFD0>}nextroom{'s': <__main__.Room instance at
0x00E08EB8>}>world{(0, 1): <__main__.Room instance at
0x00E7BFD0>, (0, 0): <__main__.Room instance at
0x00E08EB8>}>save>quitTraceba
thanks that was very helpful. i added all that stuff because i was
trying to figure out some way of getting at the descriptions and exits.
that is the part i'm stuck on. but knowing that world is all i need is
good because i can focus my efforts better. thanks.
> You could make your save() metho
i.exits
else:
print 'what?'
class Thing: def
__init__(self,name): self.name =
name
def opdir(direction): if direction ==
'n': return
's' if direction ==
's': return
'n' if directi
ielded',self.wielded
print 'on head',
self.headwear
for a in
self.inventory:
print a.name elif verb
==
'wield':
self.wield(target) else:
print 'what?'
class Thing: def
__init__(self,
suppose you have a list of words and you
want to unambiguously identify
each word in the list with the shortest number of
characters.
for instance a list like : kill, kiss,
take
i would want to get take just by typing
t.
but you would have to type kil or kis to get kill
or kiss.
where shoul
thanks for tries and bisect. this led me to the
wikipedia article
http://en.wikipedia.org/wiki/Search_algorithm
which was where i was looking to start. so, i think
the simplest
approach to search through a short list would
be a brute force
algorithm. like so :
get a letter and compare it to
::= is bnf notation for "is defined
as"
please spend that extra minute googling
before
you bother all the nice people on this
list.
- Original Message -
From:
david
To: tutor@python.org
Sent: Saturday, December 10, 2005 6:23
AM
hello every
hello everyone. i was looking at python docs and i
came across this
letter ::=
lowercase | uppercase
what does ::= mean?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
i am thinking that string.upper and string.lower
may be what you are looking for.
- Original Message -
From:
vikas mohan
To: david
Cc: tutor@python.org
Sent: Saturday, December 10, 2005 7:19
AM
Subject: Re: [Tutor] bnf
Hi again
I have a question
class foo: def
sayhi(self): print 'hello
world' def saybye(self): ##is there any reason for this to
be here? pass
class bar(foo): def
saybye(self): print 'bye
now'
class baz(foo): def
saybye(self): print 'later
tater'
x = foo()y = bar()z =
How to write the coin toss program without using the for/range loop program.
Program flips a coin 100 times and then tells you the number of heads and
tails.
I can only solve it using the for/range loop
Import random
Heads=0
For 1 in range (100):
Heads+=random.randrange(2)
pri
On Tue, Jun 24, 2008 at 5:37 PM, nathan virgil <[EMAIL PROTECTED]> wrote:
> I'm very new to Python, and (to a slightly lesser extent) programming in
> general. I'd like to get some experience by practicing simple-yet-functional
> programs, with a bit of an emphasis on games. The first game I'd like
Hi, I am very new to python and it is my first attempt at programing
except for some basic bash scripts. I came up with this;
#!/usr/bin/python
import os
filename = raw_input('Enter the filename: ')
fobj = open(filename, 'w')
yourname = raw_input('What is your name: ')
fobj.write(yourname)
fobj.
ho will be happy to be of assistance
when the programs get harder to write.
well, like with all functionality, you just have to import the right module:
http://xkcd.com/353/
:-)
-wesley
Thanks for the warm welcome, this is fun, I am sure I will be back. :)
david
--
Powered
Dave Kuhlman wrote:
On Sat, Jun 28, 2008 at 08:11:03PM -0400, David wrote:
Hi, I am very new to python and it is my first attempt at programing
except for some basic bash scripts. I came up with this;
#!/usr/bin/python
import os
filename = raw_input('Enter the filename: ')
f
raw_input(
'Warning, file %s exists, overwrite it [y/n] ? ' % filename)
if r != 'y' : sys.exit(0)
fobj = open(filename, 'w')
yourname = raw_input('What is your name: ')
fobj.write(yourname)
fobj.close()
-david
--
Powered by Gentoo GNU/LINUX
http://www.linuxcraz
;%d files removed' % files_removed
else :
print 'No files found'
Here is the output;
[EMAIL PROTECTED] ~ $ ./new_remove_file.py
Enter dir: test
test/test.ini
test/test.db
Confirm removal: y
removing 'test/test.db'
1 files removed
Please point me in th
Alan Gauld wrote:
"David" <[EMAIL PROTECTED]> wrote
dir_input = raw_input('Enter dir: ')
win_trace = ['*.ini', '*.db']
files_removed = 0
for root, dirs, files in os.walk(dir_input):
for trace in win_trace:
win_trace_path = os.path.join
e = self.__minute % 60
self.__second = self.__second % 60
def print_time(self):
print '%02d:%02d:%02d' % (self.__hour, self.__minute, self.__second)
Thanks, very new to Python.
-david
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
__
Thank you John & Allen,
See the loops section of my tutorial for more about for
and while loops.
Yes, great tutorial, just getting it to sink in, now thats the problem :)
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/
Steve Poe wrote:
Anyone taken or know of any online classes
teaching Python? I know O'Reilly Press
teaches online technical courses, through the University of
Illinois, but no Python
.
Thanks.
Steve
__
Very new to python and never programed before. Can not figure out why
the output never stops when I run this in a terminal
#!/usr/bin/python
choice = raw_input("Enter the name Lary or Joan (-1 to quit): ")
while choice != '-1': person = {'Lary': 43,'Joan': 24}
if choice == 'Lary':
David wrote:
Very new to python and never programed before. Can not figure out why
the output never stops when I run this in a terminal
#!/usr/bin/python
choice = raw_input("Enter the name Lary or Joan (-1 to quit): ")
while choice != '-1': person = {'L
Alan Gauld wrote:
"David" <[EMAIL PROTECTED]> wrote
the output never stops when I run this in a terminal
choice = raw_input("Enter the name Lary or Joan (-1 to quit): ")
while choice != '-1': person = {'Lary': 43,'Joan'
(0)
else:
r = raw_input("Login failed, do you want to create an account? [y/n]")
if r != 'y' : sys.exit(0)
newname = ""
data = []
newname = raw_input("Please enter a username: ")
newpw = raw_input("Please enter a password: ")
tuple = (newname, newpw)
David wrote:
New to python and programming. This works but I don't like the way it
is set up. I would like to have a simple menu like;
[code]
def options():
print \
""" Options:
'p' Print Options
'l' Login
'c' Cre
nt "done!"
^
As far as I understand, the for loop is executed, and once the loop is
done Python exits the for loop and continues with the next command
(print "done!").
Why is he complaining??
Many thanks for enlightening me!
David
the numbers separated by a comma: ")
average = (ans1 + ans2) / 2.0
But as I say - I don't know how many assignment there have to be, nor do
I know how Python could then create these assignments.
It would be great if someone could guide me towards the right track!!
Thanks,
David
__
umber.
numbers=int(raw_input("How many number do you want me to
calculate? "))
Does that mean input() is obsolete (after all, Zelle's book is not the
freshest on the shelf)? Or do they have different uses?
Thanks,
David
___
Tut
t
numbers = raw_input("Please type the numbers, separated by commas: ")
also returns the comma (1,2) and thus the for loop can't cope...
So should I therefore retain
numbers = input("Please type the numbers, separated by commas: ") ?
Otherwise I don't know (yet)
))
print "You want to know the average of the numbers:", numbers
add = 0
for i in numbers:
add = add + i
print "The sum of your numbers is:", add
average = add / float(amount)
print "Therefore the average of your numbers is", average
David
Steve Willoughby wro
Oh, great, this answers my question!
Thanks!
David
[EMAIL PROTECTED] wrote:
I am not sure how you got from the input to your variable i, it is a
good idea to post your code as well.
That said raw_input will return the user's input as a string which you
then need to convert to int
bers:", numbers
add = 0
for numStr in string.split(numbers, ","):
convNum = eval(numStr) # convert digit string to a number
add = add + convNum # add number to variable 'add'
print "The sum of your numbers is:", add
average = add / float
> Okay, I'm resurrecting this project.
Where is this project code?
--
Have Fun,
David A.
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
pam Ni! '
Which is not exactly "Spam Ni! Spam Ni! Spam Ni!" (note the final free
space in my outcome). I am at a loss as to how to perfect my answer with
regard to this issue.
Many thanks for helping me in my pythonic adventures!
David
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ot;A")
score = raw_input("What's your exam score (0-100)? ")
grade = x[int(score)/10]
print "Your grade is:", grade
I greatly appreciate your comments!
David
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
turn a letter grade based on a score
"""
for g in grades:
if (score <= g[1]) and (score >= g[0]):
return g[2]
score = raw_input("What is your exam score: (0-100)? ")
print getGrade
print getGrade(score)
What is your exam score: (0-100)? 66
None
--
Have Fun,
David A.
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
David wrote:
> You could use mencoder, part of mplayer;
> mencoder -oac mp3lame -ovc lavc -vf scale=0:0:0:0:0:0:qpal
> somemovfile.mov -o outavifile.avi
>
> Here is a program to convert ogg theora to avi;
>
> #!/usr/bin/python
> #Filename = ogg_to_avi.py
>
> impo
Daniel J Kramer wrote:
> Hi
>
> I have just joined this list. I need some help working on a Python
> application I am working on. I am working on a quiz game where the
> users gain points when the answer questions correctly. I have written
> the skeleton of the quiz with If, Elif and Else statem
stake: why does the line
q = sqrt(b*b - 4*a*c)
cause an error? I was playing around with the code, but got nowhere.
Here the entire code:
a = 2; b = 1; c = 2
from math import sqrt
q = sqrt(b*b - 4*a*c)
x1 = (-b + q)/2*a
x2 = (-b - q)/2*a
print x1, x2
Many thanks for a
Hello Kent,
yes, the error message - sorry:
When I just run line 3, I get:
In [7]: q = sqrt(b*b - 4*a*c)
...:
---
Traceback (most recent call last)
/home/david/Documents/Python/myCode/Langtangen/py1st/
in
g file:
The working code:
a = 2; b = 1; c = 2
import math
q = math.sqrt(math.fabs(b*b - 4*a*c))
x1 = (-b + q)/2*a
x2 = (-b - q)/2*a
print x1, x2
Thanks a lot!
David
Arun Tomar wrote:
hi!
On Sun, Nov 23, 2008 at 5:07 PM, David <[EMAIL PROTECTED]> wrote:
Hello everybody,
I
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
--- Begin Message ---
Judith Flores wrote:
> Hello,
>
>A couple of weeks ago I posted a question about what documentation I
> should read in order to implement a way to communicate Python and R. I read
> about the module 'subprocess
Stephen Nelson-Smith wrote:
> I want to write a program that connects to a TCP port using telnet,
> and issues commands, parsing the output the command provides, and then
> issuing another command.
>
> This might look like this:
>
> $ telnet water.fieldphone.net 7456
> Welcome to water, enter you
w')
>
> for ziparchive in list_zipfiles:
> zfile = gzip.GzipFile(zipfolder + ziparchive, "r")
> for line in zfile:
> fw.write(line)
> zfile.close()
> fw.close()
I am learning also. I came up with this;
#!/usr/bin/python
import tarfile
tFile =
David wrote:
> #!/usr/bin/python
> import tarfile
> tFile = tarfile.open("/home/david/zip_files/zip.tar.gz", "r")
> for f in tFile.getnames():
> print f
> tFile.close()
> #fname = "out.txt"
> #fobj = open(fname, 'w')
Hi,
I make these silly programs to learn from examples I find on the list. I
put a couple together just to practice. I have heard it is not a good
idea to use sys.exit() but I can not figure out how to do it. Also any
and all comments are welcome. Thanks
#!/usr/bin/python
import sys
_count =
ook I
have it bookmarked :)
-david
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
#x27;)
print "The Latest Podcast", f.readline()
print f.readline()
f.close()
lname = "podcast_links.txt"
L = open(lname, 'r')
print "The Latest Link\n"
download = L.readline()
print download
answer = raw_input("Do you want to download the podcast? ")
if a
This seems to work;
download = L.readline()
print download
download = download[0:-1]
What is that last character that is added;
.mp3%0A
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu
___
Tutor maillist - Tutor@python.org
http
Martin Walsh wrote:
Welcome!
thanks
You should probably try to avoid reassigning sys.stdout. This is usually
a bad idea, and can cause odd behavior that is difficult to
troubleshoot, especially for a beginner. A reasonable approach is to
assign the open file object to a name of your own ch
Hi,
Is this the correct way to handle a ValueError exception and should I
get in the practice of catching them? Also any suggestions on the program.
thanks
-david
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu
___
Tutor
David wrote:
Hi,
Is this the correct way to handle a ValueError exception and should I
get in the practice of catching them? Also any suggestions on the program.
thanks
-david
Might help if I included the program :)
#!/usr/bin/python
import time
print "Enter year as "
pr
On Mon, 29 Dec 2008 16:57:44 +0100, spir wrote:
> On Mon, 29 Dec 2008 09:10:45 -
> "Alan Gauld" wrote:
>
>
>> "bob gailer" wrote
>>
>> > Also IMHO it is bad design to put a lot of code inside a try block.
>> > In this case the user might make a mistake on day and then is forced
>> > t
Jervis Whitley wrote:
On Wed, Dec 31, 2008 at 8:33 AM, David <mailto:da...@abbottdavid.com>> wrote:
On Mon, 29 Dec 2008 16:57:44 +0100, spir wrote:
> On Mon, 29 Dec 2008 09:10:45 -
> "Alan Gauld" mailto:alan.ga.
t;
tail = "tail"
targ = "-f" # output appended data as the file grows
sfile = "/var/log/messages"
print colored("", "blue")
call([sudo, tail, sfile])
Only the first function will print to the screen.
thanks in advance,
-david
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
)
Only the first function will print to the screen.
thanks in advance,
-david
oops should be;
def slog():
sudo = "sudo"
tail = "tail"
targ = "-f" # output appended data as the file grows
sfile = "/var/log/messages"
print colored("
best way to proceed. I have a lot of code that is just
copied from one function to the next. I am new to python and enjoy these
little projects because I can see them in action. Here is my starting point;
http://dwabbott.com/code/index6.html
thanks
-david
--
Powered by Gentoo GNU/LINUX
http
Everything else works + - / but not *
why?
thanks
-david
#!/usr/bin/python
from __future__ import division
import sys
def add(x, y):
return x + y
def sub(x, y):
return x - y
def dev(x, y):
return x / y
def mul(x, y):
return x * y
def compute(arg1, arg2, arg3):
if sys.argv
jadrifter wrote:
It worked fine for me. Don't forget to put quotes around the * sign or
the shell will substitute.
so:
./calc.py 2 '*' 9
or:
./calc.py 2 "*" 9
or:
./calc.py 2 \* 9
but not:
./calc.py 2 * 9
John Purser
Thanks Kent and jadrifter, that explains that!
Also thanks for the tips
Marc Tompkins wrote:
It works for me under Windows XP, so I suspect that the hints you've
received about * being expanded by your shell are correct. However, I
had an idea - rather than requiring your user to put quotes around the
"*", why not do this:
elif sys.argv[2] in ["*","x","X"]:
___
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
I am new to python also, here are my notes, it helps me understand how
it works, may be of some help;
http://asterisklinks.co
Norman Khine wrote:
> Hi,
> actually what I was trying to do carries from my last post, where my
> media files are a list that I want to add to the
>
> subprocess.call(['sox', ', '.join(media_list), 'list.wav'])
Something like this may work;
#!/usr/bin/python
import subprocess
def play(filename):
I have to ask for a pointer, not sure what I am doing wrong.
thanks
-david
#!/usr/bin/python
password = 'loser'
wordlist = '/home/david/Challenge-You/wordlist.txt'
try:
words = open(wordlist, 'r').readlines()
except IOError, e:
print "Sorry no
bob gailer wrote:
David wrote:
I have to ask for a pointer, not sure what I am doing wrong.
The first thing you are doing "wrong" is failing to tell us what is in
the wordlist file and what results you get when you run the program.
Please re-post with that information.
#!/usr/
bob gailer wrote:
David wrote:
bob gailer wrote:
David wrote:
I have to ask for a pointer, not sure what I am doing wrong.
The first thing you are doing "wrong" is failing to tell us what is
in the wordlist file and what results you get when you run the program.
Please re-post
#!/usr/bin/python
import re
password = 'loser'
wordlist = '/home/david/Challenge-You/wordlist.txt'
try:
words = open(wordlist, 'r').readlines()
except IOError, e:
print "Sorry no words"
for word in words:
word = word.replace("\n&quo
101 - 200 of 1103 matches
Mail list logo