> How do I do cubic (and higher) roots and exponents in Python? I already
> took a look in Python and didn't find anything.
Hi Nathan,
I think you're looking for the '**' operator. Like addition and
multiplication, it can take in two numbers.
##
>>> 2 ** 2
4
>>> 2 ** 3
8
>>> 2 ** 4
Hi
all,
How do I do
cubic (and higher) roots and exponents in Python? I already
took a look in Python and didn't find anything.
Thanks,
Nathan Pinno
Web Surfer's Store http://www.websurfstore.ca
MSN Messenger: [EMAIL PROTECTED]
Yahoo! Messenger: spam_swatter31
ICQ: 199020705
__
On 09/05/06, CPIM Ronin <[EMAIL PROTECTED]> wrote:
> Is there such a thing as a Python coded media player? I'm having troble with
> my Windows Media Player playing commercial DVDs and can't fathom why it
> should be so difficult to debug. I'm hoping the logic would be much clearer
> in Python.
pyM
Is there such a thing as a Python coded media player? I'm having troble with
my Windows Media Player playing commercial DVDs and can't fathom why it
should be so difficult to debug. I'm hoping the logic would be much clearer
in Python.
RC
___
Emanuele Rocca wrote:
> Hello list,
> I've got a question partially related to this thread.
>
> * Gregor Lingl <[EMAIL PROTECTED]>, [2006-05-03 0:24 +0200]:
>> v=
>> if isinstance(v, int) or isinstance(v, float):
>>
>
> I wonder which is the recommended way to check the type of a value.
While everything that Alan Guald said is true, there are a couple of
options for you. Provided you know HTML (you must), you could
generate html pragmatically but, knowledge of html is still mandatory.
Your options are, basically
http://www.cherrypy.org
Which is an app server that should be fair
I think isinstance() is probably the best way to do this. I however
always do type(x)==TestType:
where TestType is a string that is returned from type() or not what
ever the case.
On 5/8/06, Emanuele Rocca <[EMAIL PROTECTED]> wrote:
> Hello list,
> I've got a question partially related to this t
Thank you, Alan! I'll try using POPEN.
Jerome
--- Alan Gauld <[EMAIL PROTECTED]> wrote:
> > I'm trying to start a shell script with 4
> arguments
> > from my python script. I'm having problems trying
> to
> > figure out the best way to do this.
>
> Use a format string:
>
> cmd = "myscript %s
> I'm trying to start a shell script with 4 arguments
> from my python script. I'm having problems trying to
> figure out the best way to do this.
Use a format string:
cmd = "myscript %s %s %s %s"
os.system(cmd % (p1,p2,p3,p4))
OR
cmdstr = cmd % p1,p2,p3,p4
os.system(cmdstr)
The second form i
Hello list,
I've got a question partially related to this thread.
* Gregor Lingl <[EMAIL PROTECTED]>, [2006-05-03 0:24 +0200]:
> v=
> if isinstance(v, int) or isinstance(v, float):
>
I wonder which is the recommended way to check the type of a value.
In other words, what should I choos
Thus you should probably do: try: fh=open(Onefile, "r") Filecontents =
fh.readlines() # these files are verysmall, # other code here Summary[Onefile] = deepcopy(Stats)# associate each fh.close() except IOError: print("\n
Kent,
Thanks for the nock on the head, that has bitten me before. Taking out the
spaces worked great.
Thanks again,
John Ertl
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kent Johnson
Sent: Monday, May 08, 2006 10:53 AM
Cc: tutor@python.
Ertl, John wrote:
> I have a file with 10,000 + lines and it has a coma delimited string on each
> line.
>
> The file should look like:
>
> DFRE,ship name,1234567
> FGDE,ship 2,
> ,sdfsf
>
> The ,sdfsf line is bad data
>
> p = re.compile('\d{7}$ | [,]$') # this is the line that I can not get
I have a file with 10,000 + lines and it has a coma delimited string on each
line.
The file should look like:
DFRE,ship name,1234567
FGDE,ship 2,
,sdfsf
The ,sdfsf line is bad data
Some of the lines are messed up...I want to find all lines that do not end
in a comma or seven digits and do som
Liviu Antoniu wrote:
> I want to learn Python and for this I need a good tutorial for
> beginners. Please tell where can I find these tutorials.
If you are new to programming:
http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
If you are an experienced programmer new to Python:
http://wik
I want to learn Python and for this I need a good tutorial for beginners. Please tell where can I find these tutorials.Thank you___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hello,
I'm trying to start a shell script with 4 arguments
from my python script. I'm having problems trying to
figure out the best way to do this. I'm using
variables as the arguments to the shell script. I want
to use popen3 to keep track of stdin, stdout, and err,
but from the docs I only see u
From: Alan Gauld
Date: 05/08/06 06:20:42
To: Kermit Rose; tutor@python.org
Subject: Re: [Tutor] query python mastery via programming exercises
The nearest to that is the Python Challenge 'game' web site.
It presents a series of challenges to be solved in Python. Each
challenge uses a
Hi Tony,
One point that jumps out at me is:
# --
def ProcessFiletype(Thesefiles, Summary, Stats):
# ...
try:
fh=open(Onefile, "r")
except IOError:
print("\nFATAL ERROR ocurred opening %s for input" %
Onefile)
else:
try:
Hello again,
> Has someone organized a set of exercises that when solved in the
> order
> presented teaches mastery of Python programming.
The nearest to that is the Python Challenge 'game' web site.
It presents a series of challenges to be solved in Python. Each
challenge uses a specific featur
Tony C wrote:
>
> I wrote a small Python program to count some simple statistics on a
> Visual Basic program thatI am maintaining.
>
> The Python program counts total lines, whitespace lines, comment lines,
> Public & Private Subroutines, Public and Private Functions.
> The Python program takes
21 matches
Mail list logo