[EMAIL PROTECTED] wrote:
> dear fellow Python enthusiasts:
>
> in the last year I have been experimenting with Python, and I set out
> to create a function that, given a number of items and a maximum
> number of items per row, would generate a table of rows of items.
> However, there is one par
Tino Dai wrote:
> =You might also want to try:
> http://docs.python.org/lib/ipc.html to see if that is what you need
Specifically the subprocess module which is the most modern way to start
an external program.
Kent
___
Tutor maillist - Tutor@python.
[EMAIL PROTECTED] wrote:
> dear fellow Python enthusiasts:
>
> in the last year I have been experimenting with Python, and I set out
> to create a function that, given a number of items and a maximum
> number of items per row, would generate a table of rows of items.
> However, there is one par
On 7/20/07, Terry Carroll <[EMAIL PROTECTED]> wrote:
> Is there a straightforward way to find out if all characters in one string
> are present in a second string?
I like this one:
all(char in string.printable for char in testString)
>>> testString = "qwerty\buiop"
>>> all(char in string.printabl
Terry Carroll wrote:
> Is there a straightforward way to find out if all characters in one string
> are present in a second string?
>
> Basically, I have a string s, and I want to print it out only if every
> character in it is printable (because I accidentally brought my PC loudly
> to its knees
[EMAIL PROTECTED] wrote:
> dear fellow Python enthusiasts:
>
> in the last year I have been experimenting with Python, and I set out
> to create a function that, given a number of items and a maximum
> number of items per row, would generate a table of rows of items.
> However, there is one par
I have a question on program design. The program will be a catalog of
portable media (DVD, CD, flash drive, floppy, etc). I am currently in the
preliminary stages of design and I currently would like to get input on what
the best method would be for initially gathering the data and what format i
Luke Paireepinart wrote:
> Terry Carroll wrote:
>
>> Is there a straightforward way to find out if all characters in one string
>> are present in a second string?
>>
>> Basically, I have a string s, and I want to print it out only if every
>> character in it is printable (because I accidentally
dear fellow Python enthusiasts:
in the last year I have been experimenting with Python, and I set out to
create a function that, given a number of items and a maximum number of
items per row, would generate a table of rows of items. However, there is
one part where I believe I violate the prime
On Fri, Jul 20, 2007 at 06:46:13PM -0700, Terry Carroll wrote:
> Is there a straightforward way to find out if all characters in one string
> are present in a second string?
>
> Basically, I have a string s, and I want to print it out only if every
> character in it is printable (because I accide
Terry Carroll wrote:
> Is there a straightforward way to find out if all characters in one string
> are present in a second string?
>
> Basically, I have a string s, and I want to print it out only if every
> character in it is printable (because I accidentally brought my PC loudly
> to its knees
There is also os.system which should work in a similar way as Matlab
system. You pass a string with the command and arguments. The downside
of system is that it opens an entire shell and environment for the
program being run, you only have the return value from the
application.
Other options can b
Is there a straightforward way to find out if all characters in one string
are present in a second string?
Basically, I have a string s, and I want to print it out only if every
character in it is printable (because I accidentally brought my PC loudly
to its knees printing a few thousand BEL char
On 7/20/07, Chris Smith <[EMAIL PROTECTED]> wrote:
Howdy,
I am working on some research. I'm trying to optimize the performance of
an antenna. For the simulation of the antenna it would be easiest to use
an antenna software package that I have in my lab. I know that Matlab
can call the antenna
Howdy,
I am working on some research. I'm trying to optimize the performance of
an antenna. For the simulation of the antenna it would be easiest to use
an antenna software package that I have in my lab. I know that Matlab
can call the antenna software through a command called system. Matlab
a
Howdy,
I am working on some research. I'm trying to optimize the performance of
an antenna. For the simulation of the antenna it would be easiest to use
an antenna software package that I have in my lab. I know that Matlab
can call the antenna software through a command called system. Matlab
a
Deby Campbell wrote:
>
> Hi , I've been using the IDLE python but when I try to make scrips with a
>
> word editor, but when I try to use them in the commend prompt it says
> there
> is no such file or directory except when I use the first one I made. So I
> thought I would just use the one tha
Hi , I've been using the IDLE python but when I try to make
scrips with a
word editor, but when
I try to use them in the commend prompt it says there
is no such file or directory except when
I use the first one I made. So I
thought I would just use the one that
worked but for some reason i
shawn bright wrote:
> If i have a thread, of type threading.Thread
> that i initiate with an __init__
> in the
> def run(self):
> while 1:
> do some stuff
>
>
> is there a way i can stop this thread and restart this thread from
> within itself ?
A thread may suspend itself using one
shawn bright wrote:
> ok, how would i have it re-initialize itself ?
>
> yes, i want to do this on a failure condition.
> something wrapped in a try - except
Nothing magic, it's just code. Something like this:
def run(self):
while 1:
# (re)initialization code goes here
while 1:
If i have a thread, of type threading.Thread
that i initiate with an __init__
in the
def run(self):
while 1:
do some stuff
is there a way i can stop this thread and restart this thread from within
itself ?
thanks
___
Tutor maillist - Tu
ok, how would i have it re-initialize itself ?
yes, i want to do this on a failure condition.
something wrapped in a try - except
its long and complicated dealing with talking to a dataserver over ip and
passing byte streams back and forth.
i just need to do this for testing to see where someth
shawn bright wrote:
> If i have a thread, of type threading.Thread
> that i initiate with an __init__
> in the
> def run(self):
> while 1:
> do some stuff
>
>
> is there a way i can stop this thread and restart this thread from
> within itself ?
No. A thread stops by exiting the
shawn bright wrote:
> If i have a thread, of type threading.Thread
> that i initiate with an __init__
> in the
> def run(self):
> while 1:
> do some stuff
>
>
> is there a way i can stop this thread and restart this thread from
> within itself ?
Speaking from a purely theoretical st
shawn bright wrote:
> Hello there,
>
> if i have a python datetime object, what is the easiest way to make it
> into epoch seconds ?
impIn [1]: import datetime
In [2]: now = datetime.datetime.now()
In [4]: now.timetuple()
Out[4]: (2007, 7, 20, 11, 56, 58, 4, 201, -1)
In [5]: import calendar
In [
Hello there,
if i have a python datetime object, what is the easiest way to make it into
epoch seconds ?
thanks
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Thu, Jul 19, 2007 at 11:04:38PM -0700, Deby Campbell wrote:
>
>
> Hi , I?ve been using the IDLE python but when I try to make
> scrips with a word editor, but when I try to use them in the commend prompt it
> says there is no such file or directory except when I use the first one I
> made.
>
try adding:
print "current block:", one_char_box
print "zeros: ", zero_count
to the lines just below your if statement that you think is called only
once. This way you know how many times its called and you might be able
to find the error.
Chris Henk
Allison Transmission
phone: 317.242.2569
A bug:
The function random.randint(a,b) include both ends
i.e. b is also included. Thus for file with single
line a=0,b=1 my algo will give an IndexError.
Significance of number 4096 :
file is stored in blocks of size 2K/4K/8K (depending
upon the machine). file seek for an offset goes block
by blo
Hi , I’ve been using the IDLE python but when I try to make
scrips with a word editor, but when I try to use them in the commend prompt it
says there is no such file or directory except when I use the first one I made.
So I thought I would just use the one that worked but for some reason it still
30 matches
Mail list logo