Re: DrPython debugger

2005-09-09 Thread Colin J. Williams
Pandiani wrote: > Thanks for repy. > However, I found SimpleDebugger 0.5 from sourceforge.net as plugin for > drPython but I'm getting error message because DrPython cannot load > module drPythonChooser and it seems that the module is removed from > latest version of drPython. Or maybe I wasn't abl

Re: bug in numarray?

2005-09-09 Thread Colin J. Williams
Xiangyi wrote: > Hi, there, > > I got the following segmentation fault. > >> from numarray import * >> a = zeros((5,100), Float64) >> b = kroneckerproduct(a, identity(12)) >> segmentation fault > > > If I use a = zeros((5,100)), everything is fine. Kind of weird! > Can someone help me figure it

Re: Python linear algebra module -- requesting comments on interface

2005-09-09 Thread Colin J. Williams
Connelly, Apologies, my first message was sent in error. I like your general setup. You appear to permit matrix operations, which the folk at Numeric and, later, numarray did not. My own package, PyMatrix, has similar aims to yours but it may be slower as it is based on numarray. My package

Re: Unfortunate newbie questions!

2005-09-12 Thread Colin J. Williams
CPIM Ronin wrote: > Hi Folks, > > I'm brand spanking new to Python, busy reading docs and going through > two of the ubiquitous O'Reilly books--"Learning Python" by Lutz/Ascher > and "Python Programming on Win32" by Hammond/Robinson. > > Still I have a just few newbie questions: > >-In

Problem with Help when using numarray

2005-09-16 Thread Colin J. Williams
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With numarray, help gives unhelpful responses: import numarray.numarraycore as _n c

Re: Problem with Help when using numarray

2005-09-16 Thread Colin J. Williams
Fredrik Lundh wrote: > Colin J. Williams wrote: > > >>With numarray, help gives unhelpful responses: >> >>import numarray.numarraycore as _n >>c= _n.array((1, 2)) >>print 'rank Value:', c.rank >>print 'c.rank Help:', help(c.rank)

Re: vendor-packages directory

2005-09-21 Thread Colin J. Williams
Terry Reedy wrote: > "Rich Burridge" <[EMAIL PROTECTED]> wrote in message >>Until now we've been using "/usr/lib/python2.4/site-packages" as the >>directory to install the various Python files that these packages use. > > > My impression is that this is exactly the intended place for general-us

Re: Definitive documentation on newstyle classes? (WAS: Pickling and inheritance are making me hurt)

2005-02-08 Thread Colin J. Williams
Brian van den Broek wrote: Daniel Bickett said unto the world upon 2005-02-05 19:46: I was reading the "Pickling and inheritance are making me hurt" thread, and the latest suggestion (as of this posting) was to do with the __setstate__ and __getstate__ methods. They caught my attention because I ha

Re: Definitive documentation on newstyle classes? (WAS: Pickling and inheritance are making me hurt)

2005-02-09 Thread Colin J. Williams
Michele Simionato wrote: It would be good to have a clear exposition of the pros and cons of __new__ usage. It is there mostly because __init__ would not work on immutable types. OTOH, you probably do not want to use __new__ on mutable types (once I was caught by this trap, google for "overriding

Re: Multidimensional arrays - howto?

2005-02-16 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: Hello all, I am trying to convert some C code into python. Since i am new to python, i would like to know how to deal with multidimensional arrays? Thanks, -Joe Here's a snippet of what i am trying to convert: # define table0 15 # define table1 20 unsigned int Table[table0]

Re: Can __new__ prevent __init__ from being called?

2005-02-16 Thread Colin J. Williams
Felix Wiemann wrote: Steven Bethard wrote: Felix Wiemann wrote: How can I prevent __init__ from being called on the already-initialized object? The short answer: you can't: http://www.python.org/2.2.3/descrintro.html#__new__ [snip] This prompts a similar query. __new__ appears to be intende

Re: Pythonwin: Red squiggley underline and syntax error

2005-02-28 Thread Colin J. Williams
Steven Bethard wrote: Brent W. Hughes wrote: I copied and pasted some text into my Python code and then Pythowin put a red squiggley underline under the two tabs at the beginning of the line. What does that mean? I've tried various things including deleting the white space in front of the line

os.join Windows action

2005-03-05 Thread Colin J. Williams
I am puzzled by the Windows XP usage below: C:\Python23\Lib\site-packages\PyMatrix>c:python23\python The system cannot find the path specified. C:\Python23\Lib\site-packages\PyMatrix>c:python23\python.exe The system cannot find the path specified. C:\Python23\Lib\site-packages\PyMatr

Python Presentation

2005-03-08 Thread Colin J. Williams
Rod, This is to confirm the telephone message I left yesterday. The Introduction to Python is scheduled for 8.0pm this evening at the Fulford Academy, 280 King Street East. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Announcement: PyMatrix-0.0.1a Released

2005-03-09 Thread Colin J. Williams
PyMatrix is a package to provide access to the functionality of matrix algebra. This package is currently based on numarray. It includes a statistics module which includes a basic analysis of variance. In the future it is hoped to enhance the generality of the divide operation, to add the tra

Re: Second argument to super().

2005-03-11 Thread Colin J. Williams
Steve Holden wrote: John Roth wrote: "Tobiah" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] What is the purpose of the second argument to super()? I've always found the docs to be fairly confusing. They didn't give me enough context to tell what was going on. I also find the termi

Re: PythonWin

2005-03-12 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: I have a Python program that collects user input using msg = "Enter the full path and name of the file to be processed: " answer = raw_input(msg) If I run it in IDLE, the question is splashed across the execution window, and if it is long, simply wraps to the next line. Mos

Re: Random number generation from functions

2004-11-29 Thread Colin J. Williams
drs wrote: Is there any way to generate random numbers based on arbitrary real valued functions? I am looking for something like random.gauss() but with natural log and exponential functions. thanks, -d numarray has a random package which provides a number of functions, including: normal( mean,

Re: Delphi underrated, IDE clues for Python

2004-12-01 Thread Colin J. Williams
John wrote: "Caleb Hattingh" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... thx, I already have and use PythonForDelphi (and am on the mailing list). It works very well indeed, my impression is that Python-Delphi connection is even easier than Python-C integration (e.g. via SWI

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Colin J. Williams
Jp Calderone wrote: On Thu, 02 Dec 2004 15:29:53 +0100, Peter Maas <[EMAIL PROTECTED]> wrote: Diez B. Roggisch schrieb: Same task on Win2k: download wxPython-setup.exe, double-click, done. Took me approx. 1 minute. This strikes me. Why are some tasks so hard on Linux and so easy on Windows? After a

Re: why no python setup.py uninstall?

2004-12-05 Thread Colin J. Williams
Peter Hansen wrote: Alia Khouri wrote: I'm guessing that this is a non-issue for most people (-; Well, you've allowed all of about 1.5 days for replies to come, and on a weekend at that. Be patient. I would also guess it's a non-issue as well, however. A quick perusal of the archives (which I leav

Re: Connecting to numarray. Problem with the setup program

2004-12-08 Thread Colin J. Williams
Jean Moser wrote: I tried many times to connect to numarray without success. I choosed the release: numarray-1.1.1.win32py2.2.exe then I went to the setup program made by Greenfield and I tried to follow the commands.The mentioned Python directory is C:\PROGRA~2 which is not covenient. I tried to c

Re: How to set condition breakpoints?

2004-12-10 Thread Colin J. Williams
Christopher J. Bottaro wrote: I have a script with a class in it: class Class: def f(x, y): # do something I start up the debugger like this: python /usr/lib/python2.3/pdb.py myscript.py I want to set a conditional breakpoint: b Class.f, x == 1 and y == 2 but that doesn'

Re: PythonWin Not Updating

2004-12-16 Thread Colin J. Williams
Chris wrote: I'm working on a program in PythonWin. The problem I'm running into is that after I make a code change, PythonWin doesn't always see it. Has anyone else had this problem? Chris I've had this problem with older builds of PythonWin. With build 202 tis doesn't seem to be a problem fo

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Colin J. Williams
Paul Rubin wrote: "El Pitonero" <[EMAIL PROTECTED]> writes: What about no name at all for the scalar case: a['hello'] += 1 a['bye'] -= 2 I like this despite the minor surprise that it works even when a['hello'] is uninitialized. +1 and if the value is a list: a['hello']= [1, 2, 3] a['hello']+= [4]

Re: Numarray newbie question

2005-03-31 Thread Colin J. Williams
ChinStrap wrote: I know there are probably alternatives for this with the standard library, but I think that would kill the speed I get with numarray: Say I have two 2-dimensional numarrays (x_mat and y_mat, say), and a function f(x,y) that I would like to evaluate at every index. Basically I want

Re: unittest vs py.test?

2005-04-01 Thread Colin J. Williams
Grig Gheorghiu wrote: In my mind, practicing TDD is what matters most. Which framework you choose is a function of your actual needs. The fact that there are 3 of them doesn't really bother me. I think it's better to have a choice from a small number of frameworks rather than have no choice or have

Re: Best editor?

2005-04-07 Thread Colin J. Williams
Paul McGuire wrote: SciTE (Scintilla Text Editor) is just right for me too. Low overhead, great just as a Notepad alternative, but with good coding support too. -- Paul Yes, I use SciTE. Syntax marking and multiple buffers. Works with Windows and Linux. Boa-constructor (Scintilla based editor),

Re: Using Ming on Windows

2005-04-23 Thread Colin J. Williams
Jack Diederich wrote: On Sat, Apr 23, 2005 at 05:13:29PM -0300, Andr? Roberge wrote: I tried to install Ming (http://sourceforge.net/projects/ming/) on Windows to use with Python *but* I can't [/don't know how to] use "make" to install it. Does anyone know where I could find a ready-made compiled v

Re: UnicodeDecodeError: 'ascii' codec can't decodee byte 0xff in position 0: ordinal not in range(128)

2013-11-18 Thread Colin J. Williams
On 17/11/2013 11:55 PM, Hoàng Tuấn Việt wrote: Hi all, I use Python telnetlib on Windows 7 32 bit. Here is my code: def*telnet*(/self/, host, os, username, password): connection = telnetlib.Telnet(host) connection.read_until(/'login: '/) connection.write(username + /'\r'/)

Re: Python for microcontrollers

2013-12-03 Thread Colin J. Williams
On 03/12/2013 7:58 AM, Mark Lawrence wrote: I thought this might be of interest Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers Is this intended to be better than the Raspberry PI? RPi handles Python 2 or 3. How would it differ? Colin W. -- https://ma

Python 3.4.4 Install

2016-01-09 Thread Colin J. Williams
The reponse is not understood. *** Python 3.4.4rc1 (v3.4.4rc1:04f3f725896c, Dec 6 2015, 17:06:10) [MSC v.1600 64 bit (AMD64)] on win32. *** >>> File "C:\Users\Adm\AppData\Roaming\PyScripter\python_init.py", line 1 Öü:Vt‡Ö{ZðN)’ƒ2%hóýL"®ÁwÇ,”¿ƾJ ^ SyntaxError: invalid syntax Fil

Re: Will Python 3.x ever become the actual standard?

2013-10-23 Thread Colin J. Williams
On 23/10/2013 8:35 AM, Mark Lawrence wrote: On 23/10/2013 12:57, duf...@gmail.com wrote: Years have passed, and a LARGE number of Python programmers has not even bothered learning version 3.x. The changes aren't large enough to worry a Python programmer so effectively there's nothing to learn,

Re: Will Python 3.x ever become the actual standard?

2013-10-24 Thread Colin J. Williams
On 23/10/2013 9:13 AM, Tim Golden wrote: On 23/10/2013 14:05, Colin J. Williams wrote: On 23/10/2013 8:35 AM, Mark Lawrence wrote: On 23/10/2013 12:57, duf...@gmail.com wrote: Years have passed, and a LARGE number of Python programmers has not even bothered learning version 3.x. The changes

Re: Running Python programmes

2013-10-27 Thread Colin J. Williams
On 27/10/2013 10:32 AM, David wrote: I am an absolute beginner and am working through the book Python Programming for the Absolute Beginner by Michael Dawson. Everything is fine except if I run a scripted programme, or one I have downloaded, and then run another one, the second one will not r

Re: indentation blocking in Python

2013-10-27 Thread Colin J. Williams
On 27/10/2013 11:31 AM, ajetrum...@gmail.com wrote: a=1; if a==1: print(1) else: print(0) wait = input("press key") You indent only subordinate statements. You don't need a semi-colon unless it separates two statements on the same line. Your code: a=1 if a==1: print(1) else: print(0

Re: Python 3.4.1 64 bit Version

2014-07-18 Thread Colin J. Williams
Thanks to Chris and Zachary, I shall retreat to Python 3.3 *pro tem* *Colin W.* On 18 July 2014 09:53, Zachary Ware wrote: > On Fri, Jul 18, 2014 at 8:29 AM, wrote: > > The version given on Python.org is "Python 3.4.1 (v3.4.1:c0e311e010fc, > May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64

Windows Studio 2008 Download

2014-07-28 Thread Colin J. Williams
I gather that Python is compiled with Windows Studio 2008. Unfortunately, the MS Download link points to a Studio 2010 advertising .ppx Could someone point to an alternative please? Colin W. PS I need it for Numpy-1.8.1, which does not seem to be available with a binary version. -- https://ma

Re: Windows Studio 2008 Download

2014-07-29 Thread Colin J. Williams
i. I've seen notes, in various places to say that the Express version is not acceptable for compiling Python packages. Is it, in fact usable for this purpose? ii. The Service Pack 1 has the original studio as a prerequisite. That is no longer available from Microsoft. Any advice would be welco

sub-classing datetime

2013-02-07 Thread Colin J. Williams
I'm just making the transition from 2 to 3 for one module. With Python 2.7, I had the benefit of mx datetime, but this is not yet available for Python 3.2. I find that the 3.2 datetime is not subclassable, for reasons that were known some years back. It would help if there was a note in the

Re: Statistics...help with numpy/scipy install

2013-02-10 Thread Colin J. Williams
On 10/02/2013 12:35 PM, Rex Macey wrote: I'm new to Python with a new windows 8 machine (64-bit OS). Learning programming mainly for fun. Naturally I downloaded Python 3.3 (who doesn't want the latest and greatest). What I want involves functions related to the normal distribution. Based on

Re: A newbie question

2013-02-12 Thread Colin J. Williams
On 12/02/2013 10:06 AM, Alberto Salvati wrote: Hi, All. I'm a (old) delphi developer. I want to learn Python. I've python 2.7 and django. For learning purpose I want to use firebird. But, package (egg) to use firebird needs easy_install for setup. When i run: python ez_setup.py install pyth

Re: yield expression

2013-02-26 Thread Colin J. Williams
On 24/02/2013 7:36 PM, Ziliang Chen wrote: Hi folks, When I am trying to understand "yield" expression in Python2.6, I did the following coding. I have difficulty understanding why "val" will be "None" ? What's happening under the hood? It seems to me very time the counter resumes to execute, it

Re: yield expression

2013-02-26 Thread Colin J. Williams
while True: yield count count += 1 def main(): generator = counter() while True: print(next(generator)) if __name__ == '__main__': main() Hope helps. Vytas D. On Tue, Feb 26, 2013 at 4:34 PM, Colin J. Williams mailto:c...@ncf.ca>> wr

Re: Is it correct this way to inherit from a list?

2013-03-03 Thread Colin J. Williams
On 02/03/2013 9:30 PM, gialloporpora wrote: Risposta al messaggio di Rick Johnson : What are you trying to achieve exactly? I would like to implement a class (vector) to works with vectors, for example using scalar multiplication: a*v = [a*v1, a*vn] and a dual class for dual vector (the only

Apparent magic number problem

2013-03-08 Thread Colin J. Williams
I have a program that I wish to run in both Python 2.7 and Python 3.2 The program runs correctly under each version, but it runs more slowly under 3.2. This is probably due to the fact that the .pyc file is created for the Python 2.7 execution. When Python 3.2 is run it fails to create a ne

Re: Apparent magic number problem

2013-03-09 Thread Colin J. Williams
On 09/03/2013 3:51 AM, Peter Otten wrote: Colin J. Williams wrote: The program runs correctly under each version, but it runs more slowly under 3.2. This is probably due to the fact that the .pyc file is created for the Python 2.7 execution. When Python 3.2 is run it fails to create a new

Re: x += ... is not the same than x = x + ... if x is mutable

2013-03-21 Thread Colin J. Williams
On 21/03/2013 12:27 AM, Nobody wrote: On Wed, 20 Mar 2013 07:17:08 -0700, bartolome.sintes wrote: I thought that x += ... was the same than x = x + ..., but today I have realized it is not true when operating with mutable objects. It may or may not be the same. x += y will invoke x.__iadd__(y

Binary for numpy 1.7.0 with Python 2.7.3

2013-03-21 Thread Colin J. Williams
How do I find the binaries on Source Forge? I'm trying to update to both 2.7.3 and Numpy 1.7.0. Colin W -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary for numpy 1.7.0 with Python 2.7.3

2013-03-21 Thread Colin J. Williams
On 21/03/2013 4:00 PM, Dave Angel wrote: On 03/21/2013 03:40 PM, Colin J. Williams wrote: How do I find the binaries on Source Forge? I'm trying to update to both 2.7.3 and Numpy 1.7.0. Colin W Best answer might depend on what OS you're running, and what implementation of Pyt

Change in Python 3.3 with the treatment of sys.argv

2013-03-22 Thread Colin J. Williams
Below is an extract from some code to run on Python 2.7.3, 3.2.3 and 3.3.0 to compare speeds, both between versions and machines: if __name__ == '__main__': # Text string for initial test - Modify for your own machine or # delete it and and answer the input statement with your own machin

Re: Change in Python 3.3 with the treatment of sys.argv

2013-03-23 Thread Colin J. Williams
On 22/03/2013 6:11 PM, Ethan Furman wrote: On 03/22/2013 02:57 PM, Colin J. Williams wrote: Below is an extract from some code to run on Python 2.7.3, 3.2.3 and 3.3.0 to compare speeds, both between versions and machines: if __name__ == '__main__': # Text string for initial tes

Re: Change in Python 3.3 with the treatment of sys.argv

2013-03-23 Thread Colin J. Williams
On 22/03/2013 6:11 PM, Ethan Furman wrote: On 03/22/2013 02:57 PM, Colin J. Williams wrote: Below is an extract from some code to run on Python 2.7.3, 3.2.3 and 3.3.0 to compare speeds, both between versions and machines: if __name__ == '__main__': # Text string for initial tes

Re: Fwd: Re: distutils without a compiler

2013-04-05 Thread Colin J. Williams
On 04/04/2013 9:30 PM, Colin J. Williams wrote: Original Message Subject: Re: distutils without a compiler Date: Tue, 02 Apr 2013 16:26:59 -0700 From: Ned Deily To

Re: Interactive development in Python à la Smalltalk?

2013-04-08 Thread Colin J. Williams
On 08/04/2013 4:33 AM, Bienlein wrote: Hello, I'm absolutely new to Python, just looked at the language description for the first time. The first thought that came to my mind was whether you can program in Python in an interactive programming style, i.e. I can change code in the debugger whi

There must be a better way

2013-04-20 Thread Colin J. Williams
Below is part of a script which shows the changes made to permit the script to run on either Python 2.7 or Python 3.2. I was surprised to see that the CSV next method is no longer available. Suggestions welcome. Colin W. def main(): global inData, inFile if ver == '2': headerL

Re: There must be a better way

2013-04-21 Thread Colin J. Williams
On 20/04/2013 9:07 PM, Terry Jan Reedy wrote: On 4/20/2013 8:34 PM, Tim Chase wrote: In 2.x, the csv.reader() class (and csv.DictReader() class) offered a .next() method that is absent in 3.x In Py 3, .next was renamed to .__next__ for *all* iterators. The intention is that one iterate with fo

Re: There must be a better way

2013-04-21 Thread Colin J. Williams
On 21/04/2013 9:39 AM, Jussi Piitulainen wrote: Colin J. Williams writes: ... It is not usual to have a name with preceding and following udserscores,imn user code. Presumably, there is a rationale for the change from csv.reader.next to csv.reader.__next__. ... I think the user code is

Re: There must be a better way

2013-04-21 Thread Colin J. Williams
On 21/04/2013 9:43 AM, Peter Otten wrote: Colin J. Williams wrote: I was seeking some code that would be acceptable to both Python 2.7 and 3.3. In the end, I used: inData= csv.reader(inFile) def main(): if ver == '2': headerLine= inData.next()

Re: There must be a better way

2013-04-22 Thread Colin J. Williams
On 22/04/2013 10:42 AM, Neil Cerutti wrote: On 2013-04-21, Colin J. Williams wrote: On 20/04/2013 9:07 PM, Terry Jan Reedy wrote: On 4/20/2013 8:34 PM, Tim Chase wrote: In 2.x, the csv.reader() class (and csv.DictReader() class) offered a .next() method that is absent in 3.x In Py 3, .next

Re: [ANNC] pynguin-0.14 python turtle graphics application

2013-05-03 Thread Colin J. Williams
On 13/04/2013 8:10 PM, Miki Tebeka wrote: Pynguin is a python-based turtle graphics application. I wonder why Pynguin does not get more traction in the teaching sector. Looks ideal for teaching kids. Mili, I suggest that it's because Pynguin is not yet fully operational. I don't know where

Re: [Edu-sig] [ANNC] pynguin-0.14 python turtle graphics application

2013-05-03 Thread Colin J. Williams
On 03/05/2013 12:01 PM, Jurgis Pralgauskis wrote: Hi, do you plan to make step/debug functionality as it is made in RurPLE? I generally like RurPLE-NG http://dev.lshift.net/paul/rurple/ I improoved it fore easier learning http://grokbase.com/t/python/edu-sig/129r2hkchm/rurple-ng-is-nice#20121

Re: Help with loading file into an array

2013-05-05 Thread Colin J. Williams
On 05/05/2013 3:43 AM, Fábio Santos wrote: Using a nested array should waste a lot of memory. I think you should use PIL to load and read the image. > > I want to read the data from that gif file taking the red data (excluding the green and blue data) and store that in an array called Image[][

Re: PythonWin troubleshooting

2005-12-13 Thread Colin J. Williams
chuck wrote: > Build 205 for the win32 ext. > I have been having similar problems with build 205. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2005-12-17 Thread Colin J. Williams
David wrote: > linuxfreak wrote: > >> Which is a better python IDE SPE or WingIDE in terms of features >> > > You might want to look at a review of Python IDEs at > http://spyced.blogspot.com/2005/09/review-of-6-python-ides.html > > david lees Thanks, this is an excellent review. It mentions bu

Re: When Python *Eggs* better than Python *distutils*?? What's Eggs?

2005-12-20 Thread Colin J. Williams
Xavier Morel wrote: > [EMAIL PROTECTED] wrote: > >> So basically Python Eggs precompiles and compresses >> binaries for you so you just have to load it to run >> your app? >> > > Nah, Eggs is a packaging system, what you don't have to do is > compile/configure, because the packaging does that fo

Re: Python IDE's

2005-12-25 Thread Colin J. Williams
J. D. Leach wrote: > Quick question as I am rather new to Python. What is the preferred tool > amongst you gurus to use in coding Python? I have ran across Eric3 and > found it to be pretty well full-featured. Any comments or suggestions for > better tools/IDE's? > > J.D. Leach I wouldn't say "pre

pythonw problem?

2006-01-17 Thread Colin J. Williams
If I execute the single liner below in Boa Constructor, Python Scripter or PythonWin, I get crashes, using windows XP with numpy 0.9.2. Examples: # Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] # wxPython 2.6.1.0, Boa Constructor 0.4.4 # Type "copyright", "credits" or "li

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Colin J. Williams
J wrote: > Hi > > I hope the title of this message indicates my question. I am looking > for basic > array functionality in Python and it turns out that there are all these > packages which > are somehow related. Some are allegedly discontinued but still seem to > get updated. Could we start a dis

Re: Converting a web to pdf or ..‍

2006-07-24 Thread Colin J. Williams
Bayazee wrote: > Hi , > I have a web site and i want to write a perogram with python that my > users can convert custom web page of site to pdf (or other type :jpeg, > doc,odt,or...) and download it . i dont want only convert text . it is > be very good to i can don it for both text and images ...

Re: class variables

2006-07-30 Thread Colin J. Williams
Andre Meyer wrote: > Hi all > > I am trying to understand the magic of Python's class variables and > tried the following code (see below). > > Just out of curiosity, I tried to define a property that provides access > to a seemingly instancae variable which is in fact a class variable. All >

Re: Convert string to mathematical function

2006-08-02 Thread Colin J. Williams
Nick Vatamaniuc wrote: > Jeremy, > > Which method of extension are you using? For example you can pass the > function to C++/C directly using weave, without the need to convert to > Python first. Python has a different syntax than C++. Also I assume you > want exponentiation in you example "x^2...

Class instantiation

2006-08-23 Thread Colin J. Williams
In the example below, with the disassembly following that, we run into trouble with the line: self.connect(fileID, mode= 'r') # open sheet in the read mode the traceback is: Traceback (most recent call last): File "C:\Documents and Settings\cjw\My Documents\OODev\tArray.py", line 26

Re: Class instantiation

2006-08-23 Thread Colin J. Williams
Fredrik Lundh wrote: > Colin J. Williams wrote: > >> In the example below, with the disassembly following that, we run into >> trouble with the line: >> self.connect(fileID, mode= 'r') # open sheet in the read mode >> >> the tra

Re: Cannot import a module from a variable

2006-10-15 Thread Colin J. Williams
Christian Joergensen wrote: > "Jia Lu" <[EMAIL PROTECTED]> writes: > >> Hi all: >> >> I try to do things below: > import sys > for i in sys.modules.keys(): >> import i >> Traceback (most recent call last): >> File "", line 2, in >> import i >> ImportError: No module named i >>

User Access to the docstring of a property

2006-10-20 Thread Colin J. Williams
Is there some way that the user can access the docstring specified for a property? Please see the example below: # propDocTest class A(object): def __init__(self, value): self.value= value def vGet(self): return self.value V= property (fget= vGet, doc="Get Value.") a= A(22) p

Re: User Access to the docstring of a property

2006-10-21 Thread Colin J. Williams
no reference to @ or to decorators. [EMAIL PROTECTED] wrote: > Colin J. Williams wrote: >> Is there some way that the user can access the docstring specified for a >> property? > > Do keep in mind that the docstring is not guaranteed to be available. > If > the applicati

Re: Getting a lot of SPAM from this list

2006-10-24 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: > Larry> Does anyone have a suggestion as to a way that I can get less of > Larry> this spam? I'm running spamassassin > > Get a better spam filter? > > Skip Any suggestions for Firefox? Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a lot of SPAM from this list

2006-10-24 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: > >> Get a better spam filter? > > Colin> Any suggestions for Firefox? > > You can try SpamBayes (http://www.spambayes.org/). It has both POP3 and > IMAP filters that sit between your mail client and mail server. You control > and train them via a local web inte

Re: What's the best IDE?

2006-10-26 Thread Colin J. Williams
Josh Bloom wrote: > I'm not going to call it the 'best' ide as thats just silly. > > But if your developing on Windows pyscripter > http://mmm-experts.com/Products.aspx?ProductId=4 is a great IDE. > > -Josh > +1 Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the best IDE?

2006-10-26 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: > After researching Komodo, I found it's not free. The only funds I have > are a college fund, and I can't start diping into that until I'm going > to college. Any free AND good IDEs? > PyScripter has already been suggested. It is both of these. Colin W. -- http://mail

Re: Using classes in python

2006-10-27 Thread Colin J. Williams
trevor lock wrote: > Hello, > > I've just started using python and have observed the following : > > class foo: > a=[] > def __init__(self, val): > self.a.append ( val ) > def getA(self): > print self.a > return self.a > > z = foo(5) > y = foo(4) >

Re: __init__ function problem

2006-11-07 Thread Colin J. Williams
Carl Banks wrote: > kelin,[EMAIL PROTECTED] wrote: >> It says the __init__ is called immediately after an instance of the >> class is created. What dose "immediately" mean? >> And what is difference between the init method and the constructor in >> Java? > > For all intents and purposes, __init__

Re: Help solving Python 2.5 crash: The instruction "0x7c168f1d" referenced memory at "0x00000001c

2006-11-09 Thread Colin J. Williams
Pedro Rodrigues wrote: > Hi Bugra, > > thanks for your reply. I did try the same code on a Windows 2000 system > where I also installed and later removed Python 2.5. There, I obtained > the same problem :( That's why I think it has to do with software. I've > also searched on the internet and

range syntax

2006-11-10 Thread Colin J. Williams
One of the little irritants of Python is that the range syntax is rather long-winded: [Dbg]>>> range(3, 20, 6) [3, 9, 15] [Dbg]>>> It would be nice if one could have something like 3:20:6. I've just come across the r_class in numpy which doesn't go that far but does provide a generalization of th

Re: range syntax

2006-11-11 Thread Colin J. Williams
Fredrik Lundh wrote: > Colin J. Williams wrote: > >> One of the little irritants of Python is that the range syntax is rather >> long-winded: >> [Dbg]>>> range(3, 20, 6) >> [3, 9, 15] >> [Dbg]>>> >> It would be nice if one could have so

Re: Research Master 0.1 (GPL/Python)

2006-11-14 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: > ResearchMaster has been designed to simplify management of research > literature. It is a GUI interface to a system of folders and records. > Each record contains notes, meta info and BibTex info about an > associated file. Instances of the single copy of a record can oc

Re: NetBeans and Jython

2006-09-02 Thread Colin J. Williams
tatamata wrote: > Hello. > I installed NetBeans, Jython and Coyote. I hoped that I could use Swing GUI > builder intergrated in NetBeans (Matisse?) with Jython in "Delphi" way. But, > it seems that I can drag and drop controls only in pure Java application, > not in Jython application? > Does an

Re: Program to backtrack function calls in source code?

2006-09-02 Thread Colin J. Williams
Yu-Xi Lim wrote: > [EMAIL PROTECTED] wrote: >> many mistakes in programming arise when one changes the code and >> forgets to adjustment somewhere where it is used. Is there a program >> that can extract all place in the source code where a variable is >> accessed or a function called? >> For examp

Re: PATCH: Speed up direct string concatenation by 20+%!

2006-10-01 Thread Colin J. Williams
Congratulations on the clear way in which you have set out your proposal. I hope that it will make its way to PEPdom. Colin W. Larry Hastings wrote: > This is such a long posting that I've broken it out into sections. > Note that while developing this patch I discovered a Subtle Bug > in CPython

Re: Python/UNO/OpenOffice?

2006-10-02 Thread Colin J. Williams
wesley chun wrote: > as others have said, that project provides a working interface to OOo > (OpenOffice 2 on Ubuntu Breezy and Dapper). i've made several posts > to this regard over the summer here on CLP. i was mostly using it to > "mess around" with documents in StarWriter. > > cheers, > -- w

Re: python html rendering

2006-10-03 Thread Colin J. Williams
Josh Bloom wrote: > Hey Pierre, > > I'm using this plug-in for wordpress to display Python code. > http://blog.igeek.info/wp-plugins/igsyntax-hiliter/ > It works pretty well and can display a lot of other languages as well. > > -Josh > > > On 10/3/06, *Pierre Imbaud* <[EMAIL PROTECTED]

Re: [ANN] pylint 0.12.2 / astng 0.16.3

2006-11-23 Thread Colin J. Williams
Sylvain Thénault wrote: > Hi there ! > > I'm pleased to announce new bugs fix releases of pylint and astng. Most > bug discussed more or less recently on the python-projects mailing list > should be fixed by those releases, and astng inference capability has > been enhanced for some construction,

Python25.zip

2006-11-30 Thread Colin J. Williams
As part of the Python initialization, C:\Windows\System32\Python25.zip is set up in the path. I haven't seen any documentation on the use or purpose of the zip file. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python25.zip

2006-12-01 Thread Colin J. Williams
Dennis Lee Bieber wrote: > On Thu, 30 Nov 2006 18:14:11 -0500, "Colin J. Williams" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> As part of the Python initialization, C:\Windows\System32\Python25.zip >> is set up in the path. >

Re: len() and PEP 3000

2006-12-09 Thread Colin J. Williams
Giovanni Bajo wrote: > Thomas Guettler wrote: > >> I have read the FAQ to the len function: >> http://www.python.org/doc/faq/general/#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list > > Outdated. You want to read the new FAQ, here: > http://e

Re: len() and PEP 3000

2006-12-09 Thread Colin J. Williams
tac-tics wrote: >> __len__ is not very special and the >> property len eliminates the redundant parentheses. > > One might say the current syntax eliminates the redundant dot. > touché On the other hand, one can argue that, since len is intimately associated with an object, it's better treated

Re: Conditional iteration

2006-12-16 Thread Colin J. Williams
at wrote: > Dear Carl, > > Well, all I can say that for me as a user it would make sense... > > Curiosity: in what sense is it redundant? > All solution/workarounds I have seen so far involve creation of new lists > (subsets) adding to more processing/computation/memory usage. Redundant > suggest

Re: Class and instance question

2006-12-17 Thread Colin J. Williams
rzed wrote: > I'm confused (not for the first time). > > I create these classes: > > class T(object): > def __new__(self): > self.a = 1 > > class X(T): > def __init__(self): > self.a = 4 > > class Y: > def __init__(self): > self.a = 4 > > class Z(object): >

Re: Windows upgrade incomplete

2006-12-22 Thread Colin J. Williams
Pete Forman wrote: > I've a few versions of Python on my XP PC, most recently Python 2.5. > The file associations appear not to have been upgraded. Executing a > .py file turned out to still be using 2.3. > >> assoc .py > .py=Python.File > >> ftype Python.file > Python.file=D:\PROGRA~1\Python23\

<    1   2   3   4   5   >