what is the keyword "is" for?

2006-08-15 Thread daniel
I'm so confused by the keyword "is" and "==" equal sign, it seems they could be exchanged in some contexts, but not in others, what's the difference between them in terms of comparation? thanks... daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Mega Newbie Questions: Probably FAQs

2006-08-15 Thread Simon Forman
Zeph wrote: > Python > Pros: Free. Open source. Deep. Flexible. Rich community and third party > stuff. Well documented. > > Cons: Interpreted. > > Unknown: Secure (meaning not easily reverse engineered) code? Performance? Very recent thread on this subject: http://groups.google.ca/group/comp.lang

What would be the best way to run python client in the background

2006-08-15 Thread gel
Hi I have written a python client server app that keeps an eye on processes starting and ending on a client and makes decision on what to do based on information from the server end. I want to run the client end of the app more or less invisibly (no console) on the XP clients when ever a users log

Re: what is the keyword "is" for?

2006-08-15 Thread Kirk McDonald
daniel wrote: > I'm so confused by the keyword "is" and "==" equal sign, it seems they > could be exchanged in some contexts, but not in others, what's the > difference between them in terms of comparation? > > thanks... > > daniel > 'is' compares object identity. == compares values. >>> a

Newbie: calling the originating class ...

2006-08-15 Thread donkeyboy
This is probably very straightforwards to someone with experience, but I will try to explain my predicament: I'm trying to code a simulation, where you have a Simulation class that knows everything about the simulation, and in turn classes that the Simulation calls when it wants to make new instan

Re: Best IDE for Python

2006-08-15 Thread Bruce Who
Hi, sjdevnull I'm a vimmer too, and I wonder what plugins you are using. What you said sounds interesting. Could you tell us more about the plugins? "Object browser" is what I need most, but so far I've no idea what plugin can do this for me, :-( On 14 Aug 2006 15:02:13 -0700, [EMAIL PROTECTED] <

ReStructuredText

2006-08-15 Thread Cliff Wells
Started playing with docutils and don't understand why the following doesn't work: >>> from docutils.core import publish_parts >>> t = ''' ... ... 1. this is a test ... #. this is another line ... #. oh, screw it! ... ... ''' >>> publish_parts ( t, writer_name = 'html' ) [ 'body' ] u'1. this is a

Re: Best IDE for Python

2006-08-15 Thread Tyronem
Yep thanks all for your replies. and yes i meant free and open source software, left an s out :) Tryker wrote: > Gotta love PyScripter. Light, easy to use, free. > http://mmm-experts.com/Products.aspx?ProductID=4 > > [EMAIL PROTECTED] wrote: > > Hi All, What do you find the best IDE for creating we

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 09:35 +0200, Sybren Stuvel wrote: > Cliff Wells enlightened us with: > > Why doesn't the above turn out an enumerated list? > > You have to indent the list: > > >>> from docutils.core import publish_parts > >>> t = ''' > ... > ...1. this is a test > ...#. this is an

RE: What would be the best way to run python client in the background

2006-08-15 Thread Tim Golden
[gel] | I have written a python client server app [...] | I want to run the client end of the app more or less invisibly | (no console) on the XP clients when ever a users logs on. You say "when[]ever a user logs on" but does this app need to be run on a per-user basis? Or could it run all the

Re: what is the keyword "is" for?

2006-08-15 Thread daniel
many thanks to Sybren and Kirk for your helpful explanation. when I tried to check the stuff out, found sth interesting that if you define variables in a style like this: a = b = ['a', 'b'] changing one list affects the other, and they still refer to same object. in fact, seems all compound types

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 16:02 +0800, limodou wrote: > On 8/15/06, Cliff Wells <[EMAIL PROTECTED]> wrote: > > Thanks for the response. Must be a bug in my version: > > Which version of docutils you are using, in my computer is good. > > u'\nthis is a test\nthis is > another line\noh, screw it!\n\n'

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 00:56 -0700, Cliff Wells wrote: Ah, I got it. From the docs: (Auto-enumerated lists are new in Docutils 0.3.8.) and I've got 0.3.7 Damn. Thanks for the responses. Regards, Cliff -- -- http://mail.python.org/mailman/listinfo/python-list

how to deepcopy a slice object?

2006-08-15 Thread Alexandre Guimond
Hi all, i'm trying to deepcopy a slice object but i get the following error. Does anyone know a workaround? ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "licen

Making a multithread app that runs several instances of whatever the app did before

2006-08-15 Thread olbion
Hi I've aquired a program written in Python, and without much knowledge of the language I'm trying to make some changes to it. The original program starts, runs a certain process and then finishes. I want to adapt it so that, at a certain stage of the process, a new process is started from scratch

Re: what is the keyword "is" for?

2006-08-15 Thread Martin v. Löwis
daniel wrote: > when I tried to check the stuff out, found sth interesting that if you > define variables in a style like this: > a = b = ['a', 'b'] > changing one list affects the other, and they still refer to same > object. in fact, seems all compound types (dictionary for instance) > behave in

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 16:10 +0800, limodou wrote: > On 8/15/06, Cliff Wells <[EMAIL PROTECTED]> wrote: > > On Tue, 2006-08-15 at 16:02 +0800, limodou wrote: > > > On 8/15/06, Cliff Wells <[EMAIL PROTECTED]> wrote: > > > > Thanks for the response. Must be a bug in my version: > > > > > > Which vers

Re: sending mailing list with smtplib

2006-08-15 Thread 3KWA
Gabriel Genellina wrote: > > Specify "didn't work" at least... see > http://www.catb.org/~esr/faqs/smart-questions.html Ooops, didn't work explained (the worst is I bought and read ESR's book :() list.txt= email1 email2 email3 ... emailn email1 received from:xsbar.com to:email1 subject: [xsbar]

Re: ReStructuredText

2006-08-15 Thread limodou
> Yeah, right after you asked, I tried 0.4, but it failed with a > traceback. But my version works good. > I ended up installing 0.3.9 and it works fine (and didn't > require the list to be indented either, FWIW). Yeah. > > For anyone who cares, the traceback with 0.4 was: > > Python 2.4.2 (#1,

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-15 Thread zxo102
Bryan, Thanks for your note. Finally, I have made "one listener socket for all the connections" work plus Queue-communication between the threads in wxpython Gui and the threads for socket connections. Trying to make that twisted example code in this topic for "one listener socket-all the co

Re: what is the keyword "is" for?

2006-08-15 Thread daniel
Martin v. Löwis wrote: > daniel wrote: > > when I tried to check the stuff out, found sth interesting that if you > > define variables in a style like this: > > a = b = ['a', 'b'] > > changing one list affects the other, and they still refer to same > > object. in fact, seems all compound types (d

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-15 Thread zxo102
"That twisted example only accepts one client connection" if only one port is available. zxo102 写道: > Bryan, >Thanks for your note. Finally, I have made "one listener socket for > all the connections" work plus Queue-communication between the threads > in wxpython Gui and the threads for s

Re: hide python code !

2006-08-15 Thread Armin Steinhoff
Bayazee wrote: > hi > can we hide a python code ? > if i want to write a commercial software can i hide my source code from > users access ? > we can conver it to pyc but this file can decompiled ... so ...!! > do you have any idea about this ...? Use Pyrex in order to build C-Modules from the cri

Re: how to deepcopy a slice object?

2006-08-15 Thread Simon Forman
Alexandre Guimond wrote: > Hi all, > > i'm trying to deepcopy a slice object but i get the following error. > Does anyone know a workaround? > > ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on > Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] > on win32 > Type

Re: sending mailing list with smtplib

2006-08-15 Thread Steve Holden
3KWA wrote: > Gabriel Genellina wrote: > >>Specify "didn't work" at least... see >>http://www.catb.org/~esr/faqs/smart-questions.html > > > Ooops, didn't work explained (the worst is I bought and read ESR's book > :() > > list.txt= > email1 > email2 > email3 > > emailn > > email1 received

Re: TypeError: 'module' object is not callable (newby question)

2006-08-15 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Charles Russell wrote: > Another newby question: __name__ and __file__ appear to be > predefined variables. To look up their meaning in the manual, is there > some method less clumsy than grepping the whole collection of .html > source files? I can't find any comprehe

Re: how to deepcopy a slice object?

2006-08-15 Thread Alexandre Guimond
Here is my reason: I have an object that contrains a 2D regular grid (matrix). In this regular grid, I place points at regular intervals. In essence, i have something like (my code is obviously more complex, this is just to show what I want to do) obj.grid = numpy.zeros( ( 100, 100 ) ) obj.grid[

Re: what is the keyword "is" for?

2006-08-15 Thread Steve Holden
daniel wrote: > Martin v. Löwis wrote: [...] >>For some objects, "change the object" is impossible. If you have >> >>a = b = 3 >> >>then there is no way to change the object 3 to become 4 (say); >>integer objects are "immutable". So for these, to make a change, >>you really have to change the varia

Re: Newbie: calling the originating class ...

2006-08-15 Thread Steve Holden
donkeyboy wrote: > This is probably very straightforwards to someone with experience, but > I will try to explain my predicament: > > I'm trying to code a simulation, where you have a Simulation class that > knows everything about the simulation, and in turn classes that the > Simulation calls whe

Re: Making a multithread app that runs several instances of whatever the app did before

2006-08-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi > > I've aquired a program written in Python, and without much knowledge of > the language I'm trying to make some changes to it. The original > program starts, runs a certain process and then finishes. I want to > adapt it so that, at a certain stage of the process,

Re: yet another noob question

2006-08-15 Thread Jason Nordwick
I use reduce to also do indexing, hashing with upsert semantics of lists of key-value pairs, transitioning through a state table, etc... Somebody else pointed out to me how odd it is of Python to be ditching reduce when Guido van Rossum was hired by Google, and Google is literally built on map

Re: Newbie: calling the originating class ...

2006-08-15 Thread Diez B. Roggisch
donkeyboy wrote: > This is probably very straightforwards to someone with experience, but > I will try to explain my predicament: > > I'm trying to code a simulation, where you have a Simulation class that > knows everything about the simulation, and in turn classes that the > Simulation calls wh

Re: how to deepcopy a slice object?

2006-08-15 Thread Duncan Booth
Simon Forman wrote: > Why would you want to [deep]copy a slice object? I would guess the original poster actually wanted to copy a data structure which includes a slice object somewhere within it. That is a perfectly reasonable albeit somewhat unusual thing to want, however it doesn't work. Si

Re: Compiling wxPython app for Windows; Single EXE

2006-08-15 Thread Vincent Delporte
On Mon, 14 Aug 2006 17:46:11 -0500, Philippe Martin <[EMAIL PROTECTED]> wrote: >Yes there is a way to make one .exe/.msi for everything ... but it does >require purchasing a tool such as VC++. > >I have python + wxWindows + my stuff + many other libraries in one installer >(takes 120 Megs (sigh))

Re: yet another noob question

2006-08-15 Thread Steve Holden
Jason Nordwick wrote: > I use reduce to also do indexing, hashing with upsert semantics of lists of > key-value pairs, transitioning through a state table, etc... > > Somebody else pointed out to me how odd it is of Python to be ditching reduce > when Guido van Rossum was hired by Google, and Go

Re: yet another noob question

2006-08-15 Thread Jason Nordwick
That isn't what I meant. If there was a a point (and I'm not really sure that I'm even trying to make one), the point was that Google makes heavy use of reduce-like functionality, essentially implementing a distributed reduce across a cluster. From what I hear, they use a lot of Python and hired

dictionary update

2006-08-15 Thread Chris
I have a instance attribute self.xds and a local variable xds in the instance . Both are dictionaries. I understand that I can update self.xds with xds as follows: self.xds.update(xds) However I have many instance attributes, self.i, and local variables i. I'd like to be able to do this: for i

Re: TypeError: 'module' object is not callable (newby question)

2006-08-15 Thread Charles Russell
Charles Russell wrote: I haven't found the magic word to invoke a > .py script from the python prompt (like the command "source" in csh, > bash, tcl?) Seems to be execfile() -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'module' object is not callable (newby question)

2006-08-15 Thread Charles Russell
Marc 'BlackJack' Rintsch wrote: > Here's the index of the reference manual: > > http://docs.python.org/ref/genindex.html > Thanks. When I go up a level from there, I find a pointer to the index right at the bottom of the table of contents, which I had overlooked. -- http://mail.python.org/m

pickling or xml or other?

2006-08-15 Thread placid
Hi all, I have an application were i want the user to "configure" some settings which are variables within different classes. My question is should i just pickle out these variables to a file in some particular order then read it back. Or use xml to save the config values ? Which one scales bette

Re: pickling or xml or other?

2006-08-15 Thread Diez B. Roggisch
placid wrote: > Hi all, > > I have an application were i want the user to "configure" some settings > which are variables within different classes. > > My question is should i just pickle out these variables to a file in > some particular order then read it back. Or use xml to save the config >

Re: Basic Boost.Python Question

2006-08-15 Thread Hoop
Hi Neil, I have never heard of IronPython. Do you know if you can embedd the Python interpreter ? Thanks Jeff Neil Hodgson wrote: > Hoop: > > > I am starting on an application that will developed in VS2005, probably > > using C++/CLI. > > I haven't heard any reports of Boost.Python code being

Re: dictionary update

2006-08-15 Thread Sion Arrowsmith
Chris <[EMAIL PROTECTED]> wrote: >I have a instance attribute self.xds and a local variable xds in the >instance . Both are dictionaries. I understand that I can update >self.xds with xds as follows: self.xds.update(xds) > >However I have many instance attributes, self.i, and local variables i.

Beginner Textbook

2006-08-15 Thread M_M
Hi, I am looking for a simple text book to introduce 13 to 18 year olds to python programming. Suggestion? New to python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Textbook

2006-08-15 Thread Michiel Sikma
Introducing 13 year olds to a programming language? You're gonna have a hard time finding good literature for that. Even if you do, it's going to cost a lot of time to guide them. "Beginning Python: From Novice to Professional" by Magnus Lee Hetland might be a good choice. ISBN: 159059519X.

Re: hide python code !

2006-08-15 Thread Bayazee
Armin Steinhoff wrote: > Bayazee wrote: > > hi > > can we hide a python code ? > > if i want to write a commercial software can i hide my source code from > > users access ? > > we can conver it to pyc but this file can decompiled ... so ...!! > > do you have any idea about this ...? > > Use Pyrex

Re: Beginner Textbook

2006-08-15 Thread Daniel Dittmar
M_M wrote: > I am looking for a simple text book to introduce 13 to 18 year olds to > python programming. Suggestion? If they're Germans: Python für Kids http://www.amazon.de/gp/product/3826609514/028-9407382-2771748?v=glance&n=299956 or Python Programming for the Absolute Beginner http://www.am

Re: Beginner Textbook

2006-08-15 Thread M_M
Michiel Sikma wrote: > Introducing 13 year olds to a programming language? You're gonna have a > hard time finding good literature for that. Even if you do, it's going > to cost a lot of time to guide them. > > "Beginning Python: From Novice to Professional" by Magnus Lee Hetland > might be a g

Re: Beginner Textbook

2006-08-15 Thread Michiel Sikma
Op 15-aug-2006, om 15:16 heeft M_M het volgende geschreven: > Thanks - a very bright lot of 13 year olds- need the challenge! > -- > http://mail.python.org/mailman/listinfo/python-list I think that every 13 year old should be taught Python. It's an extremely intuitive language that can mean

Re: Beginner Textbook

2006-08-15 Thread hiaips
M_M wrote: > Michiel Sikma wrote: > > Introducing 13 year olds to a programming language? You're gonna have a > > hard time finding good literature for that. Even if you do, it's going > > to cost a lot of time to guide them. > > > > "Beginning Python: From Novice to Professional" by Magnus Lee He

Re: dictionary update

2006-08-15 Thread Steve Holden
Chris wrote: > I have a instance attribute self.xds and a local variable xds in the > instance . Both are dictionaries. I understand that I can update > self.xds with xds as follows: self.xds.update(xds) > > However I have many instance attributes, self.i, and local variables i. > I'd like to be

Re: hide python code !

2006-08-15 Thread Gerhard Fiedler
On 2006-08-15 05:40:31, Armin Steinhoff wrote: >> First Iranian Open Source Community : www.python.ir > > Interesting ... but you are not a member of this community. Right? You know how to read a thread, right? :) Gerhard -- http://mail.python.org/mailman/listinfo/python-list

Re: modifying __new__ of list subclass

2006-08-15 Thread Ken Schutte
Steven Bethard wrote: > > The __new__ method is for immutable types. So things like str and int > do their initialization in __new__. But for regular mutable types, you > should do your initialization in __init__:: > I see... So, is there a use for __new__ in mutable types? From my list-d

Re: Beginner Textbook

2006-08-15 Thread Tim Williams
On 15/08/06, M_M <[EMAIL PROTECTED]> wrote: > Hi, > > I am looking for a simple text book to introduce 13 to 18 year olds to > python programming. Suggestion? > You might consider "Learn to programme using Python" by Alan Gauld as a means to introduce both programming and python at the same time.

Re: Compiling wxPython app for Windows; Single EXE

2006-08-15 Thread GHUM
Daniel, I am using py2exe since more then 4 years, so I am rather biased. I read PyInstaller page and was positively impressed by the manual and all the good words. There is one major difference which will keep me with py2exe: with PyInstaller and single file there is: "When first started, it fi

Re: How to execute a file outside module's namespace?

2006-08-15 Thread Piet van Oostrum
> Slawomir Nowaczyk <[EMAIL PROTECTED]> (SN) wrote: >SN> Hello, >SN> Let's say I have a module "emacs", defining function eexecfile(file): >SN> def eexecfile(file): >SN> # do other stuff >SN> execfile(file,globals()) >SN> # do other stuff >SN> Now, assume I have file test.py cont

IDLE system wide settings

2006-08-15 Thread staham
Hi, Is it possible to change the settings for the IDLE program via either the command line or via environment variables? The things I would like to change is to choose UTF-8 and "Classic UNIX" keys. I understand that it's possible to edit the program, but I'd rather just set an environment variab

Re: hide python code !

2006-08-15 Thread Philippe Martin
Bayazee wrote: > > Armin Steinhoff wrote: >> Bayazee wrote: >> > hi >> > can we hide a python code ? >> > if i want to write a commercial software can i hide my source code from >> > users access ? >> > we can conver it to pyc but this file can decompiled ... so ...!! >> > do you have any idea ab

Re: what is the keyword "is" for?

2006-08-15 Thread Terry Reedy
"Sybren Stuvel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 'is' compares the object's addresses. It actually compares the objects' integer identifiers. That happens to be the linear memory address for CPython, but not necesarily so for other interpreters. tjr -- http:/

Re: pycrust xmlrpclib problem

2006-08-15 Thread Pat
Timothy Gee wrote: > Have do a lot of lab work making use of xmlrpclib and am quite > dependent on it. I just started working with pycrust under Linux RH9, > and wanted to use it as my standard python environment, however, when I > import xmlrpclib, I get a segmentation fault. Command line still wo

Reference Variables In Python Like Those In PHP

2006-08-15 Thread Chaos
Is It possible to have reference variables like in PHP ex. This would show 2 2 Is this available in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Best IDE for Python

2006-08-15 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Hi All, What do you find the best IDE for creating web applications in > Python is? Preferably FOS IDE. > > Cheers I like ActiveState's Komodo. It's heavyweight and not free ($30 for the personal edition) but it also supports Perl, Ruby, PHP and TCL. I started using i

Re: Reference Variables In Python Like Those In PHP

2006-08-15 Thread Terry Reedy
"Chaos" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is It possible to have reference variables like in PHP > $x = 1; > $y =& $x; > $y += 1; > echo $x; > echo "\n" > echo $y; > ?> > > This would show > 2 > 2 > Is this available in python? No, in the literal meaning of your ques

Re: Reference Variables In Python Like Those In PHP

2006-08-15 Thread Neil Cerutti
On 2006-08-15, Chaos <[EMAIL PROTECTED]> wrote: > Is It possible to have reference variables like in PHP > > ex. > > > $x = 1; > $y =& $x; > > $y += 1; > > echo $x; > echo "\n" > echo $y; > > ?> > > This would show > > 2 > 2 > > Is this available in python? If you store an item in a one-element li

Re: hide python code !

2006-08-15 Thread Alex Martelli
Gerhard Fiedler <[EMAIL PROTECTED]> wrote: > On 2006-08-14 20:48:45, Damjan wrote: > > > I think you increase your chances of Microsoft not even being in the same > > room with your software 100-fold if you release it under.. say GPL. > > ... and have the money to run a law suit? Patents, licens

Re: modifying __new__ of list subclass

2006-08-15 Thread Alex Martelli
Ken Schutte <[EMAIL PROTECTED]> wrote: > Steven Bethard wrote: > > > > The __new__ method is for immutable types. So things like str and int > > do their initialization in __new__. But for regular mutable types, you > > should do your initialization in __init__:: > > I see... So, is there a us

STAF(Software Testing Automation Framework) with STAX for running python test suites/cases

2006-08-15 Thread [EMAIL PROTECTED]
Hi everyone, I am researching GUI's that I can use for running my python test sctipts which will make reports and monitor the tests ect...(bringing my application away form the comand prompt) I believe the applications STAF and STAX at http://staf.sourceforge.net/index.php provide this functional

Re: Beginner Textbook

2006-08-15 Thread John Salerno
M_M wrote: > Hi, > > I am looking for a simple text book to introduce 13 to 18 year olds to > python programming. Suggestion? > > New to python. This might be good for your needs. It teaches the basics of computer science using Python: http://www.amazon.com/gp/product/1887902996/sr=8-1/qid=11

Re: Best IDE for Python

2006-08-15 Thread Keith Perkins
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: >> Hi All, What do you find the best IDE for creating web applications in >> Python is? Preferably FOS IDE. >> >> Cheers > > I like ActiveState's Komodo. It's heavyweight and not free ($30 for > the personal edition) but it also supports Perl, R

Re: hide python code !

2006-08-15 Thread Ben Sizer
Paul Boddie wrote: > Successful software businesses are not merely founded on the process of > having ideas and implementing them - they might also need to be > effective at delivering those ideas and going through the whole process > again and again. Writing a neat utility for Windows is not by it

Re: Best IDE for Python

2006-08-15 Thread [EMAIL PROTECTED]
I've had a similar experience and tried about everything. Personally - eclipse with PyDev has been the winner for me. I also still do a bunch of Java coding - so there is an added benefit of one tool across languages. The final thing I really like with eclipse is the svn plugins - making life ve

Re: Beginner Textbook

2006-08-15 Thread [EMAIL PROTECTED]
M_M wrote: > Hi, > > I am looking for a simple text book to introduce 13 to 18 year olds to > python programming. Suggestion? > > New to python. On the Python site is a list of tutorials on this page: http://wiki.python.org/moin/BeginnersGuide/NonProgrammers, towards the end of the page you'll fi

Re: Best IDE for Python

2006-08-15 Thread Andre Meyer
PyDev is really nice. I use it a lot and it works great.It's just a bit heavy and why should one need a Java IDE for Python development ;-)Another "issue" is the lack of integration with a UML tool (code generation and reverse engineering), though an ArgoUML plugin is in the making (not for eclipse

Re: modifying __new__ of list subclass

2006-08-15 Thread Steven Bethard
Ken Schutte wrote: > Steven Bethard wrote: >> >> The __new__ method is for immutable types. So things like str and int >> do their initialization in __new__. But for regular mutable types, >> you should do your initialization in __init__:: > > I see... So, is there a use for __new__ in mutable

Re: Best IDE for Python

2006-08-15 Thread [EMAIL PROTECTED]
Bruce Who wrote: > Hi, sjdevnull > > I'm a vimmer too, and I wonder what plugins you are using. What you > said sounds interesting. Could you tell us more about the plugins? > "Object browser" is what I need most, but so far I've no idea what > plugin can do this for me, :-( It's like a 15 minute

file object and eof

2006-08-15 Thread KraftDiner
I open a file in python by f = open('filename', mode='rb') how can I tell if I am at the end of file? f.eof() isn't implmented. How can I implement its functionallity? Thanks. B. -- http://mail.python.org/mailman/listinfo/python-list

Re: file object and eof

2006-08-15 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, KraftDiner wrote: > I open a file in python by > f = open('filename', mode='rb') > > how can I tell if I am at the end of file? > f.eof() isn't implmented. > > How can I implement its functionallity? Try to read something. If the empty string is returned you are at the

How to tell machines endianism.

2006-08-15 Thread KraftDiner
How can you tell if the host processor is a big or little endian machine? -- http://mail.python.org/mailman/listinfo/python-list

Re: recommended general-purpose string template packages?

2006-08-15 Thread vj
I use preppy from reportlab: http://www.reportlab.org/preppy.html It's one file, is fast and can be easily embedded in any application. Vineet -- http://mail.python.org/mailman/listinfo/python-list

Re: hide python code !

2006-08-15 Thread Paul Boddie
Ben Sizer wrote: > Paul Boddie wrote: > > Successful software businesses are not merely founded on the process of > > having ideas and implementing them - they might also need to be > > effective at delivering those ideas and going through the whole process > > again and again. Writing a neat utili

Re: file object and eof

2006-08-15 Thread Grant Edwards
On 2006-08-15, KraftDiner <[EMAIL PROTECTED]> wrote: > I open a file in python by > f = open('filename', mode='rb') > > how can I tell if I am at the end of file? I don't believe you can unless you try to read from the file. > f.eof() isn't implmented. > > How can I implement its functionallity?

Re: How to tell machines endianism.

2006-08-15 Thread Steve Holden
KraftDiner wrote: > How can you tell if the host processor is a big or little endian > machine? > One possible way is to use the struct module to encode an integer value in native and little-endian modes and see if the result comes out the same or different. regards Steve -- Steve Holden

Re: How to tell machines endianism.

2006-08-15 Thread Jean-Paul Calderone
On 15 Aug 2006 10:06:02 -0700, KraftDiner <[EMAIL PROTECTED]> wrote: >How can you tell if the host processor is a big or little endian >machine? > sys.byteorder Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: hide python code !

2006-08-15 Thread Gerhard Fiedler
On 2006-08-15 12:04:18, Alex Martelli wrote: > It just isn't worth Microsoft's while to take the public-relations hit > of such a fight: much cheaper for them to re-implement your ideas than > to copy your GPL'd code. Exactly. So by publishing the ideas as GPL code, the author presents them not o

idea on how to get/set nested python dictionary values

2006-08-15 Thread jojoba
hello! i am trying to come up with a simple way to access my values in my nested python dictionaries here is what i have so far, but i wanted to run it by the geniuses out there who might see any probems with this... here is an example: +++ def SetNewDataParam

Creating Charts in Excel with pyExcelerator.ExcelMagic

2006-08-15 Thread implicate_order
Greetings, I'm new to python and am in the process of writing a script to parse some CSV data, spread it across multiple Excel worksheets and then generate charts. I searched the internet to find some place where I could look up a HOWTO doc/recipe to do that using either pyExcelerator or win32com.

X windows and Python?

2006-08-15 Thread Paul Rubin
I'd like to program my Python script to put a string into the X windows cut buffer. Can anyone suggest the simplest way to do that? Maybe I can do it by putting up a Tkinter text widget, sticking the string into it, and selecting it (I'm checking the docs) but uggh. I'd prefer not to have to put a

Re: X windows and Python?

2006-08-15 Thread Paul Rubin
Paul Rubin writes: > I'd like to program my Python script to put a string into the X > windows cut buffer. Hmm, looks like I can use w.clipboard_append with an arbitrary tkinter widget, maybe without having to actually display anything. I'll try that. -- http://mail.py

Re: X windows and Python?

2006-08-15 Thread David Boddie
Paul Rubin wrote: > I'd like to program my Python script to put a string into the X > windows cut buffer. Can anyone suggest the simplest way to do that? > Maybe I can do it by putting up a Tkinter text widget, sticking the > string into it, and selecting it (I'm checking the docs) but uggh. > I'd

Re: X windows and Python?

2006-08-15 Thread Paul Rubin
Paul Rubin writes: > Hmm, looks like I can use w.clipboard_append with an arbitrary tkinter > widget, maybe without having to actually display anything. I'll try > that. Nope, that's some kind of internal Tk clipboard. Any other ideas, how to communicate with the X win

Re: X windows and Python?

2006-08-15 Thread David Boddie
The usual follow-up to "fix" Google's "formatting". Maybe this does what you need: http://python-xlib.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: X windows and Python?

2006-08-15 Thread skip
> "Paul" == Paul Rubin <"http://phr.cx"@NOSPAM.invalid> writes: Paul> I'd like to program my Python script to put a string into the X Paul> windows cut buffer. Can anyone suggest the simplest way to do Paul> that? Maybe there's some useful functionality exposed through the Python

Dr. Dobb's Python-URL! - weekly Python news and links (Aug 15)

2006-08-15 Thread Jack Diederich
QOTW: "Consider changing your business plan: write crappy software, charge heaps for support -- it's not a novel idea" - John Machin "To make it run fast, use psyco. To make it even faster, implement the compare function in C." - Raymond Hettinger A Perl convert gladly announces his convers

Re: file object and eof

2006-08-15 Thread KraftDiner
Grant Edwards wrote: > On 2006-08-15, KraftDiner <[EMAIL PROTECTED]> wrote: > > > I open a file in python by > > f = open('filename', mode='rb') > > > > how can I tell if I am at the end of file? > > I don't believe you can unless you try to read from the file. > > > f.eof() isn't implmented. > >

yEnc

2006-08-15 Thread Kairo Matthias
How can i encode with yEnc? -- http://mail.python.org/mailman/listinfo/python-list

Re: Reference Variables In Python Like Those In PHP

2006-08-15 Thread Luke Plant
Chaos wrote: > Is It possible to have reference variables like in PHP ... > Is this available in python? You should note that, to a nearest equivalent, all variables are reference variables in Python. The difference is in what assignment does - += in Python does an assignment of a new object f

Error with: pickle.dumps(numpy.float32)

2006-08-15 Thread Iljya
Hello, I need to pickle the type numpy.float32 but encounter an error when I try to do so. I am able to pickle the array itself, it is specifically the type that I cannot pickle. I am using: Numpy version: 0.9.4 Python version: 2.4.3 Windows XP Here is the code that reproduces the error: ___

trying to reach kevin smith, author of plastex

2006-08-15 Thread metaperl
Email to Kevin Smith regarding his plastex package failed. I hope he read this group. The tarball that he needs to reproduce the error is here: http://arc.livingcosmos.org/wolfram-fruit2/wolfram-fruit.tar.gz Hi, when attempting to type plastex wolfram-fruit.tex on the attached latex document, I go

Re: X windows and Python?

2006-08-15 Thread Grant Edwards
On 2006-08-15, Paul Rubin wrote: > I'd like to program my Python script to put a string into the > X windows cut buffer. Can anyone suggest the simplest way to > do that? There isn't a simple way to do that. The basic problem is that there's not really such a thing as "_the_ X windows cut bu

Re: X windows and Python?

2006-08-15 Thread Grant Edwards
On 2006-08-15, Grant Edwards <[EMAIL PROTECTED]> wrote: >> I'd like to program my Python script to put a string into the >> X windows cut buffer. Can anyone suggest the simplest way to >> do that? > > There isn't a simple way to do that. I forgot to mention, there are actually three different sel

  1   2   >