Re: Fall of Roman Empire

2006-12-19 Thread Ben Finney
"John Machin" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > > \ "...one of the main causes of the fall of the Roman Empire was | > > `\that, lacking zero, they had no way to indicate successful | > > _o__) termination of their C programs." -- Robert Firth | > >

Re: Working with unsigned/signed types

2006-12-19 Thread brian
That seems like it'll do the trick quite well. As far as the future generations go, there's no question as to whether it would last if it were on my site - there are always changes being made to it and I'm not expecting it to be very stable over the course of time, especially since it would confus

Fall of Roman Empire

2006-12-19 Thread John Machin
Ben Finney wrote: > \ "...one of the main causes of the fall of the Roman Empire was | > `\that, lacking zero, they had no way to indicate successful | > _o__) termination of their C programs." -- Robert Firth | An amusing .sig, but it doesn't address the root cau

Re: trouble getting google through urllib

2006-12-19 Thread Amit Khemka
On 19 Dec 2006 16:12:59 -0800, Dr. Locke Z2A <[EMAIL PROTECTED]> wrote: > I looked at those APIs and it would appear that SOAP isn't around > anymore and there are no APIs for google translate :( Can anyone tell > me how to set the user-agent string in the HTTP header? import urllib2 req = urllib

Re: Working with unsigned/signed types

2006-12-19 Thread Ben Finney
<[EMAIL PROTECTED]> writes: > The first part of the question is fairly basic - in C, working with > signed integers, the MSB (is that still the right term?) is used to > denote positive and negative, and the following bits increase > towards positive infinity, correct? Such that in C, adding one

python script terminating

2006-12-19 Thread Aditya Vaish
Using perl

using methods base64 module in conjunction with Crypto.Hash.SHA256

2006-12-19 Thread mirandacascade
I am attempting to implement a process, and I'm pretty sure that a major roadblock is that I do not understand the nomenclature. The specs indicate that the goal is to calculate a message digest using an SHA-256 algorithm. There are 2 examples included with the specs. The label on the 2 examples

Re: MySQLdb, lots of columns and newb-ness

2006-12-19 Thread Felix Benner
Andrew Sackville-West schrieb: > I have an ascii data dump from a POS system that has 131 fields in a > single column in a flat file. I can easily open the file, read in the > data and assemble it into various formats. okay. what I *want* to do > is insert each of these fields into a mysql databas

Re: def index(self):

2006-12-19 Thread Tim Roberts
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >Gert Cuykens a écrit : >>> FWIW, the first version raises an exception (unless of course the name >>> 'index' is already bound in the enclosing scope). And the second won't >>> probably work as expected with CherryPy. >> >> >> class HelloWorld: >>

Working with unsigned/signed types

2006-12-19 Thread brian
Hi everyone- I've been away from coding for a while (I turned into a professional photographer)... So now I've taken up a project involving working with EXIF and XMP metadata in image files (mainly JPEG and TIFF), and am having some trouble figuring out how to handle some of the data... Here's w

Re: Simplest way to do Python/Ajax with server and client on same machine?

2006-12-19 Thread Adonis Vargas
Kenneth McDonald wrote: > I'm doing some work with a Python program that works hand-in-hand with > the DOM on a local client (processing DOM events, issuing DOM > modification commands, etc.) I'm currently using cherrypy as the Python > server for this communication, and simple AJAX on the clien

Re: MySQLdb, lots of columns and newb-ness

2006-12-19 Thread Andrew Sackville-West
On Tue, Dec 19, 2006 at 07:34:58PM -0800, Todd Neal wrote: > Andrew Sackville-West wrote: > > > > I can successfully connect to mysql and do stuff to my tables my > > specific problem is how to efficiently put those 132 fields into the > > thing. All I have been able to figure out is really ugly s

Re: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Hendrik van Rooyen
Michael Yanowitz top posted (again): >No. test3.py (for example) is just plain Python code that sends and receives socket data >from another machine. It does (or could) contain loops that last a long time, repeating >the read or write operations to and from the socket. This grabs the CPU. > Wh

Simplest way to do Python/Ajax with server and client on same machine?

2006-12-19 Thread Kenneth McDonald
I'm doing some work with a Python program that works hand-in-hand with the DOM on a local client (processing DOM events, issuing DOM modification commands, etc.) I'm currently using cherrypy as the Python server for this communication, and simple AJAX on the client browser end. This works just

Re: regexp

2006-12-19 Thread johnzenger
Not just Python, but every Regex engine works this way. You want a ? after your *, as in <--(.*?)--> if you want it to catch the first available "-->". At this point in your adventure, you might be wondering whether regular expressions are more trouble than they are worth. They are. There are t

Re: MySQLdb, lots of columns and newb-ness

2006-12-19 Thread Todd Neal
Andrew Sackville-West wrote: > > I can successfully connect to mysql and do stuff to my tables my > specific problem is how to efficiently put those 132 fields into the > thing. All I have been able to figure out is really ugly stuff like: > build the mysql statement out of various pieces with appr

RE: regexp

2006-12-19 Thread Mark Schoonover
Jonathan Curran wrote: > On Tuesday 19 December 2006 15:32, Paul Arthur wrote: >> On 2006-12-19, vertigo <[EMAIL PROTECTED]> wrote: >>> Hello >>> Take a look at Chapter 8 of 'Dive Into Python.' http://diveintopython.org/toc/index.html >>> >>> i read whole regexp chapter - >> >> Did you

Re: regexp

2006-12-19 Thread Jonathan Curran
On Tuesday 19 December 2006 15:32, Paul Arthur wrote: > On 2006-12-19, vertigo <[EMAIL PROTECTED]> wrote: > > Hello > > > >> Take a look at Chapter 8 of 'Dive Into Python.' > >> http://diveintopython.org/toc/index.html > > > > i read whole regexp chapter - > > Did you read Chapter 8? Regexes are 7

Re: tricky(?) win32com question - Mark Hammond or other experts please.

2006-12-19 Thread John Machin
[EMAIL PROTECTED] wrote: > OK, I've asked this earlier this week with no response. Since then I've > also received a suggestion from the app developers but that failed with > the same type error problem. Hopefully Mark Hammond or other experts > can offer a suggestion as to how to get around this

Re: Tkdnd--does anyone use it?

2006-12-19 Thread klappnase
> I use it in phonoripper > (http://klappnase.zexxo.net/phonoripper.index.html) to drag files from > Oops, wrong link address, should be: http://klappnase.zexxo.net/phonoripper/index.html Apologies Michael -- http://mail.python.org/mailman/listinfo/python-list

tricky(?) win32com question - Mark Hammond or other experts please.

2006-12-19 Thread cfriedalek
OK, I've asked this earlier this week with no response. Since then I've also received a suggestion from the app developers but that failed with the same type error problem. Hopefully Mark Hammond or other experts can offer a suggestion as to how to get around this problem. I'm foolish enough to thi

MySQLdb, lots of columns and newb-ness

2006-12-19 Thread Andrew Sackville-West
Hi list, I've tried, lots of interpreter testing and google grepping to figure this out and I think I'm missing something fundamental. I have an ascii data dump from a POS system that has 131 fields in a single column in a flat file. I can easily open the file, read in the data and assemble it i

Re: trouble getting google through urllib

2006-12-19 Thread Dr. Locke Z2A
I looked at those APIs and it would appear that SOAP isn't around anymore and there are no APIs for google translate :( Can anyone tell me how to set the user-agent string in the HTTP header? -- http://mail.python.org/mailman/listinfo/python-list

Re: Page layouts in mod_python?

2006-12-19 Thread Graham Dumpleton
Bruno Desthuilliers wrote: > Michael a écrit : > > Hey everyone, > > > > Is it possible to automatically insert headers/footers using > > mod_python? > > I will be not be using PSP's, so I cannot use the PSP/include solution. > > Furthermore, the header will be dynamic; it won't be a static HTML >

Re: Cpoying a PyList to a C string array

2006-12-19 Thread Klaas
Sheldon wrote: > Thanks Mike, > > I am rewriting the code but I don't understand the part about the c > struct variable called work. The function I posted is a part of a > larger script and I just posted that part that was problamatic. I was > under the impression that if I declared the structure

Re: Http server

2006-12-19 Thread Gert Cuykens
Does anybody know how to redirect a post request ? i have a js file that does a post request to a /php/action.php file and i would like for the secretary to just do the action method instead that is defined in her python Http class book, so i can run both php and python without changing the static

Re: Class property with value and class

2006-12-19 Thread Ben Finney
"manstey" <[EMAIL PROTECTED]> writes: > Is is possible to have two classes, ClassA and ClassB, and > setattr(ClassA, 'xx',ClassB), AND to then have ClassA.xx store an > integer value as well, which is not part of ClassB? You seem somewhat confused over classes and instances. There's little need t

Re: Cpoying a PyList to a C string array

2006-12-19 Thread Sheldon
Klaas skrev: > Sheldon wrote: > > The code below is a rookie attempt to copy a python list of strings to > > a string array in C. It works to some extent but results in memory > > problems when trying to free the C string array. Does anyone know how > > to do this properly? > > You have numerous

Re: When Closure get external variable's value?

2006-12-19 Thread Fredrik Lundh
Huayang Xia wrote: > I don't understand why while a nested function perfectly matches the > definition of closure, it is not closure simply because it is not used > by external world. Like so many other computing terms, the word "closure" is used in different ways by different people. Strictly

Re: Http server

2006-12-19 Thread Gert Cuykens
> > The cute secretary's name is "cherrypy.tools.staticdir". > > Check out her resume at http://www.cherrypy.org/wiki/StaticContent > > I think i am in love :) Cant believe this just works out import os.path import cherrypy pwd = os.path.dirname(os.path.abspath(__file__)) class Http: _cp_c

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Alan Isaac
>From pytrix: http://www.american.edu/econ/pytrix/pytrix.py def permutationsg(lst): '''Return generator of all permutations of a list. ''' if len(lst)>1: for i in range(len(lst)): for x in permutationsg(lst[:i]+lst[i+1:]): yield [lst[i]]+x else:

Re: Page layouts in mod_python?

2006-12-19 Thread Bruno Desthuilliers
Michael a écrit : > Hey everyone, > > Is it possible to automatically insert headers/footers using > mod_python? > I will be not be using PSP's, so I cannot use the PSP/include solution. > Furthermore, the header will be dynamic; it won't be a static HTML > page. > > In short, I've been looking f

[ANN]: 'twander' 3.210 Released And Available

2006-12-19 Thread Tim Daneliuk
(Apologies for two releases in less than a week. It was, um... necessary. This should be it for quite a while barring any notable bug reports.) 'twander' Version 3.210 is now released and available for download at: http://www.tundraware.com/Software/twander The last public release wa

Re: When Closure get external variable's value?

2006-12-19 Thread Huayang Xia
My understanding was: Closure is a nested function first. If it refers free variable, then it is closure. If it doesn't refer free variable, it doesn't have to be nested. That is probably the reason, the free variable is emphasized. Normally it makes sense to return a closure, but not a non-closur

Re: regexp

2006-12-19 Thread skip
vertigo> i noticed that while matching regexp python tries to match as wide as it's vertigo> possible, vertigo> for example: vertigo> re.sub("","",htmldata) vertigo> would cut out everything before first "" in the vertigo> document. vertigo> Can i force re to math

Re: Http server

2006-12-19 Thread Gert Cuykens
> The cute secretary's name is "cherrypy.tools.staticdir". > Check out her resume at http://www.cherrypy.org/wiki/StaticContent I think i am in love :) -- http://mail.python.org/mailman/listinfo/python-list

Re: regexp

2006-12-19 Thread vertigo
Hello Thanx for help, i have one more question: i noticed that while matching regexp python tries to match as wide as it's possible, for example: re.sub("","",htmldata) would cut out everything before first "" in the document. Can i force re to math as narrow as possible ? (to match first ""

Re: Core dump revisited

2006-12-19 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > Man. You are good. This is most insight I have had from anyone. > > :-) > > > I did initialize the arrays with PyObjects and today, after hours of > > debugging and now with your insight, I think the problem lies here: > > Good! > >

Page layouts in mod_python?

2006-12-19 Thread Michael
Hey everyone, Is it possible to automatically insert headers/footers using mod_python? I will be not be using PSP's, so I cannot use the PSP/include solution. Furthermore, the header will be dynamic; it won't be a static HTML page. In short, I've been looking for a page layout facility using mod_

Re: When Closure get external variable's value?

2006-12-19 Thread Fredrik Lundh
Bruno Desthuilliers wrote: >> You skipped the first and most important sentence: > "In programming languages, a closure is a function that refers to free > variables in its lexical context." > > IOW, a closure is a function that carry it's own environment. in contrast to functions that don't k

Re: Http server

2006-12-19 Thread fumanchu
Gert Cuykens wrote: > so far this works > > > import cherrypy > import os.path > > class Http: > > def index(self): > f = open(os.path.join(os.path.dirname(__file__), '../htm/index.htm')) > xml = f.read() > f.close() > return xml > index.exposed = True > > c

Re: regexp

2006-12-19 Thread johnzenger
Oops, I mean obj.sub("", htmldata) On Dec 19, 4:15 pm, [EMAIL PROTECTED] wrote: > You want re.sub("(?s)", "", htmldata) > > Explanation: To make the dot match all characters, including newlines, > you need to set the DOTALL flag. You can set the flag using the (?_) > syntax, which is explained i

Re: python-hosting.com projects: dead?

2006-12-19 Thread Richard Jones
Remi wrote: > We had to do some serious cleanup and we disabled a lot of Trac sites > that looked abandoned (people left their Trac sites open to spammers > and our server was crawling under the load caused by these spammers). Actually, to clarify the DEFAULT configuration for Trac is to leave it

Re: regexp

2006-12-19 Thread johnzenger
You want re.sub("(?s)", "", htmldata) Explanation: To make the dot match all characters, including newlines, you need to set the DOTALL flag. You can set the flag using the (?_) syntax, which is explained in section 4.2.1 of the Python Library Reference. A more readable way to do this is: obj

Re: What am I supposed to do with an egg?!

2006-12-19 Thread johnzenger
Type "sudo easy_install myeggfile.egg." If that gives you an error, then you don't have easy_install installed. Install it this way: sudo apt-get install python-setuptools On Dec 19, 3:44 pm, Morpheus <[EMAIL PROTECTED]> wrote: > On Windows I'm used to install packages by setup.py install. So d

Re: regexp

2006-12-19 Thread vertigo
Hello > On Tuesday 19 December 2006 13:15, vertigo wrote: >> Hello >> >> I need to use some regular expressions for more than one line. >> And i would like to use some modificators like: /m or /s in perl. >> For example: >> re.sub(".*","",data) >> >> will not cut out all javascript code if it's sp

Re: urllib.unquote and unicode

2006-12-19 Thread Martin v. Löwis
Duncan Booth schrieb: > The way that uri encoding is supposed to work is that first the input > string in unicode is encoded to UTF-8 and then each byte which is not in > the permitted range for characters is encoded as % followed by two hex > characters. Can you back up this claim ("is supposed

Re: When Closure get external variable's value?

2006-12-19 Thread Bruno Desthuilliers
Huayang Xia a écrit : > I'm confused. What is the definition of closure. > > I'm not sure if it's correct, I get the definition from wikipedia: > > "A closure typically comes about when one function is declared entirely > within the body of another, and the inner function refers to local > variab

Newbie: What are the rules wrt constructing PYDOC keywords

2006-12-19 Thread paulsendave
Still learning python (2.4) and have instructions that all of our python scripts should be SelfDoc'ing via pydoc standards. One thing that isn't clear to me is how pydoc searches for keywords. I believe that there might be certain rules for putting keywords together under the SYNOPSIS and search

Lisp/Python programmers (among others) wanted

2006-12-19 Thread Tech HR
Smart Charter Inc. is a dynamic new startup company whose goal is to revolutionize the charter jet industry. If you are looking for a stable 9-5 job, look elsewhere. If you are ready for a challenging ground-floor opportunity with significant upside potential you've come to the right place. We a

What am I supposed to do with an egg?!

2006-12-19 Thread Morpheus
On Windows I'm used to install packages by setup.py install. So did I with Fibranet nanothreads - a few seconds and it was installed. On Linux (ubuntu 6.06) all I could get at is an egg file. I found out that I have to exec easy_install, which didn't much help here (seems to me, at least - sorry,

Http server

2006-12-19 Thread Gert Cuykens
so far this works import cherrypy import os.path class Http: def index(self): f = open(os.path.join(os.path.dirname(__file__), '../htm/index.htm')) xml = f.read() f.close() return xml index.exposed = True cherrypy.tree.mount(Http()) if __name__ == '__ma

RE: Can a Tkinter GUI check for abort script:

2006-12-19 Thread Michael Yanowitz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of hg Sent: Tuesday, December 19, 2006 9:44 AM To: python-list@python.org Subject: Re: Can a Tkinter GUI check for abort script: Michael Yanowitz wrote: > Hello: > >I have successfully implemented a Tkinter

Re: Is htmlGen still alive?

2006-12-19 Thread Gabriel Genellina
At Monday 18/12/2006 17:37, [EMAIL PROTECTED] wrote: Does anybody know whether htmlGen, the Python-class library for generating HTML, is still being maintained? Or from where it can be downloaded? The Starship site where it used to be hosted is dead. *active* in what sense? HTML std doesn't ch

Re: tuple.index()

2006-12-19 Thread J. Clifford Dyer
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > "J. Clifford Dyer" <[EMAIL PROTECTED]> writes: > |> > |> On the contrary, I think that example fits perfectly with my definition > |> of homogenous. If there is no constraint on position, then what is the > |> position determinative of? Or

Re: regexp

2006-12-19 Thread vertigo
> vertigo wrote: >> I need to use some regular expressions for more than one line. >> And i would like to use some modificators like: /m or /s in perl. >> For example: >> re.sub(".*","",data) >> will not cut out all javascript code if it's spread on many lines. > > that won't cut out all javascr

Re: regexp

2006-12-19 Thread Jonathan Curran
On Tuesday 19 December 2006 13:15, vertigo wrote: > Hello > > I need to use some regular expressions for more than one line. > And i would like to use some modificators like: /m or /s in perl. > For example: > re.sub(".*","",data) > > will not cut out all javascript code if it's spread on many line

Re: Core dump revisited

2006-12-19 Thread Nick Craig-Wood
Sheldon <[EMAIL PROTECTED]> wrote: > Man. You are good. This is most insight I have had from anyone. :-) > I did initialize the arrays with PyObjects and today, after hours of > debugging and now with your insight, I think the problem lies here: Good! You need to release some python references

Re: When Closure get external variable's value?

2006-12-19 Thread Huayang Xia
I'm confused. What is the definition of closure. I'm not sure if it's correct, I get the definition from wikipedia: "A closure typically comes about when one function is declared entirely within the body of another, and the inner function refers to local variables of the outer function. At runtim

Re: regexp

2006-12-19 Thread Fredrik Lundh
vertigo wrote: > I need to use some regular expressions for more than one line. > And i would like to use some modificators like: /m or /s in perl. > For example: > re.sub(".*","",data) > > will not cut out all javascript code if it's spread on many lines. that won't cut out all javascript code p

regexp

2006-12-19 Thread vertigo
Hello I need to use some regular expressions for more than one line. And i would like to use some modificators like: /m or /s in perl. For example: re.sub(".*","",data) will not cut out all javascript code if it's spread on many lines. I could use something like /s from perl which treats . as all

Star-P Anyone?

2006-12-19 Thread MohF1
I was wondering if some power users of Python would be willing to pay money to benefit from doing a lot of their scientific/engineering/financial modeling and simulation from running their programs on high powered computing HPC. HPC would essentially mean that you run on a cluster or group of compu

Re: Core dump revisited

2006-12-19 Thread Duncan Booth
"Sheldon" <[EMAIL PROTECTED]> wrote: > > Duncan Booth skrev: > >> "Sheldon" <[EMAIL PROTECTED]> wrote: >> >> > I am new to this and copied this code from a colleague. So, it >> > corrupts the pointer. How do I do this properly? >> > >> Here is at least part of your problem: >> >> msgop = PyL

Re: Cpoying a PyList to a C string array

2006-12-19 Thread Klaas
Sheldon wrote: > The code below is a rookie attempt to copy a python list of strings to > a string array in C. It works to some extent but results in memory > problems when trying to free the C string array. Does anyone know how > to do this properly? You have numerous problems in this code. The

Re: tuple.index()

2006-12-19 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "J. Clifford Dyer" <[EMAIL PROTECTED]> writes: |> |> On the contrary, I think that example fits perfectly with my definition |> of homogenous. If there is no constraint on position, then what is the |> position determinative of? Order in the queue. Nothing more.

Re: python poetry?

2006-12-19 Thread Michael Spencer
BartlebyScrivener wrote: > Python pseudo code limericks anywhere? I wrote the following in response to Steve Holden's limerick challenge a couple of years ago: # run me or voice the alphanumeric tokens from itertools import repeat for feet in [3,3,2,2,3]: print " ".join("DA-DA-DUM"

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Jack Diederich
On Tue, Dec 19, 2006 at 03:14:51PM +0100, Christian Meesters wrote: > Hi, > > I'd like to hack a function which returns all possible permutations as lists > (or tuples) of two from a given list. So far, I came up with this solution, > but it turned out to be too slow for the given problem, because

Re: When Closure get external variable's value?

2006-12-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Huayang Xia wrote: > That is a really concise and precise answer. Thanks. > > So the object binding can only happen explicitly at the closure > declaration argument list(non-free variable). That's no declaration that's a definition and it happens at runtime! It's execute

[ANN] rest2web 0.5.1

2006-12-19 Thread Fuzzyman
`rest2web 0.5.1 `_ is now available. This is a minor feature enhancement release. * `Download rest2web-0.5.1.zip `_ * `Download rest2web-0.5.1.tar.gz

Re: tuple.index()

2006-12-19 Thread J. Clifford Dyer
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > "J. Clifford Dyer" <[EMAIL PROTECTED]> writes: > |> > |> How about: "A heterogenous sequence is one in which each element plays a > |> unique role, specific to its position in the sequence. A homogenous > |> sequence is one in which positio

Re: on PySol's popularity

2006-12-19 Thread skip
Harry> A plug for PySol. Harry> My wife is totally non-techno. She doesn't "get" the notions of Harry> windows, or minimize/maximize, or clicking on the icon down on Harry> the toolbar. My wife appears to be only slightly less non-techno than yours. Aside from mail and web brow

Re: Tkdnd--does anyone use it?

2006-12-19 Thread klappnase
Kevin Walzer schrieb: > Does anyone use the Tkdnd module that comes with Tkinter to allow > drag-and-drop of Tkinter widgets in your application? (Not the binary > extension that hooks into Xdnd and OLE-dnd on Windows.) I've looked at > the various documents for Tkdnd, and it looks somewhat compl

Re: Core dump revisited

2006-12-19 Thread Sheldon
Duncan Booth skrev: > "Sheldon" <[EMAIL PROTECTED]> wrote: > > > I am new to this and copied this code from a colleague. So, it > > corrupts the pointer. How do I do this properly? > > > Here is at least part of your problem: > > msgop = PyList_GetItem(work.msgobj, i); > work.msg_scenes[i

Re: New os.path.exists() behavior - bug or feature?

2006-12-19 Thread klappnase
Martin v. Löwis schrieb: > > Neither, nor. In both cases, the operating system is asked, and gives > this answer. However, in the Windows API, there is no "exists" function > (nor is there on Unix); instead, exists is implemented by calling > several underlying functions. The precise set of functi

wxPython and activex problem.

2006-12-19 Thread 一首诗
Hi all! Have u tried genaxmodule.py provided by wxPython to create a wrapper module for an activex control? For me, some times it works, but some times, it doesn't. - Traceback (most recent call last): File "genaxmodule.py", line 42, in ? main(s

Re: on PySol's popularity

2006-12-19 Thread Harry George
Fredrik Lundh <[EMAIL PROTECTED]> writes: > Tshepang Lekhonkhobe wrote: > > > On Python docs, on faq/installed.html, it's mentioned that PySol is > > the most common Python application. > > not really; that page says that installing PySol is a common way to > get a Python installation installed

Re: python script terminating

2006-12-19 Thread Fredrik Lundh
Aditya Vaish wrote: > I have a python script running on Debian sarge. It loops and walk > through a directory > > while 1: > > for dirn in os.listdir(buildpath): > > if os.path.exists(os.path.join(buildpath, dirn, 'pass')) and > dirn.find(build1) != -1: > > # ca

Portable apps

2006-12-19 Thread Andreas
Hi Group, I want to get into writing portable apps that can run solely off a USB stick, but I have a few problems. I'm originally a java/.net developer, but I don't want it to be a requirement that the host computer has .net or a jre installed. I also am not very fond of developing with VC++ *cry

Re: SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Fredrik Lundh
Ilias Lazaridis wrote: > How can one contribute? you can't. -- http://mail.python.org/mailman/listinfo/python-list

Re: When Closure get external variable's value?

2006-12-19 Thread Huayang Xia
That is a really concise and precise answer. Thanks. So the object binding can only happen explicitly at the closure declaration argument list(non-free variable). On Dec 19, 10:37 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Huayang Xia wrote: > > When does the closure get the value of the maxI

Re: SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Ilias Lazaridis
Ο/Η Diez B. Roggisch έγραψε: ... (several off-topics) Please control yourself. Ï/Ç metaperl: >>> TurboEntity was quite sweet. Supposedly a complete rewrite as a new >>> product is on its way though. Ilias Lazaridis: >>the first major problem of this rewrite: >>it happens 'silently' (non-public)

Re: Core dump revisited

2006-12-19 Thread Duncan Booth
"Sheldon" <[EMAIL PROTECTED]> wrote: > I am new to this and copied this code from a colleague. So, it > corrupts the pointer. How do I do this properly? > Here is at least part of your problem: msgop = PyList_GetItem(work.msgobj, i); work.msg_scenes[i] = PyString_AsString(msgop); pps

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Paul McGuire
"Christian Meesters" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'd like to hack a function which returns all possible permutations as > lists > (or tuples) of two from a given list. So far, I came up with this > solution, > but it turned out to be too slow for the giv

Re: python-hosting.com projects: dead?

2006-12-19 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > my svn repository and tickets again. I'm sure you can understand why I > > was dismayed by this and why, unfortunately, I'll never be comfortable > > trusting my data to them again. > > not really, but maybe I've just worked with computers and h

Re: python poetry?

2006-12-19 Thread Fredrik Lundh
BartlebyScrivener wrote: > First, can anybody recommend any other such books? And second is there > a repository of Python poetry, poems translated into Python, or > humorous Python pseudo code limericks anywhere? I'm making my way > through "The Larch," but if there's more elsewhere please point

Re: python poetry?

2006-12-19 Thread BartlebyScrivener
Bruno Desthuilliers wrote: > You of course already know . . . and "BOFH" (aka the > Bastard Operator From Hell') ? Didn't know this one. It's funny! Thanks rd -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Diez B. Roggisch
> I understand your elaborations. > > Possibly "sqlalchemy" should do the same, until it's fully functional > and do not 'frustrate users'. > > And "Turbogears", too. And Django, as it's still not fully functional > (mainly due to it's deficient ORM layer). > > Or all those projects remain open(

Cpoying a PyList to a C string array

2006-12-19 Thread Sheldon
Hi, The code below is a rookie attempt to copy a python list of strings to a string array in C. It works to some extent but results in memory problems when trying to free the C string array. Does anyone know how to do this properly? *** /*Re

Re: tuple.index()

2006-12-19 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "J. Clifford Dyer" <[EMAIL PROTECTED]> writes: |> |> How about: "A heterogenous sequence is one in which each element plays a |> unique role, specific to its position in the sequence. A homogenous |> sequence is one in which position is determinative of nothing |>

Reduced invective

2006-12-19 Thread BBands
My fat-fingered alter ego typed delete from iv where date > '2006-01-01'; instead of delete from iv where date > '2006-12-01'; leaving me with 50 tables to reload. :( estimated time to fix > several hours estimated invective dispensed during fix = classified Python to the rescue! import

Re: python poetry?

2006-12-19 Thread Bruno Desthuilliers
BartlebyScrivener a écrit : > I'm working on a book of technology and computer programming humor. > > First, can anybody recommend any other such books? You of course alreeady know "Tao of programming" and "BOFH" (aka the Bastard Operator From Hell') ? -- http://mail.python.org/mailman/listinf

Re: python-hosting.com projects: dead?

2006-12-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > my svn repository and tickets again. I'm sure you can understand why I > was dismayed by this and why, unfortunately, I'll never be comfortable > trusting my data to them again. not really, but maybe I've just worked with computers and human beings long enough not to t

SQLALCHEMY - Method to have the last word, by Michael Bayer

2006-12-19 Thread Ilias Lazaridis
[1] - Ο/Η metaperl: >>> TurboEntity was quite sweet. Supposedly a complete rewrite as a new >>> product is on its way though. Ilias Lazaridis: >>the first major problem of this rewrite: >>it happens 'silently' (non-public) Michael Bayer wrote within: http://groups.google.com/group/sqlalchemy/ms

Re: def index(self):

2006-12-19 Thread Bruno Desthuilliers
Gert Cuykens a écrit : >> FWIW, the first version raises an exception (unless of course the name >> 'index' is already bound in the enclosing scope). And the second won't >> probably work as expected with CherryPy. > > > > class HelloWorld: > def index(self): > return "Hello world!" > index.exp

Re: When Closure get external variable's value?

2006-12-19 Thread Fredrik Lundh
Huayang Xia wrote: > When does the closure get the value of the maxIndex in the following > code snippet? > > def testClosure(maxIndex) : > > def closureTest(): > return maxIndex > > maxIndex += 5 > > return closureTest() > >

Re: python-hosting.com projects: dead?

2006-12-19 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > have you tried mailing webfaction instead of ranting on the usenet? I did. I didn't get a reply within minutes (indeed not until this morning), so I posted a public message to try to find out if anyone knew what was going on -- and also to warn other people whose projects m

FW: Crash in PyImport_Import()

2006-12-19 Thread Geert Van Muylem
Hi, And everything works fine if I link with the shared version of python. The ldap extension works fine in the interpreter, as well as with embedded python. Does anyone knows why it seems to be needed that extension modules have to be linked against the shared version of python? Reg

Re: Core dump revisited

2006-12-19 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > Sheldon skrev: > > > Wonderful! Now I know how to used gdb with python. > > Good! > > > > The are results area posted below. Since I am new at this I could > > > used some help in interpreting the problem. What I do know is > > > th

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Anton Vredegoor
Gerard Flanagan wrote: > No claims with respect to speed, but the kslice function here: > > http://gflanagan.net/site/python/utils/sequtils/ > > will give the 'k-subsets' which then need to be permuted - > alternatively Google. Maybe the function below could then do these permutations. Ant

Re: tuple.index()

2006-12-19 Thread J. Clifford Dyer
James Stroud wrote: > Christoph Zwerschke wrote: >> "Inhomogenous" in some meaning of the word --> tuple > > I think that you have nailed it here. I don't think anyone on this list > is capable of giving a "concrete" (as you have put it) operational > definition of "inhomogenous". They will resort

  1   2   >