From: bob gailer
To: tutor@python.org
Sent: Sun, April 25, 2010 12:52:10 PM
Subject: Re: [Tutor] sqrt?
On 4/24/2010 11:00 PM, Kirk Z Bailey wrote:
> ok gang, My desktop runs 2.5, and for my college algebra I needed to do som
> quadratic equation work. This inv
Ali,
I am new at this but here is my interpretation.
1) flip coin 100 times, and print out the number of heads and number of tails.
from random import Random
score = [0,0]# first position will be heads and second position will be tails
count=0#counter to find out how many times we have flipped.
a
>
>From: jonathan wallis
>To: tutor@python.org
>Sent: Wednesday, July 15, 2009 12:54:16 PM
>Subject: [Tutor] help
>
>>i have a duel loop that looks like thiswhile y > 0 and x > 0:
>i cant figure out if there is a way to make so if one loop ends it says
>something different than if th
Ok, I found the responses, sorry..
I have been reading the book "Text Processing in PYTHON" by David Mertz.
I have some text that I have to parse. I want to use grammers. I can't seem to
understand how the syntax works.
something like:
hello :=
Thanks in Advance
Eric
_
Did anyone respond to my Python Grammer Question?
Thanks
Eric
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wc
Hello,
I have been reading about python grammers for processing text files. Does
anyone have any simple examples?
Thanks
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
program. What do you
think?
python newbie...
- Original Message
From: Alan Gauld <[EMAIL PROTECTED]>
To: tutor@python.org
Sent: Saturday, October 27, 2007 4:09:35 PM
Subject: Re: [Tutor] system call
"Eric Walker" <[EMAIL PROTECTED]> wrote
> I am trying to
disregard this one. I found the answer. I was using spawn instead of os.system.
Thanks.
- Original Message
From: Eric Walker <[EMAIL PROTECTED]>
To: tutor@python.org
Sent: Saturday, October 27, 2007 9:55:05 AM
Subject: [Tutor] system call
Hello,
I am trying to run a timing
Hello,
I am trying to run a timing script but I need the python program to stop and
wait for the executable to finish. Does anyone have any examples of doing this?
Thanks
Python Newbie
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best s
The best way to debug cgi is to tail the server log when you don't get
commandline output. This will give you a clue to what is happening.. shoulld be
something like /var/log/apache or something like that...
Eric
wormwood_3 <[EMAIL PROTECTED]> wrote: Hello all,
I am working on a very sim
I think you need to check to see if the remaining amount is less than the
payment amount.
Eric...
Christopher Spears <[EMAIL PROTECTED]> wrote: I'm working on a problem in
Chapter 5 of Core Python
Programming(2nd Edition). I am supposed to write a
script that take an opening balance and a mont
I am a newbie but think its for variable input. Allows you to enter any number
with commas in it and still work properly. Since it thinks the number is a
tuple, then depending on the number your tuple could vary in length.
Eric Walker
Dick Moores <[EMAIL PROTECTED]> wrote: At 06:58 P
Alan Gauld <[EMAIL PROTECTED]> wrote:
"Kirk Bailey" wrote
> Ii want to read a xls file and use the data in part of it. What
> module
> would help make sense of one?
If the data is straighforward you might find it easier to save it as a
csv file first.
But otherwise there is a module calle
d('A')
> 65
>
> In this textbook example, the "code" is simple a
> string of the
> ASCII characters' numeric values. Nothing fancy.
>
> What does this 'coded' message decode to, using the
> dec function?
>
> a = "72 101
d('A')
> 65
>
> In this textbook example, the "code" is simple a
> string of the
> ASCII characters' numeric values. Nothing fancy.
>
> What does this 'coded' message decode to, using the
> dec function?
>
> a = "72 101
newbie here,
I just tried playing around with the dec function and
I get errors. Correct me if I am wrong. After getting
the input, the string.split will parse the string
across whitespace chars so in other words you get a
list of each word entered. Then when it does the
eval(x) part it dies. I tri
--- Kent Johnson <[EMAIL PROTECTED]> wrote:
> Toon Pieton wrote:
> > Hey all!
> >
> > My memory seem to have a horrible leak. How does
> one limit the amount of
> > decimal spaces for a float? I used to know that...
> >
> > Example: not 5.398042156, but 5.4 (if I decide to
> have only one plac
Kent Johnson wrote:
Mike Hansen wrote:
I'd like to send a big Thank You to Danny, Alan, Kent and others(whos names
escape me) for being such an asset to the Python community by relentlessly
answering questions on the tutor list.(Do these guys sleep? They must work
in shifts.) This list is one
Alan Gauld wrote:
>> I want to create a GUI, and I downloaded the pyQT stuff.
>
>
> Any reason why you must use PyQt?
>
> Not that it's a bad toolkit but there is less expertise in using it so
> unless you already use it from another language - like C++ - its going
> to be a lot harder to learn
All,
I want to create a GUI, and I downloaded the pyQT stuff. Ok, now that I
am reading my but off
trying to figure out how to use this thing and learn python at the same
time, I read some stuff about
having to purchase licenses. For commercial development, who do I need
to contact for licensing
Payal Rathod wrote:
On Mon, Apr 17, 2006 at 05:42:05PM +0100, Steve Nelson wrote:
When you define a function, you are writing a block of code which you
can ask to perform a task. The task may be simple, and not require
any additional information, or it may be more complex and need
informati
made the futile post.
On Wednesday 07 December 2005 01:42 pm, Gabriel Farrell wrote:
> On Wed, Dec 07, 2005 at 11:52:20AM -0800, Danny Yoo wrote:
> > On Wed, 7 Dec 2005, Eric Walker wrote:
> > > Looking for easiest way to get a files permissions in linux.
> >
>
Looking for easiest way to get a files permissions in linux.
Thanks
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
yes,
I found some stuff when I was playing around with win32. It does allow you to
read from excell sheets...
Eric ...
On Tuesday 29 November 2005 01:13 pm, Liam Clarke-Hutchinson wrote:
> Actually, and I'm surprising myself here, but COM would be the easiest way
> to go about this if you're not
The first few are out of range. Only have one \t so you only get col[0] and col[1] ['STAG2\tmiR-101', 'SMARCA1\tmiR-101','RAP2C\tmiR-101', 'DDX3Y\tmiR-101', Srinivas Iyyer <[EMAIL PROTECTED]> wrote: Hello group:I have a list t and the elements are tab limited. there are 2 columns:>>>t['STAG2\tmiR-
All,
I have a program now that works just like I want it. Now I want to
integerate something to say print usage info when the user puts in the wrong
number or type of options. Also print usage say if you type program name and
-h or -H. I currently just have functions defined and at the bottom ma
like the class attribute names.
>
> So the names are names of attributes not names of classes?
> In that case I think you need to use setattr()
Yes,
they are names of the attributes, and yes I am using setattr and getattr now.
thanks you all for your great advice
--
Eric Wal
are objects too!
>
> > Can I do that print statement in a way to allow me to print the
> > value of the class attribute?
>
> Or are we really talking about instances? In which case the usual solution
> is a dictionary.
>
> Alan g.
--
Eric Walker
EDA/CAD Engineer
Work: 208-368-2573
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hello,
If I have some like the following:
markersExp = ['big','boss','two','three']
for mark in markersExp:
print y.mark
Now I have an list of class objects that are in an outerloop. y is how I
access it. The attributes names of the class objects match whats in
markersExp. Can I do that pr
rst':[]}
> d['first'].append("string")
>
> Append acts on the list, so assignment is unnecessary.
>
> ds
>
> Eric Walker wrote:
> >All,
> >I have a dictionary say:
> >d = {'first':[]}
> >I am going through another list and dep
All,
I have a dictionary say:
d = {'first':[]}
I am going through another list and depending on whats going on,
I want to add to the empty list. I have tried the following to noavail.
d['first'] = d['first'].append("string")
I would think this would result in the dictionary key first's empty list
no takrs on this one?
--- Eric Walker <[EMAIL PROTECTED]> wrote:
> I would like to do some testing of video streams
> from say a vcr tape. Possibly
> using the PVR type capture card. Maybe modules to
> control it.. or some info
> on how I can control it through
I would like to do some testing of video streams from say a vcr tape. Possibly
using the PVR type capture card. Maybe modules to control it.. or some info
on how I can control it through C/C++ and link those functions into python.
Are there any python user groups or modules that could help me i
Thanks all
On Friday 04 November 2005 11:53 am, Kent Johnson wrote:
> Eric Walker wrote:
> > All,
> > Whats the construct that allows to loop through a list and perform an
> > action? you also can add a test at the end. something like myfile =
> > [print na
All,
Whats the construct that allows to loop through a list and perform an action?
you also can add a test at the end. something like myfile = [print name for
name in yourlist, if ...]
I need to look up how to use the test command and I forgot the name of the
construct.
Thanks..
__
z = raw_input("Please Enter? :\n")
On Thursday 13 October 2005 05:09 pm, Marc Buehler wrote:
> hi.
>
> i want to pass an argument (a number) to a python
>
> script when running it:
> > python script.py
>
> i want to be able to use within script.py
> as a parameter.
>
> how do i set this up?
>
> m
Is amount suppose to equal total instead of fine?
On Thursday 13 October 2005 04:58 pm, [EMAIL PROTECTED] wrote:
> def main():
> actual = input("Please enter the legal speed limit: ")
> clocked = input("Please enter the clocked speed limit: ")
> speedlimit = clocked - actual
>
>
I think os.system returns status of commands
Try this:
w = os.popen('ls -l | wc -l').readlines()
Python Newbie...
On Wednesday 12 October 2005 12:10 pm, Marc Buehler wrote:
> hi.
>
> i'm new to Python ...
>
> i would like to extract the number of JPG files
> from the current directory and use th
That was me using the import within the class. I only did it due to my
ignorance. I am not advanced enough to use it like that and know what I am
doing, so as suggested I just moved all of my imports to the top.
Python Newbie.
On Thursday 06 October 2005 08:21 pm, Kent Johnson wrote:
> Danie
DUH.. I found the answer
mytest = [name for name in test]
Thanks again..
> > The above four lines could be replaced with a single list comprehension
> > if you like: baseObjectList = [ TPROJ(name) for name in baseList if
> > nameCheck(name) ]
> > http://www.amk.ca/python/2.0/index.html#SEC
> > Tutor maillist - Tutor@python.org
> > http://mail.python.org/mailman/listinfo/tutor
>
> _______
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
--
Eric Walker
EDA/CAD Engineer
Work: 208-368-2573
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Thursday 06 October 2005 12:48 pm, Kent Johnson wrote
> > class TPROJ:
> > import re
> > import string
>
> Common usage is to put all the imports at the top of the module. There are
> circumstances where you will put them inside a function but not in this
> case.
I moved them all to the
uot;)
baseObjectList = []
for name in baseList:
baseObjectList.append(TPROJ(name))
os.chdir(currentDir)
for item in baseObjectList:
print item.BASENAME
try:
getProjectNames()
except:
print "Got an Error"
On Thursday 0
Its working now. the moving of the function outside of the class allows me to
run it from the command line.
Thanks
On Thursday 06 October 2005 11:56 am, Eric Walker wrote:
> Kent,
> I made a correction the func1 I moved out of the class definition since it
> wasn't really a
2()
except:
print "error"
On Thursday 06 October 2005 11:33 am, Kent Johnson wrote:
> Eric Walker wrote:
> > I have a class I am defining and then I call a function within that
> > class. Getting error that function call is not defined. Does the function
> > have to be c
I have a class I am defining and then I call a function within that class.
Getting error that function call is not defined. Does the function have to be
created anywhere within a class or does it have to be defined before the call
within the class.
--
Eric Walker
EDA/CAD Engineer
Work: 208
Thanks so much Kent..
Eric ...
--- Kent Johnson <[EMAIL PROTECTED]> wrote:
> Eric Walker wrote:
> > All,
> > If I have something like this:
> > import re
> > sample = 'myboss:isbad'
> > express = re.compile('(.*):(.*))
> > answer = r
Thanks Kent.. I think that would work for what I am doing. So is it safe to
say that python doesn't do variable interpolation like perl..?
Thanks in advance.
Python Newbie...
On Wednesday 05 October 2005 05:20 pm, Kent Johnson wrote:
> Eric Walker wrote:
> > Well,
> > I
All,
If I have something like this:
import re
sample = 'myboss:isbad'
express = re.compile('(.*):(.*))
answer = re.match(express,sample)
how do I get it to tell me if it was a match or not. I have tried
answer.match . It just gives me an object pointer or something.
Thanks
Python Newbie...
_
hat I read from the original files.
Python Newbie
On Wednesday 05 October 2005 04:29 pm, Kent Johnson wrote:
> Eric Walker wrote:
> > New to Python and trying to do some class stuff with a simple task.
> > Problem:
> > 1) get a list of file names in a directory
> > 2) c
New to Python and trying to do some class stuff with a simple task.
Problem:
1) get a list of file names in a directory
2) create variables with the same name of each filename pulled from the
directory.
3) Create an object for each and pass into the __init__ method the stringname
of the file nam
rk?
>
> Thanks,
>
> Matt
>
> ___
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
--
Eric Walker
EDA/CAD Engineer
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
thon.org
> http://mail.python.org/mailman/listinfo/tutor
--
Eric Walker
EDA/CAD Engineer
Work: 208-368-2573
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
nd
> > have an EECS degree from MIT, so I do have a clue.
>
> I started studying formal language theory (on my own) in 1972, maintained
> the APL interpreter in 1975 and devised and helped implement my first
> language in 1976. My BSEE from RPI predates any CS departments.
>
> Bob Gailer
> phone 510 978 4454
WOW!!,
Nice to know we have some heavy hitters monitoring this list.
--
Eric Walker
EDA/CAD Engineer
Work: 208-368-2573
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Is there a way to pull the info listed on the properties tab , say of an image
file from windows with python.. All the meta data...ie
Title, Subject, Keywords, Comments, Author
Any Ideas?
--
Eric Walker
EDA/CAD Engineer
Work: 208-368-2573
___
Tutor
Could be but the first time I get something hes going on the filter...
E
On Thursday 01 September 2005 07:56 am, Jan Eden wrote:
> [EMAIL PROTECTED] wrote on 29.08.2005:
> >Dear Python,
> > How does a calculator multiply? I want to create a computer software that
> > can multiply. How do I p
hanks Again...
--- Kent Johnson <[EMAIL PROTECTED]> wrote:
> Eric Walker wrote:
> > I want to know what modules are available to
> connect
> > and talk with MSAccess databases...
>
> google 'python msaccess'
>
> You can talk to Access directly using
I want to know what modules are available to connect
and talk with MSAccess databases...
Thanks
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
On Wednesday 24 August 2005 03:57 pm, Jesse Lands wrote:
Yes,
I think its well worth it. He's a great guy and you learn lots of python tips
and stuff. I need to get something to do now...
...
> On Wed, 24 Aug 2005 16:49:17 -0700 (PDT)
>
> Eric Walker <[EMAIL PROTECTED]> wrote
all,
Hello... I just finished a class given by Mark Lutz
and I love python. Now I need to find a project to
hone my skills. I am sure I will be sending lots of
questions to this list. I used to use perl but now
Its gone. I am now a Python guy... Hail Guido
60 matches
Mail list logo