Re: Embedding python in C - newbie

2005-06-28 Thread Philippe C. Martin
Sorry, it is still not clear when I reread it: 1) I have a bunch of Python working modules 2) I need to compile "something" so external C applications can access 1) Thanks, Philippe Philippe C. Martin wrote: > Just to make sure i'm clear as I've been told about sw

Re: Embedding python in C

2005-06-28 Thread Philippe C. Martin
Thanks, I cannot get the demo to compile, but I joined their list. Thanks Philippe Chris Lambacher wrote: > pyrex can be used for embedding too. > http://www.freenet.org.nz/python/embeddingpyrex/ > > On 6/28/05, Philippe C. Martin <[EMAIL PROTECTED]> wrote: >> Actual

__new__, __init__ and pickle

2005-06-29 Thread Edward C. Jones
Suppose I want to define the class MyClass so I can create an instance by MyClass(arg0, arg1, kwarg0=None, kwarg1=0, reuse=None, save=None) If reuse is not None, it is the name of a pickle file. Unpickle the file to get the instance. If save is not None, it is a file name. Pickle the instanc

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
Linux: Eric3 All: Eclipe: my choice (might be tough to get into) Nick Mountford wrote: > Hi, > > Complete newb to Python and programming, looking for an open source > IDE to download. Any suggestions? > > Thanks, > > Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
oops: "eclipse" Philippe C. Martin wrote: > Linux: Eric3 > All: Eclipe: my choice (might be tough to get into) > > > > Nick Mountford wrote: > >> Hi, >> >> Complete newb to Python and programming, looking for an open source >> IDE t

Re:

2005-07-01 Thread Philippe C. Martin
Being a C programmer before a C++ I am not certain my opinon qualifies. Yet I have seen myself avoiding C++ contracts lately because I dread going back to that type of work: why use silex when you got a match ? Adriaan Renting wrote: > I'm not a very experienced Python programmer y

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-02 Thread Mike C. Fletcher
r) and BasicProperty packages, as well as in Traits (originally part of a 2D graphics package), and Zope's FieldProperty (and PEAK, though as always with PEAK, it's somewhat weird in there ;) ). All of those are largish systems (or used in largish systems), btw. Just my thoughts, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How to display Values of a file

2005-07-05 Thread Philippe C. Martin
at would allow me to view > paths of all installed files and registry values associated with that > file for example I enter the file C:\WINDOWS\iexplorer.exe and it gives > me reg value 1, reg value 2, folder 1, folder 2. > > This will eventually lead into running an application insta

adding a character to the last string element of a list

2005-07-05 Thread Philippe C. Martin
Hi, I have the following question: l = ['ABCDE','FGHI'] l[1:] #returns ['FGHI'] l[1:][0] #return 'FGHI' a = l[1:][0] + 'J' #a becomes 'FGHIJ' l[1:][0] += 'J' #NO ERROR BUT l[1:][0] == 'FGHI' What am I missing ? Thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: adding a character to the last string element of a list

2005-07-05 Thread Philippe C. Martin
Thanks, I though it was a reference (tough to implement I'm sure) Regards, Philippe Peter Hansen wrote: > Philippe C. Martin wrote: >> l = ['ABCDE','FGHI'] > > Okay so far... > >> l[1:] #returns ['FGHI'] > > Which is a _

RE: adding a character to the last string element of a list

2005-07-05 Thread Philippe C. Martin
I guess my slicing was wrong, l[-1] worked Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: adding a character to the last string element of a list

2005-07-06 Thread Philippe C. Martin
Thanks, Philippe Peter Hansen wrote: > Philippe C. Martin wrote: >> I guess my slicing was wrong, l[-1] worked > > Note that that's _not_ a slice, however, but a reference to the last > element in the list. > > You'd have to subclass list to be able to do

Re: I am a Java Programmer

2005-07-06 Thread Philippe C. Martin
I see you got many good/funny answers already. Test Python for two WE and you'll be able to help yourself very well ... I've been through an equivalent process. Regards, Philippe [EMAIL PROTECTED] wrote: > I am a java programmer and I want to learn Python Please help me. -- http://mail.py

Re: Lisp development with macros faster than Python development?..

2005-07-06 Thread Philippe C. Martin
Almost sounds like a racist comment - sorry if I misunderstood Antoon Pardon wrote: > Op 2005-07-06, Michele Simionato schreef <[EMAIL PROTECTED]>: >> Fuzzyman: >>> So Lisp is for really good programmers, and Python is for >>> mediocre programmers ? >> >> >> Python is *also* for mediocre p

Options to integrate Python modules into native windows applications

2005-07-07 Thread Philippe C. Martin
Hi, I am looking for the pros and cons as to how to integrate a Python module into a Windows native application. So far I have looked at 1) coding the C wrapper myself 2) using Pyrex 3) go for pywin32 and COM Thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Options to integrate Python modules into native windows applications

2005-07-07 Thread Philippe C. Martin
Thanks Larry, I want to: 1) Modify my code as little as possible 2) Please/reassure the lambda VB or VC++ oriented company Regards, Philippe Larry Bates wrote: > Other methods (services, sockets, pipes, etc.) > can also work well, but it depends on what you > want to do and how you wish to

RE: Thoughts on Guido's ITC audio interview

2005-07-07 Thread Philippe C. Martin
> For me, performance is the minor issue. Usability is the major issue. If > find Eclipse to be highly unusable, so I don't use it. I find it to be the best option out there -- http://mail.python.org/mailman/listinfo/python-list

Re: Options to integrate Python modules into native windows applications

2005-07-08 Thread Philippe C. Martin
Hi, Thanks for your answers, has anyone also used .net for Python ? Regards, Philipe Philippe C. Martin wrote: > Hi, > > I am looking for the pros and cons as to how to integrate a Python module > into a Windows native application. > > So far I have looked at > >

Re: Options to integrate Python modules into native windows applications

2005-07-08 Thread Philippe C. Martin
rver, and from VBscript. OK also. > > Plus, I had try to call my Python-server-COM, from C# : OK it's run. C# > can use Python. > > And, I had try to make, in Internet-Explorer, a page, with > Html+javascript, who call the Python-server-COM, and at the same time, > cont

pywin32 com server "cash" question

2005-07-12 Thread Philippe C. Martin
Hi, I just got the pywin32 "hello world" COM server to install and I did manage to use it from VB 6.0. However, there are some glitches I do not comprehend: 1) at one point I got a python runtime error telling me the "testcomserver" was not found - I got rid of that problem by deleteting the app

Re: pywin32 com server "cash" question

2005-07-12 Thread Philippe C. Martin
Sorry: "Cache", not "Cash" Philippe C. Martin wrote: > Hi, > > I just got the pywin32 "hello world" COM server to install and I did > manage to use it from VB 6.0. > > However, there are some glitches I do not comprehend: > > 1) at

Re: Frankenstring

2005-07-12 Thread Mike C. Fletcher
ver going to be *fast* compared to something coded in C and wrapped with Python. You are dealing with every single character as a Python object, so let's forget fast for the moment and do a straightforward implementation: class Franken( str ): frankenIndex = 0 def __iter__( self ):

Re: What is your favorite Python web framework?

2005-07-17 Thread Philippe C. Martin
http://cheetahtemplate.org/ Admin wrote: > On Sun, 17 Jul 2005 19:15:49 -0300, Sybren Stuvel > <[EMAIL PROTECTED]> wrote: > >> http://www.unrealtower.org/mycheetah > > "Error 404 while looking up your page AND when looking for a suitable 404 > page. Sorry! > No such file /var/www/www.unrealt

returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
Hi, Is it possible ? ex: return ['1','2'] If so which type should I use in VB ? dim res as ??? Set testObj = CreateObject("") res = testObj.AMethodThatReturnsAListOfStrings() Thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
Sorry, it was in the book: Variant ! Regards; Philippe Philippe C. Martin wrote: > Hi, > > Is it possible ? > > ex: return ['1','2'] > > If so which type should I use in VB ? > > dim res as ??? &

Re: returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
7;instance' can not be converted to a COM VARIANT" Is there a way out ? Thanks, Philippe Philippe C. Martin wrote: > Hi, > > Is it possible ? > > ex: return ['1','2'] > > If so which type should I use in VB ? > >

Re: returning list of strings from Python COM to Visual basic 6

2005-07-21 Thread Philippe C. Martin
L PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of > > Philippe C. Martin > > Sent: Thursday, July 21, 2005 1:42 AM > > To: python-list@python.org > > Subject: Re: returning list of strings from Python COM to > > Visual basic 6 > > > > > > I ca

Re: returning list of strings from Python COM to Visual basic 6

2005-07-21 Thread Philippe C. Martin
I guess that also means (which makes sense) that the returned object has to be registered as a COM object. However, in my case, I just needed that object to pass it to yet another object, I did not need to use it from VB Regards, Philippe Philippe C. Martin wrote: > Thanks a bu

Re: Fire event when variable is Set/Get

2005-07-24 Thread Mike C. Fletcher
Varghjärta wrote: ... But there is something that keeps bugging me, and that keeps me from embracing Python even more as a serious alternative to C#(for me). In C# I make heavy use of Get & Set, mainly to fire an event that some property has changed so that one can act on that _if one w

Re: Selection, picking with PyOpenGL?

2005-07-30 Thread Mike C. Fletcher
nameStack and a registered set of name:node values (self.selectable). It will use those to populate the event objects that show up in the OpenGLContext mouse-event-handling APIs. HTH, Mike -- Mike C. Fletcher Designer, VR Plumber, Co

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread c d saunter
/DlPortIO.htm ctypes: http://starship.python.net/crew/theller/ctypes/ Note that DLPortIO is not a Python thing, it's a generic Windows .dll with C and VB examples, and needs installing, so it can't be packaged with py2exe. I'd guess this is the same for other parallel port acces

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread c d saunter
em in Basic. These days it's almost impossible without special kit and lots of know how. Heck, the old BBC Mirco had raw IO capabilites as fast as an IBM parallel port, and more flexible to boot. Progress. A real pain for r&d types. --- cds c d saunter ([EMAIL PROTECTED]) wrote: :

Re: Metaclasses and class variables

2005-08-04 Thread Mike C. Fletcher
s, name, bases, dictionary ): dictionary[ 'classvar' ] = cls.newClassVar[:] del cls.newClassVar[:] return super( meta, cls ).__new__( cls, name, bases, dictionary ) __metaclass__ = meta classvar = meta.newClassVar or something along those lines... Um, ick, but HTH, Mi

Re: Decline and fall of scripting languages ?

2005-08-07 Thread c d saunter
Kay Schluehr ([EMAIL PROTECTED]) wrote: : No good news for scripting-language fans: : http://www.phpmag.net/itr/news/psecom,id,23284,nodeid,113.html Just as well I ditched a scripting language for Python then... cds -- http://mail.python.org/mailman/listinfo/python-list

Re: PyOpenGL

2005-08-10 Thread Mike C. Fletcher
s between points. If it's a regular x,y grid, you can readily construct the polygons, if not, you get into something a little more fuzzy. Good luck, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

How to find Python path in Visual C++ install wizard

2005-08-13 Thread Philippe C. Martin
Hi, I realize this is not really a Python question but ... I am trying to setup an .msi for my software (Python code (.pyc) + drivers) to make installation easier for Windows users. I am using the installer that comes with V. C++ 7.1. I would like to find the way to make sure Python is

Re: How to find Python path in Visual C++ install wizard

2005-08-13 Thread Philippe C. Martin
Thanks you all. As my software has python "executables" and libraries + c++ libs, the HKEY_LOCAL should be myt way out. Best regards, Philippe Philippe C. Martin wrote: > Hi, > > I realize this is not really a Python question but ... > > I am trying to setu

Re: Decorator and Metaclasses Documentation

2005-08-21 Thread Mike C. Fletcher
r.com/programming/ Though the don't go into extreme detail on decorators (they are basically syntactic sugar for a particular type of descriptor). HTH, Mike -- ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com htt

Re: Decorator and Metaclasses Documentation

2005-08-22 Thread Mike C. Fletcher
bruno modulix wrote: >Mike C. Fletcher wrote: >(snip) > > >>Though the don't go into extreme detail on decorators (they are >>basically syntactic sugar for a particular type of descriptor). >> >> >> >Err... Could you elaborate on this ? Dec

Re: python image thumbnail generator?

2005-08-27 Thread Mike C. Fletcher
* generate images for sources that don't yet have (or are newer than) their thumbnail you should be fine. >(4) Am I talking about re inventing the wheel? > > Probably. ZPhotoSlides (a Zope product) provides thumnailing, slideshows and the like, probably closer to what you'd want fo

Re: Pointers and ctypes

2005-08-29 Thread Mike C. Fletcher
e version of ctypes in CVS HEAD will allow you to pass in a c_ulong where the argtype is ctypes.POINTER(c_ulong). Have fun, Mike -- ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: File parser

2005-08-30 Thread Mike C. Fletcher
tried various parsing tools and EBNF grammars but VB6 >isn't really an EBNF-esque syntax in all cases, so I needed something >else. > ... You may find this project interesting to play with: http://vb2py.sourceforge.net/index.html Have fun, Mike -- ____

Re: Has anybody tried to make a navigation like Google?

2005-09-05 Thread Mike C. Fletcher
JOIN voip.voipaccount USING (voipaccount_id) %(wheres)s %(orders)s %(limits)s """) The UI then offers the user the ability to increase offset (page forward), decrease offset (page backward), and re-sort (change the ordering fields). You disable the paging if you've reached either end of the record-set (offset<0 offset >= total-1), obviously. Anyway, hope that helps, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

which reg values modified my python installer under windows

2005-09-06 Thread Philippe C. Martin
Hi, I am looking for the reg path that is modified/created by the pyton installer to associate *.pyc with python.exe as I wish to associate *.pyc with pythonw.exe Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

which reg values modified my python installer under windows

2005-09-06 Thread Philippe C. Martin
Hi, I am looking for the reg path that is modified/created by the pyton installer to associate *.pyc with python.exe as I wish to associate *.pyc with pythonw.exe Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: which reg values modified my python installer under windows

2005-09-06 Thread Philippe C. Martin
Keir, I forgot to mention that I want to do it automatically from my application's installer. Regards, Philippe keirr wrote: > Philippe, > > You wrote: I wish to associate *.pyc with pythonw.exe > > is there some reason why Tools->Folder Options->File Types (from a > Windows Explorer me

Re: which reg values modified my python installer under windows

2005-09-06 Thread Philippe C. Martin
Yes Keir, Thanks a lot. Regards; Philippe keirr wrote: > Philippe, > > Windows file associations are in > HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts > > Hope that helps you. > > All the best, > > Keir. -- http://mail.python.org/mailman/listinfo/python

ANNOUNCE: twill 0.7.2

2005-09-11 Thread C. Titus Brown
ANNOUNCING twill v0.7.2. twill is a simple Web scripting language built on top of Python and John J. Lee's 'mechanize'. It's designed for automated testing of Web sites, but it should prove useful for anybody who needs to interact with Web sites (especially those using logins and cookies) on the

Re: How to protect Python source from modification

2005-09-12 Thread Philippe C. Martin
Hi, Why not just releasing the *.pyc ? Regards, Philippe Frank Millman wrote: > Hi all > > I am writing a multi-user accounting/business system. Data is stored in > a database (PostgreSQL on Linux, SQL Server on Windows). I have written > a Python program to run on the client, which uses w

Re: improvements for the logging package

2005-09-13 Thread Mike C. Fletcher
priate if we're worried about emulation by users. Anyway, I realise Skip probably was using "in Py3K" in the "some unimaginably far-off time" sense, but just in case he wasn't I felt I should pipe up... Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: pickle/marshal internal format 'life expectancy'/backward compatibility

2005-02-06 Thread Philippe C. Martin
ilippe On Sun, 06 Feb 2005 02:20:34 -0500, Adam DePrince wrote: > On Sat, 2005-02-05 at 17:04, Tim Peters wrote: >> [Philippe C. Martin] >> > I am looking into using the pickle format to store object/complex data >> > structures into a smart card as it would make

socket question

2005-02-07 Thread Philippe C. Martin
ss that I can ping but has no name. How can I do that ? Regards, Philippe -- *** Philippe C. Martin SnakeCard LLC www.snakecard.com *** -- http://mail.python.org/mailman/listinfo/python-list

Re: socket question

2005-02-07 Thread Philippe C. Martin
Thanks you! that did it. PS: the 'wrong' info I got seems to be in the official howtos http://www.amk.ca/python/howto/sockets/ Regards, Philippe On Mon, 07 Feb 2005 18:23:28 +0100, Diez B. Roggisch wrote: >> A couple things to notice: we used socket.gethostname() so that the >> socket woul

Re: socket question

2005-02-07 Thread Philippe C. Martin
Yes it was. Regards, Philippe On Mon, 07 Feb 2005 21:30:28 +, Steve Horsley wrote: > Philippe C. Martin wrote: >> Thanks you! that did it. >> > > That makes me wonder what socket.gethostname() was returning. > It wasn't 'localhost', was it?

Re: socket question

2005-02-07 Thread Philippe C. Martin
Thanks, it was a bind problem: socket.gethostname() returns 'localhost' where '' is was was needed. Regards, Philippe On Mon, 07 Feb 2005 11:02:13 -0800, Kartic wrote: > > Philippe C. Martin wrote: >> >> My problem is that I cannot connect to my serv

broke tkinter

2005-02-08 Thread Philippe C. Martin
Any clue! Regards, Philippe -- ******* Philippe C. Martin SnakeCard LLC www.snakecard.com *** -- http://mail.python.org/mailman/listinfo/python-list

Re: broke tkinter

2005-02-08 Thread Philippe C. Martin
I'll check, thanks. Philippe On Tue, 08 Feb 2005 18:03:11 +, wes weston wrote: > Philippe C. Martin wrote: >> Hi, >> >> I decided to clean my system and rebuild python from scratch. >> >> I downloaded tk8.4.9, tcl8.4.9 and Python2-4.tar.bz2

RE: Python and version control

2005-02-09 Thread Johann C. Rocholl
Robert Brewer wrote: > Peter Hansen wrote: > > Carl wrote: > > > What is the ultimate version control tool for Python if you > > > are working in a Windows environment? > > > > I never liked coupling the two together like that. Instead > > I use tools like TortoiseCVS or (now) TortoiseSVN with

Re: That horrible regexp idiom

2005-02-10 Thread Johann C. Rocholl
Hi, > import re > foo_pattern = re.compile('foo') > > '>>> m = foo_pattern.search(subject) > '>>> if m: > '>>>pass > '>>> else: > '>>>pass I agree that is horrible. This is one of my favorite problems with python syntax. > but it occured to me today, that it is possible to do it in pyth

dos box appears when clicking .pyc

2005-02-12 Thread Philippe C. Martin
Hi, For a few months now, I have been used .pyc script under XP without getting the "DOS" box. I just re-installed the scripts on another XP box and am now getting the DOS box ! Something to do with the registry ? Regards, Philippe -- *** Philippe

Re: 64 bit Python

2005-02-14 Thread Mike C. Fletcher
be problems with creating an individual string of multiple GB as well, for the same reason. Just an idea, Mike ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com

Re: Probably over my head... Trying to get Font Names

2005-02-17 Thread Mike C. Fletcher
ppreciated. S ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com PyCon is coming... -- http://mail.python.org/mailman/listinfo/python-list

Re: 3d graphics

2005-02-18 Thread Mike C. Fletcher
ts for developers to build applications, they generally let you load and work with objects readily, but they aren't trying to provide "jumping, shooting and exploding" features out-of-the-box. Then there are the full (normally C++) game engines with Python wrappers, likely a s

Re: Probably over my head... Trying to get Font Names

2005-02-18 Thread Mike C. Fletcher
HTH, Mike ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com PyCon is coming... -- http://mail.python.org/mailman/listinfo/python-list

Re: Probably over my head... Trying to get Font Names

2005-02-18 Thread Mike C. Fletcher
f you then find problems with it not being able to find Numeric, install the Numpy release. HTH, Mike ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com PyCon is co

could that be a mutable object issue ?

2005-02-19 Thread Philippe C. Martin
m_rw.books, I see my 'appends' in there, yet the pickled object does not change. Any clue ? Thanks Philippe -- ******* Philippe C. Martin SnakeCard LLC www.snakecard.com *** -- http://mail.python.org/mailman/listinfo/python-list

Re: could that be a mutable object issue ?

2005-02-19 Thread Philippe C. Martin
Yes, and that is my initial problem: I seem to write correctly that 'pickle string' to a device, by when I read it back, the appended information is gone. On Sat, 19 Feb 2005 19:13:58 +0100, Fredrik Lundh wrote: > Philippe C. Martin wrote: > >> print 'LEN OF

Re: could that be a mutable object issue ?

2005-02-19 Thread Philippe C. Martin
You are correct and I still don't know Python (sigh). Thanks Philippe On Sat, 19 Feb 2005 15:51:18 -0500, Kent Johnson wrote: > Philippe C. Martin wrote: >> If I do this: >> >> >> >> print 'LEN OF BOOK BEFORE APPEND: ', len(pickle.dumps(se

Re: Execute a list

2005-02-22 Thread Swaroop C H
Groleo Marius wrote: How can i execute a string in python? How can I execute the code that "s" keeps inside, considering that the code is correct? Use the exec statement : `exec s` Details at http://www.python.org/doc/ref/exec.html Regards, -- Swaroop C H Blog: http://www.swaroopch.info

HTMLgen maintenance.

2005-02-22 Thread C. Titus Brown
Hi all, I spent a little bit of time today working on Robin Friedrich's HTMLgen[0], and made it work more like a modern Python package, with a Python package directory & distutils-based setup.py. I wanted to pass these things on to Robin, but his e-mail address @pythonpros doesn't work any mor

Re: Hey, How Do I Distribute my New Completed Python Project?

2005-02-28 Thread Swaroop C H
with very little overhead for build/release/install mechanics." Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: yield_all needed in Python

2005-03-01 Thread Mike C. Fletcher
ppens with: [ for yield from foogen1(arg3) ] would then have to be defined... that might make it too complex an change. Oh well. Have fun all, Mike ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com

RE: urllib (and urllib2) read all data from page on open()?

2005-03-14 Thread Swaroop C H
>>> data2 = r2.read() >>> conn.close() As far as I can understand, you can read() data only when you want to. Caveat: There's a warning that says "This module defines classes which implement the client side of the HTTP and HTTPS protocols. It is normal

Re: yum repository

2005-03-14 Thread Swaroop C H
--- "Donald L. Dietmeyer" <[EMAIL PROTECTED]> wrote: > What yum repository do you use to pick up > python rpms? Search for 'Yum' at: http://www.python.org/2.4/rpms.html Cheers, Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info --

Re: Python info

2005-03-14 Thread Swaroop C H
However, I don't know how up-to-date the information is. HTH, Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: variable arguments question

2005-03-14 Thread Swaroop C H
'->', value ... >>> foo(a=1,b=2) a -> 1 b -> 2 Hope this makes some sense, Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: python version anachronism

2005-03-15 Thread Swaroop C H
--- Xah Lee <[EMAIL PROTECTED]> wrote: > so, python 2.3.5 is released about 2 months later than 2.4?? As far as I understand, 2.3.5 is a maintenance release in the 2.3 branch. It is independent of the 2.4 branch. Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpy

Re: Jython Phone Interview Advice

2005-03-15 Thread c d saunter
George Jempty ([EMAIL PROTECTED]) wrote: : I'm undergoing a phone interview for a Jython job today. Anybody have : practical advice for me? I haven't worked with Python in years, but I : have been working with Java in the meantime (resume at : http://scriptify.com/george_jempty_resume.pdf). I've

Re: compiled open source Windows lisp (was Re: Python becoming less Lisp-like)

2005-03-15 Thread Christopher C. Stacy
"Brandon J. Van Every" <[EMAIL PROTECTED]> writes: > Last I looked, 2 years ago?, there were no compiled, open source > lisps that ran on Windows. Has this changed? GCL (formerly known as KCL and ACL) has been around since 1984, and has been available on Windows since 2000. ECL (another KCL deri

Re: Python becoming less Lisp-like

2005-03-15 Thread Mike C. Fletcher
to customize the core behavior of an object (for instance to change how attribute traversal was handled) to write C extensions. And then there was the strange exception for attribute access for functions, but that was so natural and practical it seldom bit anyone who wasn't doing meta-prog

Re: Database connection caching

2005-03-18 Thread Swaroop C H
objects with a single connection object? You can have any number of cursor objects and can run with a single connection object A good introduction is at http://www.amk.ca/python/writing/DB-API.html Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -

Re: Is Python like VB?

2005-03-18 Thread Swaroop C H
n even convert existing VB > apps as well. It won a Jolt Productivity award this year (along with > Python 2.4). I have heard Gambas to be a very good option too: http://gambas.sourceforge.net/ -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax incorrect with regex

2005-03-18 Thread Swaroop C H
os_parser = re.compile (r""" (\s+)=\"(\s+)\"$ """,re.VERBOS) > ^ > SyntaxError: invalid syntax Please check the indentation you have used. Also, it should be re.VERBOSE (note the ending 'e') Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple XML-to-Python conversion

2005-03-18 Thread Swaroop C H
input.filename > root.output.filename You should be using XPath (4suite has it) to get the parts that you want. A really quick intro is at http://simon.incutio.com/archive/2003/10/21/xpathRocks Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: survey of modules to be added to stdlib

2005-03-18 Thread Swaroop C H
nd to work on the same kind of project along with ChiPy (Chicago Pythonistas) and of course, the distutils-sig and catalog-sig. For details, please see http://www.swaroopch.info/archives/2005/03/13/uraga-the-cpan-for-python/ We welcome you to help us in this endeavour. Regards, -- Swaroop C H B

Re: wxPython vs. pyQt

2005-03-18 Thread Swaroop C H
ded! The announcement is at http://www.trolltech.com/newsroom/announcements/0192.html I hope the PyQt guys are on top of this ;) Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous copy to multiple media

2005-03-20 Thread Swaroop C H
en't tried it out but it should work. [1]: http://unixhelp.ed.ac.uk/CGI/man-cgi?tee HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython: how to update a panel content/layout according to a variable content

2004-11-29 Thread Lo?c Mah?
Thanks for the answer. I will try the method you talked about. For the moment, I am creating a new sizer and new panel and call the SetSizer(...) and SetAutoLayout(...) but this is not satisfying me. Loïc "F. GEIGER" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > wxWindow h

Re: python API wrapper for C++ API

2004-11-30 Thread Philippe C. Martin
Hi, How about first using a C to C++ wrapper: *** #ifdef __cplusplus extern "C" { /* I really dislike this - iwj. */ #endif void * init (void) { return new myobj() } 3D_fun1 (void * p_obj) { My_OBJ * l_obj

Re: pdb with emacs

2004-11-30 Thread Heike C. Zimmerer
"Yuri Shtil" <[EMAIL PROTECTED]> writes: > I am trying to learn python and use the gud/pdb from emacs. The > functionality that I am used to under gud/gdb and gud/perldb is missing, or > I don't know how to make it work. > Specifically: when I start pdb on a script file, the source does not show i

Regexp question

2004-12-01 Thread Philippe C. Martin
_not_ between brackets or parenthesis i.e; 'xx xx xx xx xx xx xx' knowing that the intial string could be: [yy yy yy yy yy yy yy] xx xx xx xx xx xx xx (zz zz zz zz) Any clue ? Regards, Philippe -- * Philippe C. Martin SnakeCard LLC www.snakecard

Re: How did you learn Python?

2004-12-03 Thread Philippe C. Martin
I used those: http://diveintopython.org/ http://www.fzu.cz/texty/ruzne/python/ http://www.pythonware.com/library/tkinter/introduction/ Then O'Reilly 'Programming Python' Regards, Philippe -- * Philippe C. Martin SnakeCard LLC ww

byte code generated under linux ==> bad magic number under windows

2004-12-06 Thread Philippe C. Martin
wrong ? are the pyc plateform dependant ? and if so must I generate one version for each version of Linux, windows .. ? Regards, Philippe -- ***** Philippe C. Martin SnakeCard LLC www.snakecard.com * -- http://mail.python.org/mailman/listinfo/python-list

Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Philippe C. Martin
like the file not to be loaded on import or class instantiation, but only once (on first import or class instantiation). Currently I have the loading code in the class __init__. Is there a clean way to do this (I'd like to avoid global)? Regards, Philippe -- *

Re: Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Philippe C. Martin
Thank you all for your answers, I guess I would not have made Python 101:-) As far as I was concerned, importing a module twice would have resulted in loading the file twice. Regards, Philippe -- * Philippe C. Martin SnakeCard LLC www.snakecard.com

Re: 3D plotting library / OpenGL

2004-12-07 Thread Mike C. Fletcher
hoping for was a toolkit that worked cross-platform and assumed OpenGL is available, leaving me to pass it the OpenGL context and a few other essentials, or something that made a scene graph that I could render as I wish. ... ____ Mike C. Fletcher Des

Re: Loading a file only once into an object and being able to access it from other modules - still have a problem

2004-12-09 Thread Philippe C. Martin
816, when I see 'LOADING' then I also see a fully populated dictionary. But when I see (second or more time) 'DICT ALREADY LOADED', then my dict is emtpy What else am I not understanding ? Regards, Philippe -- * Philippe C. Martin SnakeCard LLC www.

Re: Loading a file only once into an object and being able to access it from other modules - still have a problem

2004-12-09 Thread Philippe C. Martin
n attribute in *only a single instance*. Sorry for the tabs ! Indeed I had not grasped the concept has from my many years in C++, I would have had to use a private constructor + a static create method to keep users from instanciating more than one object. You are correct, my

Re: [Newby] Problem with compilation.

2004-12-09 Thread Mike C. Fletcher
platforms. ... ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Mike C. Fletcher
Jody Burns wrote (with Peter): See Mike C. Fletcher's post and http://www.vrplumber.com/programming/mstoolkit/ for a way to do it very easily (you have to be able to use the GNU patch tool, but that's not difficult at all). --Jody ... not been able to get into hacking on the core

<    1   2   3   4   5   6   7   8   9   10   >