"IT_ForMe" wrote
cart = {"apple":2.00, "orange":2.50, "banana":1.75}
You set this up but then don't use it.
Also your problem statement said *some* items were
taxable, implying some were not. You might want to
record whether an item is taxable in the dictionary too.
print cart
apple = 2
helloI wrote a function to fetch data using urllib and displaying the data
using internet Explorer.
it is not preparing the html file
So opening blank Explorer after complaining th html file not found.
Where is the problem?
Can I display the data read from a site without preparing
a html file?
2009/4/25 prasad rao :
> So opening blank Explorer after complaining th html file not found.
> Where is the problem?
There are typing errors on the below...
>
> def pp():
> @@@ import urllib
> @@@ import subprocess
> @@@ so=urllib.urlopen('http://www.asstr.org')
> @@@ data=so.read()
> @@@ de=op
Hello,
I have a series of lists that I need to output into files with a
specific format. Specifically, I need to have line breaks after each
entry of the list, and I need to do away with the ['..'] that
accompany the data after I transform the list into a string. Can I
simply append a '\n
On Fri, Apr 24, 2009 at 10:57 PM, Matt Domeier wrote:
> Hello,
>
> I have a series of lists that I need to output into files with a specific
> format. Specifically, I need to have line breaks after each entry of the
> list, and I need to do away with the ['..'] that accompany the data after I
> t
On Sat, Apr 25, 2009 at 5:38 AM, prasad rao wrote:
> hello
> I wrote a function to fetch data using urllib and displaying the data
> using internet Explorer.
> it is not preparing the html file
> So opening blank Explorer after complaining th html file not found.
> Where is the problem?
> Can I di
On Fri, Apr 24, 2009 at 11:59 AM, Shaofeng NIu wrote:
> that worked for me,too :) thanks to all the peopel helping me
>
> 2009/4/24 Dayo Adewunmi
>
>> Shaofeng NIu wrote:
>>
>>> I tried to compile and install python3.0 from source,but after "make",it
>>> shows:
>>>
>>> Python build finished, but
On Fri, Apr 24, 2009 at 5:26 PM, Spencer Parker wrote:
> I have a script that I want to test MySQL sonnections with. The way I have
> the script working is to just create connections, but I realized that it is
> going to wait for the first one to stop before starting a new connection. I
> want t
"prasad rao" wrote
helloI wrote a function to fetch data using urllib and displaying the
data
using internet Explorer. it is not preparing the html file
So opening blank Explorer after complaining th html file not found.
The specific problem has been addressed but in general it is
wise to m
Matt Domeier wrote:
Hello,
I have a series of lists that I need to output into files with a
specific format. Specifically, I need to have line breaks after each
entry of the list, and I need to do away with the ['..'] that
accompany the data after I transform the list into a string. Can
hellothanks .After inserting back slashes and
de.close it is working well
thanks for the help
prasad
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Dear Tutors,
I have a file from which I want to extract lines that end in certain strings
and print to a second file. More specifically, I want to:
1) iterate over each line in the file, and if it ends in "yes", print it.
2) move to the line following the one described in #1 above, and if it end
Dan Liang wrote:
Dear Tutors,
I have a file from which I want to extract lines that end in certain
strings and print to a second file. More specifically, I want to:
1) iterate over each line in the file, and if it ends in "yes", print it.
2) move to the line following the one described in #1
I am converting a Windows ProComm script into Python and need help.
; previous Procomm script here
run "c:\buy.exe" taskId; this runs the c:\buy.exe
program and assigns the task identification number to the integer
variable called "taskId"
pause 1
Le Sat, 25 Apr 2009 11:02:47 -0400,
Matt Domeier s'exprima ainsi:
> Hi Wayne,
>
> Yes, that should work perfectly, but it is in writing files that I'm
> having the problem. I'm still very new to python, so I only know to
> use something like filename.write(str(listname)) to write my list to
Hi Wayne,
Yes, that should work perfectly, but it is in writing files that I'm
having the problem. I'm still very new to python, so I only know to
use something like filename.write(str(listname)) to write my list to a
file..
Is there a straightforward method of combining the ease of the pri
Hi Bob and tutors,
Thanks Bob for your response! currently I have the current code, but it does
not work:
ListLines= []
for line in open('test.txt'):
line = line.rstrip()
ListLines.append(line)
for i in range(len(ListLines)):
if ListLines[i].endswith("yes") and ListLines[i+1].endswi
On 25-Apr-09, at 11:41 PM, Dan Liang wrote:
Hi Bob and tutors,
Thanks Bob for your response! currently I have the current code, but
it does not work:
ListLines= []
for line in open('test.txt'):
line = line.rstrip()
ListLines.append(line)
for i in range(len(ListLines)):
if Lis
"Ian Campbell" wrote
os.startfile("c:\\buy.exe" , 'OPEN')# THIS WORKS and returns but
does not return the taskID
Take a look at the subprocess module.
# what do I do now to kill the the Windows program which has finished
its work?
This is trickier, if the program does not stop it
On Mon, Apr 13, 2009 at 11:07 PM, sudhanshu gautam
wrote:
> I am new in python , so need a good books , previously read python Bible
> and swaroop but not satisfied .
>
>
> so tell me good books in pdf format those contents good problems also
>
>
> ___
>
chinmaya wrote:
On Mon, Apr 13, 2009 at 11:07 PM, sudhanshu gautam
mailto:sudhanshu9...@gmail.com>> wrote:
I am new in python , so need a good books , previously read python
Bible and swaroop but not satisfied .
so tell me good books in pdf format those contents good problems a
I am trying to use this so maybe no one has to reply... sorry to
inconvenience anyone.
I got it from Google but did not copy his name and cannot give my
thanks to original author, sorry.
import subprocess
from win32event import WaitForSingleObject, WAIT_TIMEOUT
from win32api import Termi
Alan Gauld wrote:
then try killing the thread which may kill the program, or if not, use the
Windows API to kill the program (gets messy). This is easier on Unix
in my experience!
Sysinternals created pstools for windows that I generally use for this
kind of thing, particularly when it gets me
"Ian Campbell" wrote
I am trying to use this so maybe no one has to reply... sorry to
inconvenience anyone.
No inconvenience and I'm glad you posted the solution
you found.
That is pretty much what I had in mind but I didn't know
you could get the _handle from the return value in Pope
Dan Liang wrote:
Hi Bob and tutors,
Thanks Bob for your response! currently I have the current code, but
it does not work:
[snip]
Thank you for code, sample data and more complete specs.
Lines in the file look like following:
word1 word2 word3 word4 yes
word1 word2 word3 word4 no
On Sat, Apr 25, 2009 at 11:35 AM, Ian Campbell wrote:
> I am converting a Windows ProComm script into Python and need help.
>
> ; previous Procomm script here
>
> run "c:\buy.exe" taskId ; this runs the c:\buy.exe program
> and assigns the task identification number to the integ
26 matches
Mail list logo