Re: pyrudp

2013-01-30 Thread wrw
On Jan 30, 2013, at 7:14 PM, Chris Angelico ros...@gmail.com wrote: On Thu, Jan 31, 2013 at 11:04 AM, Jorge Alberto Diaz Orozco jaoro...@estudiantes.uci.cu wrote: I have restrictions in my system that does not allow me to use TCP, so I want to make a pipe over UDP imitating TCP behavior. I

Re: Noob: Trying to run two python scrips on a pfsense/freeBSD for the OWL-Intuition-LC

2013-01-01 Thread wrw
On Jan 1, 2013, at 9:42 PM, vbho...@gmail.com wrote: Hi, I wrote couple of scrips to work with OWL-intution-LC home/office electricity monitor. The concept of the first scrip (owl.py) to capture network multicast from the OWL gateway and write to a .csv file has been taken from a

Re: problem with usbtmc-communication

2012-12-11 Thread wrw
On Dec 11, 2012, at 1:58 AM, Jean Dubois jeandubois...@gmail.com wrote: On 10 dec, 16:34, w...@mac.com wrote: On Dec 10, 2012, at 8:31 AM, Jean Dubois jeandubois...@gmail.com wrote: [byte] As you can see this approach suffers from the same buffer problem as the approach with readline did.

Re: problem with usbtmc-communication

2012-12-11 Thread wrw
On Dec 11, 2012, at 3:48 PM, Jean Dubois jeandubois...@gmail.com wrote: [byte] OK - I see where the examples came from, and I notice - int my_inst; my_inst=open(ā€œ/dev/usbtmc1ā€,O_RDWR); write(my_inst,ā€*RST\nā€,5); close(my_inst); and similarly in another

Re: problem with usbtmc-communication

2012-12-10 Thread wrw
On Dec 10, 2012, at 8:31 AM, Jean Dubois jeandubois...@gmail.com wrote: [byte] As you can see this approach suffers from the same buffer problem as the approach with readline did. One now good argue as a workaround: get rid of the first data pair and add an extra measure command for the

Re: problem with usbtmc-communication

2012-12-06 Thread wrw
On Dec 6, 2012, at 8:50 AM, Jean Dubois jeandubois...@gmail.com wrote: [byte] It seems there is some misunderstanding here. What I meant with how to do the equivalent in Python refered to reading characters rather than lines. I have written working code myself for another Keithleu which

Re: problem with usbtmc-communication

2012-12-06 Thread wrw
On Dec 6, 2012, at 2:41 PM, Jean Dubois jeandubois...@gmail.com wrote: On 6 dec, 15:50, w...@mac.com wrote: On Dec 6, 2012, at 8:50 AM, Jean Dubois jeandubois...@gmail.com wrote: [byte] It seems there is some misunderstanding here. What I meant with how to do the equivalent in Python

Re: How to list a file which already created a 2 mins ago

2012-12-06 Thread wrw
On Dec 6, 2012, at 4:29 PM, Irmen de Jong irmen.nos...@xs4all.nl wrote: On 6-12-2012 17:49, moonhkt wrote: Hi All AIX.5.3 Python 2.6.2 File ftp to Machine A, need to rename then send to Machine B. How to list a file which already created a 2 mins ago ? If file aging more than 2

Re: problem with usbtmc-communication

2012-12-05 Thread wrw
On Dec 4, 2012, at 11:12 AM, Jean Dubois jeandubois...@gmail.com wrote: On 4 dec, 15:33, w...@mac.com wrote: On Dec 4, 2012, at 7:14 AM, Jean Dubois jeandubois...@gmail.com wrote: The following test program which tries to communicate with a Keithley 2200 programmable power supply using

Re: problem with usbtmc-communication

2012-12-05 Thread wrw
On Dec 5, 2012, at 3:38 PM, Jean Dubois jeandubois...@gmail.com wrote: [byte] I note that in your Octave example you are reading characters rather than lines. It seems to me that you have two choices here, either do the equivalent in python or dig through the Keithley documentation to

Re: [newbie] problem with usbtmc-communication

2012-12-04 Thread wrw
On Dec 4, 2012, at 7:14 AM, Jean Dubois jeandubois...@gmail.com wrote: The following test program which tries to communicate with a Keithley 2200 programmable power supply using usbtmc in Python does not work as expected. I have connected a 10 ohm resistor to its terminals and I apply 0.025A,

Puzzling error msg.

2012-12-03 Thread wrw
call last): File ./Connection_Monitor.py, line 146, in module Google_up, Google_summary, Google_RTT, Google_stddev = Google.connection_test() File /Users/wrw/Dev/Python/Connection_Monitor/Version2.2/WorkingCopy/network.py, line 101, in connection_test # IndexError: list index out

Re: Puzzling error msg.

2012-12-03 Thread wrw
On Dec 3, 2012, at 1:12 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 03 Dec 2012 12:37:42 -0500, wrw wrote: So far in my experience with Python, it's error messages have been clear, concise, and quite good at fingering my errors. However, the message below has

Re: Puzzling error msg.

2012-12-03 Thread wrw
On Dec 3, 2012, at 1:27 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Dec 3, 2012 at 10:37 AM, w...@mac.com wrote: if found_0 == True or found_1 == True: Not related to your problem, but this line would be more pythonic as: if found_0 or found_1: Thanks Ian - yes,

Re: Python Script for Colorizing Traceroute Output

2012-11-17 Thread wrw
Don't forget that most firewalls don't decrement) the time-to-live number, and unless you REALLY know what to look for, are invisible. -Bill On Nov 17, 2012, at 10:04 AM, Jordan Bylsma jordan.byls...@gmail.com wrote: I'm looking into writing a python script that colorizes particular hops when

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread wrw
On Nov 17, 2012, at 10:04 AM, Jordan Bylsma jordan.byls...@gmail.com wrote: I'm looking into writing a python script that colorizes particular hops when using traceroute. Anyone run across something like this? I don't think it would be extremely difficult to write but some example code would

Re: Subprocess puzzle and two questions

2012-11-14 Thread wrw
On Nov 14, 2012, at 9:22 AM, Roy Smith r...@panix.com wrote: In article mailman.3666.1352873042.27098.python-l...@python.org, William Ray Wing w...@mac.com wrote: On Nov 13, 2012, at 11:41 PM, Roy Smith r...@panix.com wrote: In article mailman.3664.1352867713.27098.python-l...@python.org,

Subprocess puzzle and two questions

2012-11-13 Thread wrw
I need to time the operation of a command-line utility (specifically nslookup) from within a python program I'm writing. I don't want to use python's timeit function because I'd like to avoid python's subprocess creation overhead. That leads me to the standard UNIX time function. So for

Re: problem with module PyVisa

2012-11-09 Thread wrw
On Nov 9, 2012, at 3:43 PM, Jean Dubois jeandubois...@gmail.com wrote: The error may be obvious but finding this file and how to install it is not unfortunately. It seems I have to install it from the National Instruments site but Debian Linux doesn't seem to be supported... and I doubt

Re: Multi-dimensional list initialization

2012-11-08 Thread wrw
On Nov 7, 2012, at 11:51 PM, Andrew Robinson andr...@r3dsolutions.com wrote: On 11/07/2012 04:00 PM, Steven D'Aprano wrote: Andrew, it appears that your posts are being eaten or rejected by my ISP's news server, because they aren't showing up for me. Possibly a side- effect of your dates

Re: Getting a TimedRotatingFileHandler not to put two dates in the same file?

2012-10-24 Thread wrw
On Oct 24, 2012, at 10:22 AM, David M Chess ch...@us.ibm.com wrote: This works great, splitting the log information across files by date, as long as the process is actually up at midnight. But now the users have noticed that if the process isn't up at midnight, they can end up with

Re: Exact integer-valued floats

2012-09-24 Thread wrw
On Sep 22, 2012, at 7:06 PM, Dave Angel d...@davea.name wrote: On 09/22/2012 05:05 PM, Tim Roberts wrote: Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On 22 Sep 2012 01:36:59 GMT, Steven D'Aprano wrote: For non IEEE 754 floating point systems, there is no telling how bad the