Error when interfacing with TCP/IP

2008-06-25 Thread Devarajulu, Baskar (D.)
C. port = 8080 BAUD_RATE = 115200 if (COMM_TYPE == 1): asap3.TcpOpen(TCP_ip,port) Error: C:/Apps/dSPACE51/Common/Python22/Modules/InterfaceLibs/asap3lib.py", line 320, in TcpOpen asap3libError: Error connect TCP/IP Thanks if you can help. Regards, Baskar D.

XML Parsing: Expat Error

2008-07-17 Thread Gerth, William D
Hey all, I'm simply trying to get my feet wet with XML parsing, and I tried to just do something simple with ElementTree, just throw the XML tags from a file into a list. The code is as follows (and may be wrong): import glob import xml.etree.ElementTree as ET tree = ET.parse('nameofFileh

Re: Parsing VHDL with python, where to start.

2008-07-23 Thread c d saunter
Svenn Are Bjerkem ([EMAIL PROTECTED]) wrote: : Hi, : I am in the need to write an application for PyQt to visualise the : structure of a VHDL project I am working on. Looking for a sensible : way to parse VHDL files and putting them into a data structure that : PyQt can represent as a tree (or what

class level properties

2008-04-12 Thread Charles D Hixson
I'm trying to construct read-only variables at the class level. I've been unsuccessful. Any suggestions? Mixing @classmethod and @property doesn't appear to produce workable code. Ditto for mixing @classmethod and __getattr__. (The property approach compiles, but execution says that you can

Re: class level properties

2008-04-12 Thread Charles D Hixson
Arnaud Delobelle wrote: > On Apr 12, 8:36 pm, Charles D Hixson <[EMAIL PROTECTED]> > wrote: > >> I'm trying to construct read-only variables at the class level. I've >> been unsuccessful. Any suggestions? >> >> Mixing @classmethod and @pr

Re: class level properties

2008-04-13 Thread Charles D Hixson
Peter Otten wrote: > Charles D Hixson wrote: > > >> I want a hundred or so read-only variables, and I'm not sure the best >> way to achieve it. >> > > What do you really want to do? I recommend that you forget about bondage and > rely upon displin

Re: Wx Python - Code Structure & Event Handling

2008-09-09 Thread Stephen D Evans
Lee, have you considered using the Model-View-Presenter pattern? There is a nice example on the wxPython wiki: http://wiki.wxpython.org/ModelViewPresenter This scales well to complex GUIs. Grasping the concept and writing the initial code is the difficult part. Code is then much easier to deve

Re: Any python HTML generator libs?

2006-03-09 Thread Stephen D Evans
templates and css are easy to maintain. Whereas some code/markup written with a python HTML generator is difficult to maintain. Stephen D Evans -- http://mail.python.org/mailman/listinfo/python-list

TKinter problem

2006-03-21 Thread C D Wood
To whom this may concern, Below is the source code, which demonstrates a problem I am having making a GUI for my python project work. 'table.txt' is a file that is read from the same folder. My code writes to a text file 'table.txt', and 'table.txt' is dis

How to get many places of pi from Machin's Equation?

2010-01-09 Thread Richard D. Moores
Machin's Equation is 4 arctan (1/5) - arctan(1/239) = pi/4 Using Python 3.1 and the math module: >>> from math import atan, pi >>> pi 3.141592653589793 >>> (4*atan(.2) - atan(1/239))*4 3.1415926535897936 >>> (4*atan(.2) - atan(1/239))*4 == pi False >>> abs((4*atan(.2) - atan(1/239))*4) - pi < .0

Re: How to get many places of pi from Machin's Equation?

2010-01-09 Thread Richard D. Moores
On Sat, Jan 9, 2010 at 07:57, Mark Dickinson wrote: > On Jan 9, 11:31 am, "Richard D. Moores" wrote: >> Machin's Equation is >> >> 4 arctan (1/5) - arctan(1/239) = pi/4 >> [...] >> >> Is there a way in Python 3.1 to calculate pi to g

How does IDLE do it?

2011-02-10 Thread Richard D. Moores
I recently wrote some code that prints information about the 'jukugo' used in Japanese newspaper articles. A jukugo is a Japanese word written with at least 2 kanji. An example of a 2-kanji jukugo is 危機 (kiki -- crisis). I found that I could not use my usual IDE to render the Japanese correctly in

IDLE won't wrap lines of text

2011-02-19 Thread Richard D. Moores
Vista Python 3.1.3 I can't figure out how to get IDLE to wrap text pasted in from, say, a newspaper article. Usually, a each paragraph will appear as one long unwrapped line, with no way to read the whole line, because no horizontal bar is created. I haven't found anything about this in either the

Re: IDLE won't wrap lines of text

2011-02-20 Thread Richard D. Moores
On Sun, Feb 20, 2011 at 16:31, Rhodri James wrote: > On Sat, 19 Feb 2011 23:56:45 -, Richard D. Moores > wrote: > >> Vista >> Python 3.1.3 >> >> I can't figure out how to get IDLE to wrap text pasted in from, say, a >> newspaper article. Usual

Re: IDLE won't wrap lines of text

2011-02-20 Thread Richard D. Moores
On Sun, Feb 20, 2011 at 18:32, Rhodri James wrote: > On Mon, 21 Feb 2011 01:41:12 -, Richard D. Moores > wrote: > >> On Sun, Feb 20, 2011 at 16:31, Rhodri James >> wrote: >>> >>> On Sat, 19 Feb 2011 23:56:45 -, Richard D. Moores >>&

python list digest

2010-05-12 Thread Biyana, D. (Dugmore)
Hi All! I have a huge file and I want to extract subtext starting with "{1:" and ending with "-}" inclusive. This subtext recurs in many places in the file and I want the resultant to be in some output file. Any suggestions about the best way forward. Nedbank Limited Reg No

Re: easy question on parsing python: "is not None"

2010-08-06 Thread Richard D. Moores
On Thu, Aug 5, 2010 at 16:15, Rhodri James wrote: > On Thu, 05 Aug 2010 17:07:53 +0100, wheres pythonmonks > wrote: > You're not testing for equivalence there, you're testing for identity.  "is" > and "is not" test whether the two objects concerned are (or are not) the > same object.  Two object

Re: easy question on parsing python: "is not None"

2010-08-06 Thread Richard D. Moores
On Fri, Aug 6, 2010 at 01:32, Bruno Desthuilliers wrote: > Richard D. Moores a écrit : >> >> On Thu, Aug 5, 2010 at 16:15, Rhodri James >> wrote: >>> >>> On Thu, 05 Aug 2010 17:07:53 +0100, wheres pythonmonks >>> wrote: >> >>&g

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread Richard D. Moores
On Thu, Aug 5, 2010 at 18:47, Philip Semanchuk wrote: > > it's just a question of whether or not > the module in question exposes any kind of a version attribute. There's no > standard, unfortunately. The most popular convention seems to be via an > attribute called __version__, but I've also seen

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-16 Thread Elizabeth D Rather
n). Get one of the more recent ones, some of which I wrote. Cheers, Elizabeth -- == Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http:/

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Elizabeth D Rather
ssary for general programming. Cheers, Elizabeth -- == Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-18 Thread Elizabeth D Rather
t had a "snowball's chance" because it was never picked up by the CS gurus who, AFAIK, never really took a serious look at it. Cheers, Elizabeth -- == Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc.

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-18 Thread Elizabeth D Rather
s, nested tables are. You indicated that you have a copy of Forth Application Techniques. Sections 8.1 and 8.2 cover this topic, with some drawings. Cheers, Elizabeth -- == Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc.

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Elizabeth D Rather
y to help. Cheers, Elizabeth -- ====== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Service

Semaphore Techniques

2009-07-28 Thread John D Giotta
I'm looking to run a process with a limit of 3 instances, but each execution is over a crontab interval. I've been investigating the threading module and using daemons to limit active thread objects, but I'm not very successful at grasping the documentation. Is it possible to do what I'm trying to

Re: Semaphore Techniques

2009-07-29 Thread John D Giotta
I'm working with up to 3 process "session" per server, each process running three threads. I was wishing to tie back the 3 "session"/server to a semaphore, but everything (and everyone) say semaphores are only good per process. -- http://mail.python.org/mailman/listinfo/python-list

Re: Semaphore Techniques

2009-07-29 Thread John D Giotta
That was my original idea. Restricting each process by pid: #bash procs=`ps aux | grep script.pl | grep -v grep | wc -l` if [ $procs -lt 3 ]; then python2.4 script.py config.xml else exit 0 fi -- http://mail.python.org/mailman/listinfo/python-list

GUI interface builder for python

2009-08-16 Thread l...@d@n
Which is the best GUI interface builder with drag and drop capabilities. I am using Ubuntu GNU/Linux. Please help me. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6 windows install

2009-08-21 Thread Kevin D . Smith
files not getting installed. If those dlls haven't been previously installed, they won't be on the client machine in order for python to use them. However, I haven't had any luck installing these files manually and getting python to work that way. -- Kevin D. Smith -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6 windows install

2009-08-21 Thread Kevin D . Smith
On 2009-08-21 11:43:31 -0500, Kevin D. Smith said: On 2009-08-21 10:39:09 -0500, "Martin v. Löwis" said: Did you install Python to the network device from your XP box? That would explain why you can run it: the required registry settings & environment variables are added by

HTTP POST File without cURL

2009-09-09 Thread John D Giotta
I'm working with an API that allows me to POST a zip file via HTTP and the documentation uses a cURL example. cURL works, but when I try to POST the file via python it fails. I don't want to use cURL (since I'm trying to be transparent and dependency-less), but I can't find anything online that wor

RE: Test 0 and false since false is 0

2017-07-07 Thread Paul D. DeRocco
lse is 0 > False Funny how the subject line inadvertently prefigures the answer: False *isn't* 0. False *equals* 0. So just change "==" to "is" and "!=" to "is not" and it should work. Also, it can be done in a single expression, with no local variables. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com -- https://mail.python.org/mailman/listinfo/python-list

RE: Test 0 and false since false is 0

2017-07-08 Thread Paul D. DeRocco
changed. That said, "x is 0" is even simpler. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com -- https://mail.python.org/mailman/listinfo/python-list

combuter is use full message

2011-12-15 Thread D. Mohan M. Dayalan
http;//123maza.com/48/moon670/ -- http://mail.python.org/mailman/listinfo/python-list

ckjdlkfnl,ndf,nfd,fndfnkdnk mmdlssdlndnll; k; as; lkds sjdsljdlskjdsl; kdslksdl; ddlk

2011-12-16 Thread D. Mohan M. Dayalan
http;//123maza.com/48/moon670/ -- http://mail.python.org/mailman/listinfo/python-list

ckjdlkfnl,ndf,nfd,fndfnkdnk mmdlssdlndnll; k; as; lkds sjdsljdlskjdsl; kdslksdl; ddlk

2011-12-25 Thread D. Mohan M. Dayalan
http;//123maza.com/48/moon670/ -- http://mail.python.org/mailman/listinfo/python-list

Sharon Stone - Anna Kournikova Lindsay lohan

2007-06-10 Thread D - A - T - I - N - G
Sharon Stone - Anna Kournikova Lindsay lohan search engines + cams www.alphasearch.gr www.alphasearch.ru-- http://mail.python.org/mailman/listinfo/python-list

Re: Getting HTTP responses - a python linkchecking script.

2006-05-08 Thread p-d-p=pas-de-spam
[EMAIL PROTECTED] a écrit : > Hi Folks, > > I'm thinking about writing a script that can be run over a whole site > and produce a report about broken links etc... > > I've been playing with the urllib2 and httplib modules as a starting > point and have found that with urllib2 it doesn't seem poss

<    1   2   3   4   5   6