How to decompile an exe file compiled by py2exe?

2005-09-23 Thread Leo Jay
Dear All, I lost my source code because of my incaution. so anyone can tell me how to decompile the exe file compiled by py2exe? Thanks. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem subclassing (Newbie)

2005-09-23 Thread Laszlo Zsolt Nagy
>Then I have an instance of class Button called obj. My probelm is that >the test isinstance(obj, Widget) resturns False! > You must have a typo somewhere. Please try this little test program. >>> class Widget(object): ... pass ... >>> class Button(Widget): ... pass ... >>> b = B

Re: Config parser module

2005-09-23 Thread qqcq6s59
Thanks a lot for Dale and Larry, I have not tried the OOP way yet like you mentioned, I will try to create a parser soon, maybe I will post it in the net after that, it may be useful to others too, Thanks again -Jiro -- http://mail.python.org/mailman/listinfo/python-list

Problem subclassing (Newbie)

2005-09-23 Thread Shahla Almasri
Hi, I'm new to Python, so forgive me if I'm missing something obvious here. All what I am trying to do is create a hirarachy of objects (i.e. one that inherits from another). But for somereason my subclasses are not recognizing their superclass! I have the following: class Widget(object): de

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Collin Winter
On 9/23/05, Peter Hansen <[EMAIL PROTECTED]> wrote: > My point, which might not have been clear, is that users are *already* > told that they shouldn't ever touch __anything__ without understanding > what it is, which is more general advice than and therefore encompasses > the __builtins__ issue.

RE: Re: A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals...

2005-09-23 Thread your
You consider it spam because you don't agree with the political message or the idea of people working for a better world. However, if it had been a subject which was "acceptable" to your standards as a self-made moderator, then everything would have been wonderful in Kansas. Click your heels p

Re: Can I compile Python for the web?

2005-09-23 Thread Terry Hancock
On Friday 23 September 2005 07:53 pm, Peter Hansen wrote: > What you appear to be asking is if it's possible to create *native > machine code* from Python source in order to achieve a significant > increase in performance. The short answer is "no, not really", and > longer answers include "yes,

Re: Accessing class variable at class creation time

2005-09-23 Thread Benji York
Carlos wrote: > Hi! > > class A: > X = 2 > def F(): > print A.X > F() > > The above fails because the name A is not > yet at global scope when the reference A.X > is reached. Is there any way to refer to A.X > without making explicit use of the name 'A'? How about this: >>> class A:

Re: Bluetooth

2005-09-23 Thread Tor Erik S�nvisen
Okei I've been doing some research since my first post and now I'm really confused. I'm programming in xp, and found some c++ code out of this world that supposidly should list all available services to a given bluetooth device. This code however where only working with certain bluetooth-de

Re: Productivity and economics at software development

2005-09-23 Thread Peter Hansen
Paul Rubin wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: >>If you focus on IDEs, your research will have pre-selected only >>certain kinds of programmers and teams, and will not necessarily >>include the best ones. > > It wouldn't have occurred to me to say that Ken Iverson (APL), Peter > Deut

Re: Can I compile Python for the web?

2005-09-23 Thread Peter Hansen
Charles wrote: > I'm doing some investigations on the Python language. > I'd like to know if it is possible to compile Python code made for the > web (an online database for instance), and to run it using mod_python. > How is it possible? I think it would be very fast to execute the code > if

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Peter Hansen
Collin Winter wrote: > The difference between __builtins__ and the other __*__ names is that > while the others shouldn't be used without understanding their > purpose, the consensus on __builtins__ seems to be that it shouldn't > be used at all. > > ... at the very > least, users should be expli

Re: Productivity and economics at software development

2005-09-23 Thread Paul Rubin
Peter Hansen <[EMAIL PROTECTED]> writes: > If you focus on IDEs, your research will have pre-selected only > certain kinds of programmers and teams, and will not necessarily > include the best ones. It wouldn't have occurred to me to say that Ken Iverson (APL), Peter Deutsch (PARC Smalltalk), or D

Can I compile Python for the web?

2005-09-23 Thread Charles
Dear sirs, I'm doing some investigations on the Python language. I'd like to know if it is possible to compile Python code made for the web (an online database for instance), and to run it using mod_python. How is it possible? I think it would be very fast to execute the code if it were comp

Re: Wrapping classes

2005-09-23 Thread Michael Spencer
Jeremy Sanders wrote: > Colin J. Williams wrote: > > >>Could you not have functions a and b each of which returns a NumArray >>instance? >> >>Your expression would then be something like a(..)+2*b(..). > > > The user enters the expression (yes - I'm aware of the possible security > issues), as

Re: parsing a date

2005-09-23 Thread Peter
Kalle Anke wrote: >I want to parse a date string, for example '2005-09-23', and since I haven't >done this before I would like to ask what is the best way to do it. > >I've looked around and the dateutil seems to be what most people use, but >unfortunately I only get an empty file when I try to

Re: Help installing Python 2.3 on Win2K

2005-09-23 Thread Tim Williams (gmail)
On 23/09/05, D.S. Hein <[EMAIL PROTECTED]> wrote: > I have tried various ways to set PYTHONPATH with the various directories > where I have python programs (i.e. xx.py) but no matter how I set > PYTHONPATH I keep getting a message that python can't open the python > file. If I try to specify t

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Collin Winter
On 9/23/05, Peter Hansen <[EMAIL PROTECTED]> wrote: > User are clearly told in various places that names with leading and > trailing double underscores are *special*, and at least by implication > they are not to be used without a good understanding of what they are. > You certainly shouldn't have

Re: Help installing Python 2.3 on Win2K

2005-09-23 Thread [EMAIL PROTECTED]
D.S. Hein wrote: > I have installed python 2.3 on my Windows 2K laptop and I can run python > from the command prompt. > > I have tried various ways to set PYTHONPATH with the various directories > where I have python programs (i.e. xx.py) but no matter how I set > PYTHONPATH I keep getting a

Re: CRC16

2005-09-23 Thread Raymond L. Buvel
Tuvas wrote: > Anyone know a module that does CRC16 for Python? I have an aplication > that I need to run it, and am not having alot of sucess. I have a > program in C that uses a CRC16 according to CCITT standards, but need > to get a program that tests it with python as well. Thanks! > Try this

Help installing Python 2.3 on Win2K

2005-09-23 Thread D.S. Hein
I have installed python 2.3 on my Windows 2K laptop and I can run python from the command prompt. I have tried various ways to set PYTHONPATH with the various directories where I have python programs (i.e. xx.py) but no matter how I set PYTHONPATH I keep getting a message that python can't

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Peter Hansen
Collin Winter wrote: > On 9/23/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >>__builtins__ is a CPython implementation detail. why not just let it >>be an implementation detail, and refrain from using it? it's not that >>hard, really. > Given, but I fail to see why it can't be a consistent imple

Re: Simple Dialogs

2005-09-23 Thread neil . fraser
James Stroud wrote: > from tkMessageBox import showerror > showerror('Problem','Program Crashed before Starting') Thanks. That works great when interpreted (though a blank window seems to open as well). Unfortunately it still takes 40 seconds to execute after it has been 'compiled' with py2exe (

Re: Productivity and economics at software development

2005-09-23 Thread Peter Hansen
Adriano Monteiro wrote: > I'm making a little research project about programming languages e > their respective IDEs. The goal is to trace each language silhouettes, > where it fits better, their goods/bads and the costs of developing in > this language. You say this as though each language ha

Re: Accessing class variable at class creation time

2005-09-23 Thread Simon Percivall
It might be that I'm complicating something easy here, but I immediately thought of import sys class A: X = 2 def F(): f = sys._getframe().f_back print f.f_locals["X"] F() -- http://mail.python.org/mailman/listinfo/python-list

Re: Bluetooth

2005-09-23 Thread Paul Boddie
Tor Erik Sønvisen wrote: > I'm making a server-side solution in Python and need to be able to > communicate through bluetooth. Is there any bluetooth-packages out there for > python? At the lowest level, you should be able to create sockets for Bluetooth communications (see the socket module's doc

RE: distutils and decorators

2005-09-23 Thread Robert Brewer
Benji York wrote: > Robert Brewer wrote: > > Actually, in this case we most definitely want to test > > 2.4's "@" syntax. The decorator in question is an aliaser, > > and therefore is one of the few > > decorators which must be implemented differently for the 2.3-style > > decoration and the 2.4

Re: Accessing class variable at class creation time

2005-09-23 Thread Jan-Ole Esleben
You could use self.__class__.X HTH, Ole 23 Sep 2005 14:01:21 -0700, Carlos <[EMAIL PROTECTED]>: > Hi! > > class A: > X = 2 > def F(): > print A.X > F() > > The above fails because the name A is not > yet at global scope when the reference A.X > is reached. Is there any way to refer to

Re: batch mkdir using a file list

2005-09-23 Thread DataSmash
Awesome! That worked! Much thanks to Peter and all of you who took the time to answer my question. R.D. -- http://mail.python.org/mailman/listinfo/python-list

Re: CRC16

2005-09-23 Thread Bryan Olson
Tuvas wrote: > Anyone know a module that does CRC16 for Python? I have an aplication > that I need to run it, and am not having alot of sucess. I have a > program in C that uses a CRC16 according to CCITT standards, but need > to get a program that tests it with python as well. Thanks! I'll includ

Re: Wrapping classes

2005-09-23 Thread Pedro Werneck
I agree this is a case for using metaclasses. What about an implementation like this ? Seems like checking if init was already called will slow down all attribute access significantly, but, I don't like this approach of changing the __init__ method. class LazyInit(type): def __new__(self, n

Re: parsing a date

2005-09-23 Thread Larry Bates
Better than a single line of code? What is it that you are looking for? If you dates are consistent you can do: year, month, day=map(int, d.split('-')) but I'm not sure it is "better". I guess it depends on what you want to do with them after parsing. -Larry Bates Kalle Anke wrote: > I want

Accessing class variable at class creation time

2005-09-23 Thread Carlos
Hi! class A: X = 2 def F(): print A.X F() The above fails because the name A is not yet at global scope when the reference A.X is reached. Is there any way to refer to A.X without making explicit use of the name 'A'? Admittedly the code looks pretty unusual, but I'm defining configurati

HTML to LaTeX RE pattern and sub

2005-09-23 Thread [EMAIL PROTECTED]
Hi, trying to make a small script which would translate wiki file into LaTeX and when trying to translate possible HTML elements into LaTeX I did this: def latexEnvironments(matchobj): print >>sys.stderr,str(matchobj.groups()) inStr = matchobj.group(1) translDict = {'dl': ('\\begin{de

Re: batch mkdir using a file list

2005-09-23 Thread Peter Otten
DataSmash wrote: > I am using bash shell on windows and I'm getting the error: > TypeError: loop over non-sequence Use open(filename).readlines() instead of open(filename) or switch to a current Python version. > OR...if python can't handle this type of text file, > what do I need to do to remov

Re: Calling Access module functions from python

2005-09-23 Thread Chris Smith
> "kayakerjess" == kayakerjess <[EMAIL PROTECTED]> writes: kayakerjess> Hi, I have an Access Data Project (.adp) that I am kayakerjess> trying to open and execute from Python. I am using kayakerjess> the win32com.client, and I have successfully opened kayakerjess> the applica

Re: Open PDF

2005-09-23 Thread Thomas Heller
"Martin Miller" <[EMAIL PROTECTED]> writes: > IMHO, the fact that there is no way to wait for the application to > finish is major deficiency with os.startfile() -- and why I often > cannot use it instead of other techniques [such as the much more > involved but limited os.spawnv() function]. > >

Re: Python Source Code for a HTTP Proxy

2005-09-23 Thread Gary Herron
llothar wrote: >Hello, > >i'm looking for a simple http proxy in python. >Does anybody know about something like this ? > > > Here's a list, maintained by Alan Kennedy, of about 20 proxys written in Python: http://xhaus.com/alan/python/proxies.html Enjoy, Gary Herron -- http://mail.pyth

Re: Getting tired with py2exe

2005-09-23 Thread Bugs
Any luck on finding anyone to take over py2exe development Thomas? It's a GREAT project and would be a shame to see it fall into obsolescence. Thomas Heller wrote: [snip] > > Is anyone interested in taking over the maintainance, documentation, and > further development? > [snip] -- http://mai

Re: Run VPython on FC3

2005-09-23 Thread Artur M. Piwko
In the darkest hour on Fri, 16 Sep 2005 15:45:33 -0700, York <[EMAIL PROTECTED]> screamed: >>>/usr/local/lib/libgtkgl.so.4.0.0 >>>/usr/local/lib/libgtkgl.so.4 >>> >>>Does anybody know a solution for this problem? >>> >> >> You need libgtk-(open)gl package (i don't know the exact name in FC). >> >

parsing a date

2005-09-23 Thread Kalle Anke
I want to parse a date string, for example '2005-09-23', and since I haven't done this before I would like to ask what is the best way to do it. I've looked around and the dateutil seems to be what most people use, but unfortunately I only get an empty file when I try to download it. I also tri

Re: batch mkdir using a file list

2005-09-23 Thread DataSmash
OR...if python can't handle this type of text file, what do I need to do to remove the "\n" from the file? -- http://mail.python.org/mailman/listinfo/python-list

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Collin Winter
On 9/23/05, Christopher Subich <[EMAIL PROTECTED]> wrote: > How would this change, if made in a minimal way, impact the "provide > alternate globals() and locals() to eval and exec" feature? Altering > __builtins__ is a half-assed way of providing some sort of security, but > it's probably useful

Re: Simple Dialogs

2005-09-23 Thread James Stroud
py> from tkMessageBox import askquestion, showerror py> from tkSimpleDialog import askfloa py> a = askfloat('Census Data', 'Enter Salary') py> print a 12500.51 py> a = askquestion('Opinion', 'Do you think windoze sucks?') py> print a yes py> a = showerror('Problem','Program Crashed before Starting'

Python Source Code for a HTTP Proxy

2005-09-23 Thread llothar
Hello, i'm looking for a simple http proxy in python. Does anybody know about something like this ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone else getting posts back as email undeliverable bounces?

2005-09-23 Thread Bengt Richter
On Fri, 23 Sep 2005 11:49:51 +0100, Steve Holden <[EMAIL PROTECTED]> wrote: >I've even tried communicating with postmaster at all relevant domains, >but such messages are either bounced or ignored, so I've just filtered >that domain out. > Yeah, but I thought maybe there could be a way to detect

Re: batch mkdir using a file list

2005-09-23 Thread DataSmash
I am using bash shell on windows and I'm getting the error: TypeError: loop over non-sequence Is there any way around not messing with the text file. I want to batch generate the text lists as well. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: batch mkdir using a file list

2005-09-23 Thread [EMAIL PROTECTED]
Jeremy Jones wrote: > DataSmash wrote: > > >Hello, > >I think I've tried everything now and can't figure out how to do it. > >I want to read in a text list from the current directory, > >and for each line in the list, make a system directory for that name. > > > >My text file would look something

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Collin Winter
On 9/23/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Collin Winter wrote: > > > As it currently stands, the type of the global __builtins__ differs > > depending on whether you're in the __main__ namespace (__builtins__ is > > a module) or not (its a dict). I was recently tripped up by this > > d

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Christopher Subich
Collin Winter wrote: > Hallo all, > I'd like to propose that in Py3.0 (if not earlier), __builtins__ will > be the same type regardless of which namespace you're in. Tim Peters > has said [1] that the reason __builtins__ in __main__ is a module so > that "the curious don't get flooded with output w

Re: Open PDF

2005-09-23 Thread Martin Miller
IMHO, the fact that there is no way to wait for the application to finish is major deficiency with os.startfile() -- and why I often cannot use it instead of other techniques [such as the much more involved but limited os.spawnv() function]. I don't if if this is just a limitation of the implement

Re: What is "self"?

2005-09-23 Thread Michael Spencer
Ron Adam wrote: > Erik Max Francis wrote: > >>Ron Adam wrote: >> >> >>>When you call a method of an instance, Python translates it to... >>> >>> leader.set_name(leader, "John") >> >> >>It actually translates it to >> >>Person.set_name(leader, "John") >> > > > I thought that I might have

Re: batch mkdir using a file list

2005-09-23 Thread Jeremy Jones
DataSmash wrote: >Hello, >I think I've tried everything now and can't figure out how to do it. >I want to read in a text list from the current directory, >and for each line in the list, make a system directory for that name. > >My text file would look something like this: >1144 >1145 >1146 >1147 >

Re: batch mkdir using a file list

2005-09-23 Thread Fredrik Lundh
DataSmash <[EMAIL PROTECTED]> wrote > I think I've tried everything now and can't figure out how to do it. > I want to read in a text list from the current directory, > and for each line in the list, make a system directory for that name. > > My text file would look something like this: > 1144 > 1

Simple Dialogs

2005-09-23 Thread neil . fraser
I'm looking for a lightweight dialog boxes from Python. JavaScript uses: alert(), confirm() and prompt() VB uses: MsgBox() and InputBox() EasyGui seemed perfect, but a "Hello World" application takes nearly a minute to execute after the program has been compiled by py2exe. There appear to be dozen

batch mkdir using a file list

2005-09-23 Thread DataSmash
Hello, I think I've tried everything now and can't figure out how to do it. I want to read in a text list from the current directory, and for each line in the list, make a system directory for that name. My text file would look something like this: 1144 1145 1146 1147 I simply want to create thes

Re: CRC16

2005-09-23 Thread Larry Bates
The first URL back from Google is: http://www.onembedding.com/tools/python/code/crc16.htm Site is Russian, but crc16.py that is listed there has English comments. Maybe you can use some/all of it. -Larry Bates Tuvas wrote: > Anyone know a module that does CRC16 for Python? I have an aplication

tk_focusNext() revisited

2005-09-23 Thread Sori Schwimmer
Hello, I am trying to move focus between Tkinter (and other) widgets. A solution similar with my approach was suggested by Eric Brunel at http://mail.python.org/pipermail/python-list/2004-July/229971.html It will generate an error: Exception in Tkinter callback Traceback (most recent call last):

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Fredrik Lundh
Collin Winter wrote: > As it currently stands, the type of the global __builtins__ differs > depending on whether you're in the __main__ namespace (__builtins__ is > a module) or not (its a dict). I was recently tripped up by this > discrepancy, and googling the issue brings up half-a-dozen or so

Re: Productivity and economics at software development

2005-09-23 Thread Tom Anderson
On Fri, 23 Sep 2005, Scott David Daniels wrote: > Adriano Monteiro wrote: > >> I'm making a little research project about programming languages e >> their respective IDEs. The goal is to trace each language silhouettes, >> where it fits better, their goods/bads and the costs of developing in >

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Tom Anderson
On Fri, 23 Sep 2005, Collin Winter wrote: > If possible, I'd like to see this go in before 3.0. The reference manual > currently states [2] that __builtins__ can be either a dict or a module, > so changing it to always be a module would still be in keeping with > this. However, I realise that t

Re: Question About Logic In Python

2005-09-23 Thread Bryan Olson
Steven D'Aprano wrote: > Or wait, I have thought of one usage case: if you are returning a value > that you know will be used only as a flag, you should convert it into a > bool. Are there any other uses for bool()? We could, of course, get along without it. One use for canonical true and false v

Re: Finding where to store application data portably

2005-09-23 Thread Ron Adam
Steven D'Aprano wrote: > On Thu, 22 Sep 2005 19:09:28 +0400, en.karpachov wrote: > > >>There is an other way around: look at your home dir as if it is your >>"settings" dir and don't clutter it with files other than application >>config dot-files. Just make ~/files/, ~/bin/ ~/lib/ etc. for it.

CRC16

2005-09-23 Thread Tuvas
Anyone know a module that does CRC16 for Python? I have an aplication that I need to run it, and am not having alot of sucess. I have a program in C that uses a CRC16 according to CCITT standards, but need to get a program that tests it with python as well. Thanks! -- http://mail.python.org/mailm

Bluetooth

2005-09-23 Thread Tor Erik S�nvisen
Hi I'm making a server-side solution in Python and need to be able to communicate through bluetooth. Is there any bluetooth-packages out there for python? regards tores -- http://mail.python.org/mailman/listinfo/python-list

Re: File processing

2005-09-23 Thread Bryan Olson
Peter Hansen wrote: > Gopal wrote: >> [...] I'm >> thinking of going with this format by having "Param Name - value". Note >> that the value is a string/number; something like this: >> >> PROJECT_ID = "E4208506" >> SW_VERSION = "18d" >> HW_VERSION = "2" >> >> In my script, I need to parse

Re: replacments for stdio?

2005-09-23 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: >i was wondering if anyone have written a GUI module that can > function as a replacment for stdin/stdout? ie. has a file like > interface, by which one could just assaign it to sys.stdout or > sys.stdin and have all your prints and raw_inputs and other such things > sh

Re: Small python24.dll / how to strip off asian codecs to separate package(s) ?

2005-09-23 Thread Martin v. Löwis
Robert wrote: > Or how to build one? Just download the source, and follow the instructions in PCBuild/readme.txt. Then, edit the pythoncore project to remove the files you don't want to include, and edit config.c to remove the dangling references. Regards, Martin -- http://mail.python.org/mailma

Re: C#3.0 and lambdas

2005-09-23 Thread Reinhold Birkenfeld
Fredrik Lundh wrote: > Reinhold Birkenfeld wrote: > >>> And I think the discussion that followed proved your point perfectly >>> Fredrik. Big discussion over fairly minor things, but no "big picture". >>> Where are the initiatives on the "big stuff" (common documentation >>> format, improved buil

desktop module (was Re: Open PDF)

2005-09-23 Thread Paul Boddie
Dennis Lee Bieber skrev: > On Thu, 22 Sep 2005 15:16:09 +0100, Dan <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > > > I would like to know how to open a PDF document from a python script > > > > You mean open it and display it to the user? Under Windows you may be > > able t

Re: What is "self"?

2005-09-23 Thread Ron Adam
Erik Max Francis wrote: > Ron Adam wrote: > >> When you call a method of an instance, Python translates it to... >> >> leader.set_name(leader, "John") > > > It actually translates it to > > Person.set_name(leader, "John") > I thought that I might have missed something there. Is ther

Re: xml2schema

2005-09-23 Thread uche . ogbuji
""" Er, do you mean to generate a Relax NG (or possibly a DTD in fact) from some XML file?? If you do mean this then just think of that how you could generate grammar from some paragraphs of English text... Sorta non-trivial, if possible at all, isn't it? :-) """ Very well put. However, for REL

Re: Config parser module

2005-09-23 Thread Larry Bates
ConfigParser is for parsing configuration files of the format: [section1] option1= option2= . . . optionN= [section2] option1= option2= . . . optionN= Your data doesn't fit that format. Looks to me like you should write a small class object for each different type of record that can be found in

Re: What is "self"?

2005-09-23 Thread Terry Hancock
On Friday 23 September 2005 10:41 am, Rick Wotnaz wrote: > Oh, 'ix' would be fine. Single-letter loop counters are also semi- > fine if that is in fact their only use. It too-frequently happens > that at some point the handy 'i' identifier is used outside the > loop (for another placeholder), and

Re: What is "self"?

2005-09-23 Thread Terry Hancock
On Friday 23 September 2005 10:42 am, Peter wrote: > Terry Hancock wrote: > >How exactly is that? Anybody who uses "i" as a variable name for > >anything other than an innermost loop index is a sick and twisted > >code sadist. > > > Agreed, though to say "code sadist" is a little hard don't ya thi

Re: NaN Vs None

2005-09-23 Thread François Pinard
[Peck, Jon] > In choosing a way to represent a value of "no information" for a > float, would it be better to use NaN or None? None has the advantage > of standard behavior across platforms, but NaN seems to propagate more > easily – at least on Windows. [...] What I do for these things is crea

Re: optimizing a program that just shuffles data, a bit like cat...

2005-09-23 Thread Dan Stromberg
On Fri, 23 Sep 2005 10:18:47 -0500, Oracle wrote: > On Fri, 23 Sep 2005 01:16:46 +, Dan Stromberg wrote: > >> [quoted text muted] > > Try using psyco and see if that helps. Also, sometimes smaller blocks are > better than large blocks. Try using smaller block sizes and see if that > helps.

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Michael Hoffman
Collin Winter wrote: > If possible, I'd like to see this go in before 3.0. +1 -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Config parser module

2005-09-23 Thread Dale Strickland-Clark
The Config Parser module is for extracting data from and writing to a specific format of file, generally known as a config file. As explained in the documentation, a config file is in the same format as .ini files frequently found on windows - especially used by older software. It is a very handy

Re: What is "self"?

2005-09-23 Thread Rick Wotnaz
Terry Hancock <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On Friday 23 September 2005 07:11 am, Rick Wotnaz wrote: >> I've long thought that Guido missed an opportunity by not >> choosing to use 'i' as the instance identifier, and making it a >> reserved word. For one thing, it would r

Re: What is "self"?

2005-09-23 Thread Peter
Terry Hancock wrote: >On Friday 23 September 2005 07:11 am, Rick Wotnaz wrote: > > >>I've long thought that Guido missed an opportunity by not choosing >>to use 'i' as the instance identifier, and making it a reserved >>word. For one thing, it would resonate with the personal pronoun >>'I', a

Config parser module

2005-09-23 Thread qqcq6s59
Hi all I am a newbie and I just saw a ongoing thread on Fileprocessing which talks abt config parser. I have writen many pyhton program to parse many kind of text files by using string module and regex. But after reading that config parser thread I feel stunned. Can somebody tell me some intro inf

Re: optimizing a program that just shuffles data, a bit like cat...

2005-09-23 Thread Oracle
On Fri, 23 Sep 2005 01:16:46 +, Dan Stromberg wrote: > > ...but with much bigger blocksizes, and with a netcat-like ability to use > sockets. > Try using psyco and see if that helps. Also, sometimes smaller blocks are better than large blocks. Try using smaller block sizes and see if that

NaN Vs None

2005-09-23 Thread Peck, Jon
In choosing a way to represent a value of "no information" for a float, would it be better to use NaN or None?  None has the advantage of standard behavior across platforms, but NaN seems to propagate more easily – at least on Windows. For example,   NaN+1 = NaN but None+1 raises an e

Re: time challenge

2005-09-23 Thread nephish
sorry about that, i got a message in my inbox that said that the post was rejected so i tried it from my email client. wont happen again. shawn -- http://mail.python.org/mailman/listinfo/python-list

Re: Sniffing Text Files

2005-09-23 Thread David Pratt
Thanks Mike this is really great! Regards, David On Friday, September 23, 2005, at 11:55 AM, Mike Meyer wrote: > David Pratt <[EMAIL PROTECTED]> writes: >> Thanks Mike for your reply. I am not aware of libmagic and will look >> to see what it provides. > > and ... > > Skip Montanaro <[EMAIL PRO

Re: Sniffing Text Files

2005-09-23 Thread David Pratt
Hi Skip. Thank you for your reply. This is helpful and I am glad I put this to the list. There are some really good ideas that will help me come up with something good to use. Regards, David On Friday, September 23, 2005, at 11:14 AM, [EMAIL PROTECTED] wrote: > > David> I realize CSV modu

Re: Sniffing Text Files

2005-09-23 Thread Mike Meyer
David Pratt <[EMAIL PROTECTED]> writes: > Thanks Mike for your reply. I am not aware of libmagic and will look > to see what it provides. and ... Skip Montanaro <[EMAIL PROTECTED]> writes: > You can also run the file(1) command and see what it says. I seem > to recall someone asking about the e

Single type for __builtins__ in Py3.0

2005-09-23 Thread Collin Winter
Hallo all, As it currently stands, the type of the global __builtins__ differs depending on whether you're in the __main__ namespace (__builtins__ is a module) or not (its a dict). I was recently tripped up by this discrepancy, and googling the issue brings up half-a-dozen or so c.l.p threads wher

Re: Productivity and economics at software development

2005-09-23 Thread Scott David Daniels
Adriano Monteiro wrote: > Hi folks, > I'm making a little research project about programming languages e > their respective IDEs. The goal is to trace each language silhouettes, > where it fits better, their goods/bads and the costs of developing in > this language. What do you consider the ID

Re: What is "self"?

2005-09-23 Thread Terry Hancock
On Friday 23 September 2005 07:11 am, Rick Wotnaz wrote: > I've long thought that Guido missed an opportunity by not choosing > to use 'i' as the instance identifier, and making it a reserved > word. For one thing, it would resonate with the personal pronoun > 'I', and so carry essentially the s

Re: Productivity and economics at software development

2005-09-23 Thread Diez B. Roggisch
I get this: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 136

Re: What is "self"?

2005-09-23 Thread Sion Arrowsmith
Rick Wotnaz <[EMAIL PROTECTED]> wrote: >I've long thought that Guido missed an opportunity by not choosing >to use 'i' as the instance identifier, and making it a reserved >word. For one thing, it would resonate with the personal pronoun >'I', and so carry essentially the same meaning as 'self'

Re: Using distutils 2.4 for python 2.3

2005-09-23 Thread Noam Raphael
Fredrik Lundh wrote: > > you can enable new metadata fields in older versions by assigning to > the DistributionMetadata structure: > > try: > from distutils.dist import DistributionMetadata > DistributionMetadata.package_data = None > except: > pass > > setup

Re: C#3.0 and lambdas

2005-09-23 Thread Steven Bethard
Erik Wilsher wrote: > And I think the discussion that followed proved your point perfectly > Fredrik. Big discussion over fairly minor things, but no "big > picture". Where are the initiatives on the "big stuff" (common > documentation format, improved build system, improved web modules, > rew

Productivity and economics at software development

2005-09-23 Thread Adriano Monteiro
Hi folks, I'm making a little research project about programming languages e their respective IDEs. The goal is to trace each language silhouettes, where it fits better, their goods/bads and the costs of developing in this language. It's easy to find projects that doesn't worked as expect

Re: C#3.0 and lambdas

2005-09-23 Thread Ganesan Rajagopal
> A M Kuchling <[EMAIL PROTECTED]> writes: > The group of committers is a diverse group of people, and not every one of > them uses a relational database; that effort would be better done on the > DB-SIG mailing list, because the people there presumably do all use an > RDBMS. (Now, if you wan

Re: Sniffing Text Files

2005-09-23 Thread skip
David> I realize CSV module has a sniffer but it is something that is David> limited more or less to delimited files. Sure. How about: def sniff(fname): if open(fname).read(4) == "http://www.musi-cal.com/katrina [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo

Re: Sniffing Text Files

2005-09-23 Thread David Pratt
Thanks Mike for your reply. I am not aware of libmagic and will look to see what it provides. As far as your first suggestion, this is what I have been looking at - probably a combination regex and readlines or similar but trying to get a better sense of best sort of approach more or less. I

Re: how to pickle unpicklable objects

2005-09-23 Thread Hans Georg Krauthaeuser
Guy Lateur schrieb: > Hi all, > > I've been writing an application containing a lot of settings which can be > changed by the user. I'm using wx.Config to read/write these settings (to > the windows registry). This means I can only store strings, ints and floats. > > However, it would be very c

  1   2   >