>>
>> Is this possible without too much pain? I know I can code it with C#
>> or C++ but tha'ts a road to avoid, if possible.
>
> Well of course I don't know exactly what you'd need, but the
> answer's certainly Yes :)
Need I mention that it is also easy to write a windows service, using
pyservic
Hello,
I am writing a simple delayed-call mechanism , that is causing a bit of
headache. Works like this:
myPrint(s)
print "..." + s
myTimer.add(myPrint , "hello" , 15)
This means that the myprint function is called in 15 seconds with the
parameter "hello".
The housekeeping of these timers
>
> The primary use case is searching a container:
>
> prep_tasks()
> for item in container:
> if predicate(item):
> found_tasks()
> break
> else:
> not_found_tasks()
> follow_up_tasks
>
I've found myself mimicing this again and again in c, and was pleased
>for action in repeat(f, n): action()
>I don't know how 'Pythonic' this would be...
agree,
or this:
import itertools
def f1():
print "hello"
[f() for f in itertools.repeat(f1,6)]
tpt
--
http://mail.python.org/mailman/listinfo/python-list
The readFile function from the win32 package aparently really expect an
integer :
def inWaiting(self):
"""Returns the number of bytes waiting to be read"""
flags, comstat = ClearCommError(self.__handle)
return comstat.cbInQue
ReadFile(h, s.inWaiting())
My code crash
>If you're hosting IronPython and catching this from a .NET language
>then you'll be catching the .NET exception.
Yes
>In that case you can access the original Python exception
>from ex.Data["PythonExceptionInfo"].
Yes ! YES !
Thx
regards tpt
--
http://mail.python.org/mailman/listinfo/pytho
Hello ,
When an exeption occurs in a IronPython executet script, and I print the
sys.exc , i get something ugly like the example below.
How can I get the fileName and line number?
Thx in advance
Troels
26-06-2007 13:19:04 : IronPython.Runtime.Exceptions.PythonIndentationError:
unexpected tok
I read that when the serial port encounters an error (frame error or
so, I imagine?) it stop receiving data until the library function
"getCommError()" is called.
Troels:
I think you are right
Am I on the good track? Can I call this function from my pyserial
code?
Why pyserial does'nt raise a s
> Great! It works.
>
There is a builtin function called hex() that does the same, but also shares
the same problem as the solution above:
>>> hex(10)
'0xa'
>>>
This is probably not "nice" in your printouts, it doesn't allign.
with the printf inspired solution you can set the precision like
Hello,
I am wondering if I can write some code, that allows me to call functions in
the console , IDLE, without using the paranthesis notation. Like print.
This will improve "intreractive'ness"
serialOpen() # some magic is issued here !!!
tx Hello
instead of
serialObj = mySerial()
serialObj
"HMS Surprise" <[EMAIL PROTECTED]> skrev i en meddelelse
news:[EMAIL PROTECTED]
>
> In the file snippet below the value for the global hostName is
> determined at runtime. Functions imported from the parent baseClass
> file such as logon also need access to this variable but cannot see it
> the
Hello All
I have trouble printing to stdout from a thread and main program.
Not only will it look strange when they try to print at the same time, that
is ok, but i think i see lock-ups. (strange exceptions in Tkinker etc) Or is
it an issue with IDLE ?
Should I implement a lock'ed / queued ver
12 matches
Mail list logo