"GoodPotatoes" wrote
#logic loop
for word in lData:
if word in lWords:
continue
elif sub1(word)[0]=1:
word=sub1(word)[1] # <--- Here is my question.
else:
print word " not found.\n"
The subroutine is being run once at the elif statement.
I don't want to run it a
"Albert-Jan Roskam" wrote
I'm wondering what is the most common method of input validation.
Any and all of the methods will work in different situations but its
generally best to use duck typing and try to write code that works
for any type as far as possible.
Then use exceptions to catc
On Fri, 2009-09-04 at 00:01 +0200, Jojo Mwebaze wrote:
> thanks guys,
>
>
> Currently i am using pyfits, a bit slow cause loads the file in
> memory, creates a subimage and then saves the file then transmits
> the file over the network! My idea is, if there is a way of creating
> a file pointer
On Fri, Sep 4, 2009 at 3:29 AM, GoodPotatoes wrote:
> Hello,
>
> I am trying to find the best way to do this. My goal is to only call this
> subroutine only ONCE, and the logic is contingent upon two outputs.
>
> lWords=[...] # List of many, many words
> lData=[...] #list of some words that need t
thanks guys,
Currently i am using pyfits, a bit slow cause loads the file in memory,
creates a subimage and then saves the file then transmits
the file over the network! My idea is, if there is a way of creating a file
pointer to the location on disk, where the subimage lies, reading a specific
si
I have successfully used the builtin "wave" module to read an audio
file in as a string of bytes:
>>> x=wave.open('DaCWL.wav','rb')
>>> x.getparams()
(1, 2, 44100, 15440, 'NONE', 'not compressed')
>>> samp=x.readframes(15440)
>>> type(samp)
The x.getparams() indicates that there is one audio
Hello,
I am trying to find the best way to do this. My goal is to only call this
subroutine only ONCE, and the logic is contingent upon two outputs.
lWords=[...] # List of many, many words
lData=[...] #list of some words that need to be validated against lWords
#subroutine to search for words,
On 9/3/2009 11:01 AM William Witteman said...
I am trying to create a CSV file of sorted similar lists, arranged so
that differences are easily compared in a spreadsheet. I am
encountering the following error, however:
IndexError: list assignment index out of range
On the indicated line below.
I am trying to create a CSV file of sorted similar lists, arranged so
that differences are easily compared in a spreadsheet. I am
encountering the following error, however:
IndexError: list assignment index out of range
On the indicated line below. I understand the error, but I don't
understand
Hi,
I'm wondering what is the most common method of input validation. See the
example below.
-Is the code below the most common/recognizable way something like this is done?
-Which of the options #1 and #2 is the preferred method? Option #2 looks less
esoteric, but #1 seems better when you have
Hey guys,
Yes, I figure that there are changes that need to be done in the main
application to fit the needs of my application.
Like what some of you guys suggested, I have looked into having the main
application use a database to feed the information that I'll need. Right now
that I guess is the
Hello,
I have a list of tasks/items that I want handed off to threads/processes to
complete. (I would like to stick with process if I could, since there is some
CPU work here. )
Each task involves some calculations and a call to a remote server over
urllib2/HTTP.
The time to complete each
On Thu, Sep 3, 2009 at 9:05 AM, Jojo Mwebaze wrote:
> Hello Tutor
>
> I am writing Class to provide data transfer between the server and client
> processes based on simple HTTP GET/POST operations. However my interest is a
> sub-image (section of a full image). i am requesting help on how to read a
On Thu, Sep 3, 2009 at 8:05 AM, Jojo Mwebaze wrote:
> Hello Tutor
>
> I am writing Class to provide data transfer between the server and client
> processes based on simple HTTP GET/POST operations. However my interest is a
> sub-image (section of a full image). i am requesting help on how to read
Hello Tutor
I am writing Class to provide data transfer between the server and client
processes based on simple HTTP GET/POST operations. However my interest is a
sub-image (section of a full image). i am requesting help on how to read and
transmit/send only section of the image (sub-image). i als
Michael Yang wrote:
thanks. so this would run my script on a schedule i specify. And its
a "set it and forget it" deal.
but if i want to view the output of the program (ie. the program has
various print statements to show program's status), how would I do
this while its running the job?
MI
16 matches
Mail list logo