Re: Can't load bytecode with execfile ?

2005-01-25 Thread Nick Coghlan
Bo Jacobsen wrote: I have a number of files compiled to bytecode using py_compile.compile(). The .pyc files can be invoked by python directly ($python file.pyc), but "loading" them by execfile just throws an exception ? Py> help(execfile) Help on built-in function execfile in module __builtin__: ex

DDE syntax help

2005-01-25 Thread Dana Marcusanu
Hello, I am trying to convert an Excel SpreadSheet to Python. The formula in Excel for one of the cells is =DDE("ser1","ser2","ser3"). The name of the server is ser1, ser2 is the topic, and ser3 is an item. I already tried using: >>> import dde >>> ddes = dde.CreateServer() >>> ddes.Create("ser1

OT

2005-01-25 Thread Jim Benson
On Wed, 26 Jan 2005 [EMAIL PROTECTED] wrote: > That sounds like you're doing a closed source product and need an ENC > exception or something even worse. Python should qualify for the TSU > exception which only requires sending an email. > > http://www.bxa.doc.gov/encryption/PubAvailEncSourceCod

Re: Help! Host is reluctant to install Python

2005-01-25 Thread Daniel Bickett
On [EMAIL PROTECTED] wrote: > Daniel Bickett <[EMAIL PROTECTED]> writes: > > I've been trying to convince my host to install python/mod_python on > > his server for a while now, however there are a number of reasons he > > is reluctant to do so, which I will outline here: > > I'm surprised that yo

Re: Textual markup languages (was Re: What YAML engine do you use?)

2005-01-25 Thread Aahz
In article <[EMAIL PROTECTED]>, Alan Kennedy <[EMAIL PROTECTED]> wrote: > >However, I'm torn on whether to use ReST for textual content. On the one >hand, it's looks pretty comprehensive and solidly implemented. But OTOH, >I'm concerned about complexity: I don't want to commit to ReST if it's >

Re: Classical FP problem in python : Hamming problem

2005-01-25 Thread Bengt Richter
On Tue, 25 Jan 2005 11:46:04 -0800, Jeff Shannon <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >> On 25 Jan 2005 08:30:03 GMT, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: >> >>>If you are after readability, you might prefer this... >>> >>>def hamming(): >>> def _hamming(): >>> yield 1 >>>

py2exe problem

2005-01-25 Thread Club-B42
i've compiled my programm using command "python setup.py py2exe >1" python script works fine, but .exe version fails with = D:\[Egor]\Scripts\B-4-2\la2luncher\dist>la2launcher.exe Traceback (most recent call last): File "la2launc

Re: re Insanity

2005-01-25 Thread Aahz
In article <[EMAIL PROTECTED]>, Tim Daneliuk <[EMAIL PROTECTED]> wrote: > >Given an arbitrary string, I want to find each individual instance of >text in the form: "[PROMPT:optional text]" > >I tried this: > > y=re.compile(r'\[PROMPT:.*\]') > >Which works fine when the text is exactly "[PROMP

Re: py2exe problem

2005-01-25 Thread Grant Edwards
On 2005-01-26, Club-B42 <[EMAIL PROTECTED]> wrote: > i've compiled my programm using command "python setup.py py2exe >1" > > python script works fine, but .exe version fails with > LookupError: no codec search functions registered: can't find encoding Googling for the error message will find you

Re: python without OO

2005-01-25 Thread Frank Bechmann (w)
even if I follow the other answers above - language-wise and management-advise-wise - just for the sake of completeness - I would like to point you to Lua: http://www.lua.org/ 1. portability (interpreter runs quite a bit architectures) => yes, nearly pure ANSI-C should compile 2. good ba

Re: threading.py Condition wait overflow error

2005-01-25 Thread Tim Peters
[Mark English] > Every once in a while since I moved to Python 2.4 I've been seeing the > following exception in threading.py Condition: > > File "mctest3.py", line 1598, in WaitForMessages >self.condResponses.wait(1.0) > File "C:\Program Files\Python24\lib\threading.py", line 221, in wait >

Re: Another scripting language implemented into Python itself?

2005-01-25 Thread JanC
Francis Girard schreef: > I'm really not sure but there might be some way to embed Java Script > within Jython. You can embed JavaScript in CPython, but I don't know how secure or stable it is: -- JanC "Be strict when sending and toleran

Re: python without OO

2005-01-25 Thread Davor
M.E.Farmer, first to clarify few things - I'm neither manager nor professionally involved in code development - I'm just embarking on a small project that I would like to attract some programmers to later on and make it a nice open-source system. Based on my previous experience with few SMALL proj

alternatives to mod python

2005-01-25 Thread snacktime
I'm looking for a simple async ssl http server that can accept http POST requests. Performance is an issue, which is why I'm currently using mod python. I don't really want to require installing apache and mod python though if I can help it, since this is software that will be distributed to end

import hook, overwrite import?

2005-01-25 Thread Torsten Mohr
Hi, is there some description available to overwrite the import hook? By googling i found out so far that i need to overwrite __builtins__.__import__ with something else. Can i also do this with a C function that is provided when using an embedded python interpreter? So my own C program provide

[ANN] SQLObject 0.6.1

2005-01-25 Thread Ian Bicking
SQLObject 0.6.1 --- Version 0.6.1 is a bug fix release for 0.6. Most of the work on this release has been thanks to the contributions of Oleg Broytmann. Thanks Oleg! A brief list of changes: * All class methods take a connection argument. * "DISTINCT" option for select results. * Conne

Re: python without OO

2005-01-25 Thread Davor
thanks for the link > know what's funny: in the Lua mailing list there is currently a > discussion about adding OO to Lua. I guess most of these newer languages have no choice but to support OO if they want to attract a larger user base :-(... davor -- http://mail.python.org/mailman/listinfo/p

Re: Python with no significant whitespace

2005-01-25 Thread Tom
Just though I'd point out that Logix *does* use whitespace for delimiting blocks. Or rather, it can use whitespace, and the languages that come as standard do. With Logix you could quite easily make a version of Python with, e.g., braces instead of whitespace for delimiting blocks. That's probably

Re: alternatives to mod python

2005-01-25 Thread Sridhar
> Anyone have any suggestions? The only other thing > I looked at was twisted, which I'm still evaluating. I second that. Add Nevow too - www.nevow.com -- http://mail.python.org/mailman/listinfo/python-list

Re: alternatives to mod python

2005-01-25 Thread Brian Beck
Anyone have any suggestions? The only other thing I looked at was twisted, which I'm still evaluating. Might as well check out CherryPy as well. www.cherrypy.org Might turn out to be simpler for your needs. -- Brian Beck Adventurer of the First Order -- http://mail.python.org/mailman/listinfo/pyth

RE: I want update one record using ADO,but I can't ,why?

2005-01-25 Thread Robert Brewer
nightmarch wrote: > Sorry, I mean this code line " rs.Supports( wc.constants.adUpdate ) " > got False result, So I can't update one record,i.e. I can't execute > this code "rs.Fields.Item(0).Value = 11". > > And , if code is written like this: > > ##conn.Open(connStr ) >rs.Open( tblName,

Re: script to search ebay?

2005-01-25 Thread Kamilche
This script works. But why not make a 'Favorite Search' in ebay, and have it send you daily email for a year? --Kamilche |import urllib |import smtplib | |def main(): |# Perform the search |results = SearchEbay(['So long and thanks for all the fish', | 'NOMATCHFOUND',

Re: python without OO

2005-01-25 Thread Terry Reedy
Davor, Before I learned Python, I too was put off by OO hype. And I suppose I still would be if I still listened to it. But Python's class statement is somewhere inbetween a C typedef and C++/Jave classes. Stripped down pretty much to the essentials and only used when really useful, it made m

How to assign

2005-01-25 Thread Jan Rienyer Gadil
Sort of a newbie question: How am i going to assign to a variable anything the user inputs on a wxTxtCtrl? -- http://mail.python.org/mailman/listinfo/python-list

Re: delay and force in Python

2005-01-25 Thread Bengt Richter
On Tue, 25 Jan 2005 23:53:26 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >Peter Otten wrote: >> Nick Coghlan wrote: >> >> Py> print islice((x for x in xrange(1, 996) if x % 2 == 0), 1, 2).next() 4 >>> >>>Wouldn't it be nice if this could be spelt: >>> >>>print (x for x in xrange(1, 99

Re: how to write a tutorial

2005-01-25 Thread Xah Lee
in my previous two messages, i've criticized the inanity of vast majority of language documentations and tutorials in the industry. I've used the Python tutorial's chapter on class as an example. I've indicated that proper tutorial should be simple, covering just common cases, be self-contained, an

Re: python without OO

2005-01-25 Thread Nick Coghlan
Davor wrote: thanks for the link know what's funny: in the Lua mailing list there is currently a discussion about adding OO to Lua. I guess most of these newer languages have no choice but to support OO if they want to attract a larger user base :-(... Tell me, have you ever defined a C structure

Re: delay and force in Python

2005-01-25 Thread Nick Coghlan
Bengt Richter wrote: You can bail out of a generator expression with a raise-StopIteration expression spelled iter([]).next() ;-) >>> list(show(x) for x in xrange(20) if x<8 or iter([]).next() or True) 0 1 2 3 4 5 6 7 [0, 1, 2, 3, 4, 5, 6, 7] This is both neat and incredibly arcane at the same

Re: How to assign

2005-01-25 Thread Laszlo Zsolt Nagy
Jan Rienyer Gadil wrote: Sort of a newbie question: How am i going to assign to a variable anything the user inputs on a wxTxtCtrl? I'm affraid you have to do it manually. I think the best solution is to use a property like this: import wx class FrameMain(wx.Frame): def __init__(self, *args

Graph, how to?

2005-01-25 Thread jrlen balane
i'm going to use now the matplotlib in plotting a graph. i'm currently using python 2.3(enthought edition) on win 2000/xp. i'm using boa constructor on the GUI part. i am using an MDIParentFrame. one of the child frame will be used for the table part. then another child frame will be used to show

<    1   2   3