Re: Good Looking UI for a stand alone application

2006-12-18 Thread Vincent Delporte
On 17 Dec 2006 21:20:14 -0800, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >You could write it as a web app, with an executable which launches the >server and points a browser at it. Right, I was thinking of this too, but since the OP was talking of a fat app... >Python GUI work is a bit of a

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Fredrik Lundh
ronrsr wrote: > now, I can't do any string operations, I get the error msg: > > descriptor 'lower' requires a 'str' object but received a 'unicode' > args = ("descriptor 'lower' requires a 'str' object but received > a 'unicode'",) what's a "string operation" in this context? are you tryi

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Fredrik Lundh
ronrsr wrote: > querystring = "update zingers set keywords = '%s', citation = > '%s', quotation = %s' where zid = %d" % > (keywords,citation,quotation,zid) that's not a good way to pass strings to the database. for the right way to do this, see: http://effbot.org/pyfaq/how-do-i-e

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Leo Kislov
ronrsr wrote: > > > > > Try putting "use_unicode=True" in the MySQLdb "connect" call. > > tried that, and also added charset="utf8" - > > now, I can't do any string operations, I get the error msg: > > descriptor 'lower' requires a 'str' object but received a 'unicode' > args = ("descript

Re: trees

2006-12-18 Thread Raymond Hettinger
vertigo wrote: > What library/functions/classes could i use to create trees ? Start with random.seed, login as root, use svn to download the trunk and branches, when Spring arrives, the leaves will fill-in ;-) Or just use lists as Fredrik suggested. Or look at an example in the cookbook: http://

undefined symbol: libxml_xmlDocPtrWrap

2006-12-18 Thread Christian Wenz
Hello, I try to install "listen" on my amd64-gentoo-box. The programm tries to import the gst-package and throws the following trace: Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ? from _gst

Re: merits of Lisp vs Python

2006-12-18 Thread Bill Atkins
This is not a response to any particular post, but rather to the general argument that macros are not as useful as we Lispers claim. Here is a fairly complete GUI RSS reader in 90 lines of Lisp (the GUI code itself is 90 lines, but it makes use of some RSS reading/writing code I had laying around

HTTP or alternative upload for large files

2006-12-18 Thread Jacob Mathew
Hay Robin.. I am Jacob Mathew.. Doing some research in large file uploads for my project. I got your matured skills and ability to do programs for upload huge files. In fact I am a kid in programming, I cannot think to write such a god program. Will you able to share your uploading script with

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Peter Decker
On 12/17/06, Luc Heinrich <[EMAIL PROTECTED]> wrote: > > My requirement is that the application needs to look as good on Windows as > > on the Apple Mac > > Crossplatform GUIs are a myth, you *always* end up with a lowest common > denominator (aka Windows) which makes your application look like cr

Re: first and last index as in matlab

2006-12-18 Thread Evan
Thanks for all the replies, it's much clearer now. -Evan -- http://mail.python.org/mailman/listinfo/python-list

Re: tuple.index()

2006-12-18 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, greg <[EMAIL PROTECTED]> writes: |> Roy Smith wrote: |> |> > The struct does lookup by name, the tuple is inherently index based. |> |> I was trying to help people understand the distinction |> we're talking about by showing an example of the same |> distinction i

Re: Roundtrip SQL data especially datetime

2006-12-18 Thread GHUM
> One side effect of this being third party code is that hosting > services may not have it available, even when they have both Python > and MySQL up. This is never a problem with Perl or PHP, so that's > a negative for Python. I for one think it is a good thing to not have MySQL adapters int

Re: merits of Lisp vs Python

2006-12-18 Thread Bruno Desthuilliers
Paul Rubin a écrit : > "Rob Thorpe" <[EMAIL PROTECTED]> writes: > >>Once you can do the above then you can phrase programs entirely in >>terms of composition of functions, which is what functional programming >>is about. >> >>Getting good performance though is problematic without being able to >>e

Re: merits of Lisp vs Python

2006-12-18 Thread Bruno Desthuilliers
Mathias Panzenboeck a écrit : > Bruno Desthuilliers wrote: > >>Mathias Panzenboeck a écrit : >> >>>Rob Thorpe wrote: >>> >>> Mathias Panzenboeck wrote: >Mark Tarver wrote: > > >>How do you compare Python to Lisp? What specific advantages do you >>think that one h

Re: merits of Lisp vs Python

2006-12-18 Thread Bruno Desthuilliers
Kaz Kylheku a écrit : > Bruno Desthuilliers wrote: > >>André Thieme a écrit : >> >>>Bruno Desthuilliers schrieb: >>> >> >>(snip) >> Both are highly dynamic. Neither are declarative. >>> >>> >>>Well, Lisp does support some declarative features in the ansi standard. >> >>If you go that way, ther

Re: Metaclass uses?

2006-12-18 Thread Michele Simionato
Nathan Harmston wrote: > Hi, > > Recently I posted a question about the factory pattern in python. I ve > implemented this following one of the ideas posted. After some reading > I ve seem a lot of Aspect Oriented Programming mentioned but I m not > really sure what it is. > > Can anyone help me un

Re: import

2006-12-18 Thread Bruno Desthuilliers
Gert Cuykens a écrit : > I would like to lauch a server from outside the side package directory > how do i specify a path with import http://docs.python.org/tut/node8.html#SECTION00811 (snip) > if __name__ == '__main__': # ??? dont know what is this for When a module is used a

Re: trees

2006-12-18 Thread Bruno Desthuilliers
Raymond Hettinger a écrit : > vertigo wrote: > >>What library/functions/classes could i use to create trees ? > > > Start with random.seed, login as root, use svn to download the trunk > and branches, when Spring arrives, the leaves will fill-in ;-) keyboard !-) -- http://mail.python.org/mailm

Re: Class and instance question

2006-12-18 Thread Bruno Desthuilliers
Marco Wahl a écrit : (snip) > The __new__ method should return the class. s/class/instance/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why there isn't a sort method for array ?

2006-12-18 Thread James Stroud
John Machin wrote: > Tim Roberts wrote: >> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >>> It seems that an array acts like an list very much, except it doesn't >>> have a method sort. >> What do you mean by "array"? There is no such beast in the Python >> language. Do you mean the library mod

Re: Dictionary, iterate & update objects

2006-12-18 Thread Bruno Desthuilliers
jansenh a écrit : > hi comp.lang.python. > > I need some newbe advice on idiomatic use of Python dictionaries. > > I have service with a dictionary which holds a bunch of objects as > values, and an ID as key to each object. Then I want to change an > objects state based on its key. class MyObj(

Re: merits of Lisp vs Python

2006-12-18 Thread André Thieme
Paul Rubin schrieb: > GC also gets rid of programs. There are programs you can write in C > but not in Lisp, like device drivers that poke specific machine > addresses. You are talking about an ANSI Common Lisp implementation. But nothing stops a vendor to deliver its CL with libs that support t

Re: parsing a dictionary from a string

2006-12-18 Thread Benjamin Georgi
Fredrik Lundh wrote: > Benjamin Georgi wrote: > >> I could use some help extracting the keys/values of a list of >> dictionaries from a string that is just the str() representation of the >> list (the problem is related to some flat file format I'm using for file >> IO). >> >> Example: >> >>>

Re: merits of Lisp vs Python

2006-12-18 Thread Rob Warnock
<[EMAIL PROTECTED]> wrote: +--- | Paul Rubin wrote: | > [...] There are programs you can write in C but not in Lisp, | > like device drivers that poke specific machine addresses. | | I should assume you meant Common Lisp, but there isn't really any | reason you couldn't | (poke d

Re: Metaclass uses?

2006-12-18 Thread Bruno Desthuilliers
Nathan Harmston a écrit : (snip) > Also is there anymore interesting OO stuff that Python has apart from Java. Quite a lot. Everything (well, except statements and expressions...) in Python is an object, including classes, modules and functions, and Python objects are really 'dynamic', ie you ca

Re: Core dump revisited

2006-12-18 Thread Gabriel Genellina
On 17 dic, 07:01, "Sheldon" <[EMAIL PROTECTED]> wrote: > I have a python script that uses a C extention. I keep getting a > recurring problem that causes a core dump a few lines after the C > extention return data back tp python. I tried using pbd and gdb but I Most probably the error is inside t

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

2006-12-18 Thread Martin v. Löwis
klappnase schrieb: > When I insert a floppy into A: os.path.exists('A:\\') will return True > on Python-2.5, too. > Does anyone know, is this inconsistent behavior a bug or a new feature? Neither, nor. In both cases, the operating system is asked, and gives this answer. However, in the Windows API

Re: Need Simple Way To Determine If File Is Executable

2006-12-18 Thread Gabriel Genellina
On 17 dic, 19:21, "Roger Upole" <[EMAIL PROTECTED]> wrote: > >> > os.stat(selected)[ST_MODE] & (S_IXUSR|S_IXGRP|S_IXOTH > > >>This will tell you that "x.exe" is executable, even if "x.exe" contains > >> nothing but zeros. > > > Isn't the same with any other recipe, portable or not? Unless the OS

connecting webservers through HTTP port using python

2006-12-18 Thread pradeep kumar
hii iam working on socket programming, i've to connect webservers through HTTP port and send/receive data.. so currently i'm installed apache server and trying to connect that server using python. so any tell me how to connect the apache server by python code. give suggestions.. -- http://mail.py

Can a Tkinter GUI check for abort script:

2006-12-18 Thread Michael Yanowitz
Hello: I have successfully implemented a Tkinter GUI which has this (simplified here for explanation): +-+ | filename: [./test3.py] | | | | [Run Script] | +---

How to replace a comma

2006-12-18 Thread Lad
In a text I need to add a blank(space) after a comma but only if there was no blank(space) after the comman If there was a blank(space), no change is made. I think it could be a task for regular expression but can not figure out the correct regular expression. Can anyone help, please? Thank you L.

creating generic class

2006-12-18 Thread Divya Prakash
Hi, I want to create a generic class to convert ". java " file into xml file (validated against xsd / dtd). What is the best approach to do this with jython or python ? Regards Divya -- http://mail.python.org/mailman/listinfo/python

Re: merits of Lisp vs Python

2006-12-18 Thread Paul Rubin
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Strictly speaking, only first-class functions are required, and > tail-recursion optimisation is only an implentation detail. Now it's > obvious that when it comes to real-life-size programs, this is a > *very* important detail !-) I don't buy this

Re: How to replace a comma

2006-12-18 Thread Peter Otten
Lad wrote: > In a text I need to > add a blank(space) after a comma but only if there was no blank(space) > after the comman > If there was a blank(space), no change is made. >>> s = "alpha, beta,gamma, delta" >>> ", ".join(t.replace(",", ", ") for t in s.split(", ")) 'alpha, beta, gamma, delta

Re: How to replace a comma

2006-12-18 Thread Jon Clements
Lad wrote: > In a text I need to > add a blank(space) after a comma but only if there was no blank(space) > after the comman > If there was a blank(space), no change is made. > > I think it could be a task for regular expression but can not figure > out the correct regular expression. > Can anyon

How to get a substring with variable indices

2006-12-18 Thread Станислав Ягло
Hello all! I have a string named text. I need to extract a substring from it starting by variable 's' and ending by 'e'. text[s:e] generates the following error: TypeError: slice indices must be integers or None How to be? :) Regards, Stanislav Yaglo. -- http://mail.python.org/mailman/l

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Chris Mellon
On 12/17/06, Christophe Cavalaria <[EMAIL PROTECTED]> wrote: > Sandra-24 wrote: > > > On 12/16/06, The Night Blogger <[EMAIL PROTECTED]> wrote: > >> Can someone recommend me a good API for writing a sexy looking (Rich UI > >> like WinForms) shrink wrap application > > > >> My requirement is that th

Re: convert from date string to epoch

2006-12-18 Thread Stefan Antonelli
Amit Khemka gmail.com> writes: > > Check out timegm function in calendar module. The following function > converts "mm/dd/" formats into epoch value, you can hack it for > your date formats. > > def convertToEpoch(date): > tup = map(int,date.split('/')) > l = (tup[2], tup[0

Re: How to get a substring with variable indices

2006-12-18 Thread Paul Rubin
ÁâÐÝØáÛÐÒ ÏÓÛÞ <[EMAIL PROTECTED]> writes: > text[s:e] generates the following error: > TypeError: slice indices must be integers or None > > How to be? :) s and e both have to be integers or None. Try printing them out just before your slice to see if their values are reasonable. >>> s

Re: How to get a substring with variable indices

2006-12-18 Thread Tim Chase
> I have a string named text. I need to extract a substring from it > starting by variable 's' and ending by 'e'. > > text[s:e] generates the following error: > > TypeError: slice indices must be integers or None Your syntax is correct...the error you get back is the clue: either "s" or "e

Re: How to replace a comma

2006-12-18 Thread Hendrik van Rooyen
From: "Lad" <[EMAIL PROTECTED]> wrote: > In a text I need to > add a blank(space) after a comma but only if there was no blank(space) > after the comman > If there was a blank(space), no change is made. > > I think it could be a task for regular expression but can not figure > out the correct re

Re: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Hendrik van Rooyen
"Michael Yanowitz" <[EMAIL PROTECTED]> Wrote: > Hello: > >I have successfully implemented a Tkinter GUI which has > this (simplified here for explanation): > +-+ > | filename: [./test3.py] | > | | > | [Run

Re: How to get a substring with variable indices

2006-12-18 Thread Станислав Ягло
Tim Chase wrotes: >> I have a string named text. I need to extract a substring from it >> starting by variable 's' and ending by 'e'. >> >> text[s:e] generates the following error: >> >> TypeError: slice indices must be integers or None > > Your syntax is correct...the error you get back is th

Shed Skin - Does it break any Python assumptions?

2006-12-18 Thread skip
I just noticed the announcement of Shed Skin 0.0.16 on Freshmeat with this (partial) change announcement: Changes: frozenset was added. time.sleep now works on Win32. Given Python's highly dynamic nature it's unclear to me how Shed Skin could know enough about the semantics of time.sleep to k

Re: Shed Skin - Does it break any Python assumptions?

2006-12-18 Thread Jean-Paul Calderone
On Mon, 18 Dec 2006 08:07:59 -0600, [EMAIL PROTECTED] wrote: >I just noticed the announcement of Shed Skin 0.0.16 on Freshmeat with this >(partial) change announcement: > >Changes: frozenset was added. time.sleep now works on Win32. > >Given Python's highly dynamic nature it's unclear to me how

Re: How to replace a comma

2006-12-18 Thread Lad
Thank you for ALL for help. Hendrik, your solution works great but what is `_` in _.replace(',',', ') for? Thank you La. > re's are a pain. Do this instead: > > >>> s = "hello, goodbye,boo" > >>> s.replace(', ',',') > 'hello,goodbye,boo' > >>> _.replace(',',', ') > 'hello, goodbye, boo' > >>>

Re: How to replace a comma

2006-12-18 Thread Nick Craig-Wood
Lad <[EMAIL PROTECTED]> wrote: > In a text I need to add a blank(space) after a comma but only if > there was no blank(space) after the comman If there was a > blank(space), no change is made. > > I think it could be a task for regular expression but can not > figure out the correct regular e

Re: Core dump revisited

2006-12-18 Thread Nick Craig-Wood
Sheldon <[EMAIL PROTECTED]> wrote: > gdb msgppscomp.py core.3203 Run gdb python Then type run msgppscomp.py at the gdb prompt. When it crashes, type "bt" for a back trace. This will pinpoint exactly where it crashes. Hopefully that will make things clearer. If not post the output. --

Script to upload Files via http/cgi

2006-12-18 Thread Richard Konrad
Hi folks! Does anyone know about a python-script to upload Files via http/cgi? Thanks! RK -- http://mail.python.org/mailman/listinfo/python-list

Strange error with getattr() function

2006-12-18 Thread Hole
Hi There! I'm trying to use Zope and the product OpenFlow. I got the following error while I was using the built-in function getattr() to retrieve an OpenFlow object: attribute name must be string Actually, I surely pass a string as attribute name to getattr() The code: #following instructio

Re: How to replace a comma

2006-12-18 Thread Duncan Booth
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > From: "Lad" <[EMAIL PROTECTED]> wrote: > > >> In a text I need to >> add a blank(space) after a comma but only if there was no blank(space) >> after the comman >> If there was a blank(space), no change is made. >> >> I think it could be a task f

Re: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Mohammad Tayseer
To view a button & hide the other, call .pack_forget() on the button you want to hide & pack() on the button you want to show test3.py should contains a main() function that returns the new window. if you press 'Abort script' button you should call new_window.destroy(), pack_forget() the curren

Re: How to replace a comma

2006-12-18 Thread Jussi Salmela
Lad kirjoitti: > > Thank you for ALL for help. > Hendrik, > your solution works great but > what is `_` in > _.replace(',',', ') > > for? When you are trying things out in the Python shell IDLE, _ is a shorthand way to use the last value printed by IDLE. Thus when s.replace(', ',',') p

Re: Over my head with descriptors

2006-12-18 Thread Sarcastic Zombie
> > Is there a reason you don't just use __init__ instead of __new__, and use > > "self.age" and "self.weight" and so on?I was asking myself the same thing... > > Chris "A lack of understanding," he answered sheepishly. There are attributes (ie, question._qtext) that I do want to be the same for

Re: How to replace a comma

2006-12-18 Thread Lad
Nick Craig-Wood wrote: > Lad <[EMAIL PROTECTED]> wrote: > > In a text I need to add a blank(space) after a comma but only if > > there was no blank(space) after the comman If there was a > > blank(space), no change is made. > > > > I think it could be a task for regular expression but can not

RE: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Michael Yanowitz
Thank you (and Thanks to Hendrik). Both good ideas. I will need to do those or something similar too. But what I really want to know is what I need to do when pressing the "Run Script" button, so that I 'return' to the GUI every once in a while, like every 100 milliseconds to check if the "Abort

Windows Authetication vs seperate process

2006-12-18 Thread imageguy1206
I was wondering of someone could steer me in the right direction. We have a package that we would like to "secure" so that only specific individuals can access specific portions of the application. Our wxPython application will revolve around updating a central database with information submitted

Re: Strange error with getattr() function

2006-12-18 Thread Hole
Hole ha scritto: > Hi There! > > I'm trying to use Zope and the product OpenFlow. > > I got the following error while I was using the built-in function > getattr() to retrieve an OpenFlow object: > > attribute name must be string > > > Actually, I surely pass a string as attribute name to getattr

Re: Is there a way to push data into Ical from Python ?

2006-12-18 Thread has
dwhall wrote: > One way would be to use > Python's tie-ins to Applescript_ and apple events (AE). As you will > read, this support isn't as strong as it used to be. What gave you that impression, if you don't mind my asking? It's true that Python's built-in application scripting support (aetool

Re: Need Simple Way To Determine If File Is Executable

2006-12-18 Thread Tim Daneliuk
Gabriel Genellina wrote: > On 17 dic, 19:21, "Roger Upole" <[EMAIL PROTECTED]> wrote: > > os.stat(selected)[ST_MODE] & (S_IXUSR|S_IXGRP|S_IXOTH This will tell you that "x.exe" is executable, even if "x.exe" contains nothing but zeros. >>> Isn't the same with any other recipe, porta

Re: Roundtrip SQL data especially datetime

2006-12-18 Thread John Nagle
GHUM wrote: >>One side effect of this being third party code is that hosting >>services may not have it available, even when they have both Python >>and MySQL up. This is never a problem with Perl or PHP, so that's >>a negative for Python. > > > I for one think it is a good thing to not have

Re: Shed Skin - Does it break any Python assumptions?

2006-12-18 Thread bearophileHUGS
Jean-Paul Calderone: > So yes, it seems that what ShedSkin supports is pretty distant from what > a seasoned Python developer might expect, aside from syntactic constructs. At the moment SS doesn't allow to change the type of a variable during its lifetime, but SS is a moving target, maybe in the

Re: Is there a way to push data into Ical from Python ?

2006-12-18 Thread Philip Austin
"The Night Blogger" <[EMAIL PROTECTED]> writes: > Is there a way to pull & push data into (Apple Mac OS X Calendar) Ical from > Python ? > see: http://vobject.skyhouseconsulting.com/ -- regards, Phil -- http://mail.python.org/mailman/listinfo/python-list

Re: convert from date string to epoch

2006-12-18 Thread John Machin
Stefan Antonelli wrote: > Amit Khemka gmail.com> writes: > > > > Check out timegm function in calendar module. The following function > > converts "mm/dd/" formats into epoch value, you can hack it for > > your date formats. > > > > def convertToEpoch(date): > > tup = map(int,date.sp

Re: merits of Lisp vs Python

2006-12-18 Thread jayessay
Paul Rubin writes: > [EMAIL PROTECTED] writes: > > I should assume you meant Common Lisp, but there isn't really any > > reason you couldn't > > > > (poke destination (peek source)) > > That breaks the reliability of GC. I'd say you're no longer writing > in Lisp

REPORT

2006-12-18 Thread mskelton
*** A virus (WORM_MYDOOM.GEN) was detected in the file (letter.zip/letter.html .exe). Action taken = remove ***-*** Message could not be delivere

Re: Need Simple Way To Determine If File Is Executable

2006-12-18 Thread Gabriel Genellina
At Monday 18/12/2006 13:41, Tim Daneliuk wrote: I was working on a new release and wanted to add file associations to it. That is, if the user selected a file and double clicked or pressed Enter, I wanted the following behavior (in the following steps, "type" means nothing more than "a file who

Re: connecting webservers through HTTP port using python

2006-12-18 Thread Gabriel Genellina
At Monday 18/12/2006 09:28, pradeep kumar wrote: hii iam working on socket programming, i've to connect webservers through HTTP port and send/receive data.. so currently i'm installed apache server and trying to connect that server using python. so any tell me how to connect the apache server

Re: connecting webservers through HTTP port using python

2006-12-18 Thread Jonathan Curran
On Monday 18 December 2006 06:28, pradeep kumar wrote: > hii iam working on socket programming, > i've to connect webservers through HTTP port and send/receive data.. > so currently i'm installed apache server and trying to connect that server > using python. > so any tell me how to connect the apa

Re: Script to upload Files via http/cgi

2006-12-18 Thread Gabriel Genellina
At Monday 18/12/2006 12:30, Richard Konrad wrote: Does anyone know about a python-script to upload Files via http/cgi? See the urllib2 module. -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y ant

Re: Strange error with getattr() function

2006-12-18 Thread Gabriel Genellina
At Monday 18/12/2006 12:33, Hole wrote: I'm trying to use Zope and the product OpenFlow. Try posting in the Zope list, you surely will have more responses. I got the following error while I was using the built-in function getattr() to retrieve an OpenFlow object: attribute name must be stri

psp 2 game list

2006-12-18 Thread Charles Bishop
could you send me a list of games you have __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange error with getattr() function

2006-12-18 Thread Gabriel Genellina
At Monday 18/12/2006 13:25, Hole wrote: > At this point, I got the error: attribute name must be string I'm wondering if the exception is raised in a hidden function and not in the explicit call to getattr(). How can I view the traceback in a script running in zope?? (Which Zope version?) If

Re: Dictionary, iterate & update objects

2006-12-18 Thread Carl Banks
Dennis Lee Bieber wrote: > On 16 Dec 2006 14:49:19 -0800, "jansenh" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > Yes. > > [... the temp object is by ref, and any manipulation of the temp object > > is to the object itself..? It really simplifies my first attempt] > > >

Re: Windows Authetication vs seperate process

2006-12-18 Thread Gabriel Genellina
At Monday 18/12/2006 13:24, [EMAIL PROTECTED] wrote: With several packages I have seen options to "Use Windows Authentication", which seems to mean that "If the user has authenticated and signed onto Windows, then our application will use their windows userid and we will just focus on the the ta

Re: Need Simple Way To Determine If File Is Executable

2006-12-18 Thread Tim Daneliuk
Gabriel Genellina wrote: > At Monday 18/12/2006 13:41, Tim Daneliuk wrote: > >> I was working on a new release and wanted to add file associations >> to it. That is, if the user selected a file and double clicked or >> pressed Enter, I wanted the following behavior (in the following >> steps, "ty

Re: trees

2006-12-18 Thread Martin Manns
John Nagle wrote: >SpeedTree, of course. > > http://www.speedtree.com > >They have great downloadable demos. And how do you distribute the code in a python program? Is there a wrapper for an available static library or do I have to compile the speedtree source when running the pytho

Python-URL! - weekly Python news and links (Dec 18)

2006-12-18 Thread Paul Boddie
QOTW: "c.l.python is just a small speck at the outer parts of the python universe. most python programmers don't even read this newsgroup, except, perhaps, when they stumble upon it via a search engine." -- Fredrik Lundh (on comp.lang.python, prompting the editor to offer greetings to those of you

SQLObject 0.8.0b1

2006-12-18 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.8.0b1 release of SQLObject. This is the first beta of the new branch. Taking into account that it is a result of rather large job the beta period will be prolonged. Meanwhile the stable 0.7 branch will be maintained, and there will be at least 0.7.3 release.

Re: Windows Authetication vs seperate process

2006-12-18 Thread Jonathan Curran
On Monday 18 December 2006 10:24, [EMAIL PROTECTED] wrote: > I was wondering of someone could steer me in the right direction. > > We have a package that we would like to "secure" so that only specific > individuals can access specific portions of the application. Our > wxPython application will r

def index(self):

2006-12-18 Thread Gert Cuykens
Is there a difference between class HelloWorld: def index(self): index.exposed = True return "Hello world!" and class HelloWorld: def index(self): self.exposed = True return "Hello world!" -- http://mail.python.org/mailman/listinfo/python-list

Re: writing serial port data to the gzip file

2006-12-18 Thread jim-on-linux
If someone hasn't already commented, Aside from any other problems, the file you are trying to write to is (opened)?? in the "w" mode. Every time a file is opened in the 'w' mode, everything in the file is deleted. If you open a file in the 'a' mode, then everything in the file is left un

Re: Python-URL! - weekly Python news and links (Dec 18)

2006-12-18 Thread Kay Schluehr
Paul Boddie wrote: > Meanwhile, the EuroPython planners get ahead of themselves, thinking about > conference venues as far in the future as 2010, if not 20010! Python 20010. It was a nice conference although a bit lame on the first day. My favourite talks were: Trevor Stent: "Whitespace

Re: merits of Lisp vs Python

2006-12-18 Thread Bruno Desthuilliers
Paul Rubin a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > >>Strictly speaking, only first-class functions are required, and >>tail-recursion optimisation is only an implentation detail. Now it's >>obvious that when it comes to real-life-size programs, this is a >>*very* important de

When Closure get external variable's value?

2006-12-18 Thread Huayang Xia
What will the following piece of code print? (10 or 15) def testClosure(maxIndex) : def closureTest(): return maxIndex maxIndex += 5 return closureTest() print testClosure(10) My question is when the closure function gets val

Re: Is there a way to push data into Ical from Python ?

2006-12-18 Thread Max M
has skrev: > dwhall wrote: > >> One way would be to use >> Python's tie-ins to Applescript_ and apple events (AE). As you will >> read, this support isn't as strong as it used to be. > > What gave you that impression, if you don't mind my asking? http://www.google.dk/search?q=python+icalendar

Re: Core dump revisited

2006-12-18 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > gdb msgppscomp.py core.3203 > > Run > > gdb python > > Then type > > run msgppscomp.py > > at the gdb prompt. > > When it crashes, type "bt" for a back trace. This will pinpoint > exactly where it crashes. > > Hopefully that wi

Is htmlGen still alive?

2006-12-18 Thread kgmuller
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. Thanks for your help! Klaus Muller -- http://mail.python.org/mailman/listinfo/python-list

Re: When Closure get external variable's value?

2006-12-18 Thread Huayang Xia
It will print 15. The closure gets the value at run time. Could we treat closure as part of the external function and it shares the local variable with its holder function? -- http://mail.python.org/mailman/listinfo/python-list

Re: skip last line in loops

2006-12-18 Thread tobiah
> See the documentation for xreadlines. > > James Hmm... This method returns the same thing as iter(f). New in version 2.1. Deprecated since release 2.3. Use "for line in file" instead. -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinf

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Luc Heinrich
Peter Decker <[EMAIL PROTECTED]> wrote: > You're full of it. I routinely write GUI apps in Dabo for both Windows > and Linux users, and they look just fine on both platforms. Oh, I'm sure you do. Now go try to run one of your Dabo apps on a Mac and see how it looks/feels... :> Here's a hint dire

Re: def index(self):

2006-12-18 Thread Jussi Salmela
Gert Cuykens kirjoitti: > Is there a difference between > > > class HelloWorld: > def index(self): > index.exposed = True > return "Hello world!" > > > and > > > class HelloWorld: > def index(self): > self.exposed = True > return "Hello world!" > The resident experts seemingly being abs

Re: def index(self):

2006-12-18 Thread Chris Lambacher
On Mon, Dec 18, 2006 at 08:40:13PM +0100, Gert Cuykens wrote: > Is there a difference between Yes. The first one causes an exception and the second one doesn't. > > > class HelloWorld: > def index(self): > index.exposed = True index is not defined. HelloWorld.index is and self.index is, but in

Re: def index(self):

2006-12-18 Thread Bruno Desthuilliers
Gert Cuykens a écrit : > Is there a difference between > > > class HelloWorld: > def index(self): > index.exposed = True > return "Hello world!" > > > and > > > class HelloWorld: > def index(self): > self.exposed = True > return "Hello world!" > Ask yourself what are the names 'index' a

Re: sha, PyCrypto, SHA-256

2006-12-18 Thread Klaas
Dennis Benzinger wrote: > > Python 2.5 comes with SHA-256 in the hashlib module. > So you could install Python 2.5 instead of the PyCrypto module. You can download the python2.5 hashlib module for use with python2.4 -MIke -- http://mail.python.org/mailman/listinfo/python-list

Re: Core dump revisited

2006-12-18 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > gdb msgppscomp.py core.3203 > > Run > > gdb python > > Then type > > run msgppscomp.py > > at the gdb prompt. > > When it crashes, type "bt" for a back trace. This will pinpoint > exactly where it crashes. > > Hopefully that wi

pyExcelerator question

2006-12-18 Thread Gerry
I'd like to word wrap some cells, but not others, in an Excel spreadsheet, using pyExcelerator and Excel 2003, SP1, under XP. The code below creates the spreadsheet, but both cells are word-wrapped. As far as I can tell, the second call to XFStyle() overwrites a GLOBAL wrap setting, and affects

Re: When Closure get external variable's value?

2006-12-18 Thread Jussi Salmela
Huayang Xia kirjoitti: > It will print 15. The closure gets the value at run time. > > Could we treat closure as part of the external function and it shares > the local variable with its holder function? > I don't quite get what you are trying to tell us but if you think that in your example co

Crash in PyImport_Import()

2006-12-18 Thread Geert Van Muylem
Hi, The following script works fine when I call it from the python interpreter but not when I call it from a c application (embedded python) It crashes in the PyImport_Import() import ldap import distutils.sysconfig def TestInit(): l = ldap.open("192.168.1.2") l.simple_bind_s("","

Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
Maybe I am missing something. Expect data is comming continually to the serial port for the period say 10min. (say form the GPS), than it stops for 1 minute and so on over and over. I would like to log such a data to the different gzip files. My example was written just for the simplicity (I was tr

  1   2   >