should I distribute .pyc files?

2006-12-18 Thread akbar
Hi, I am creating not-so-important opensource application written in python for Linux. I have two files python source in src directory, named blabla1.py and blabla2.py. There are byte compiled files too, named blabla1.pyc and blabla2.pyc. Should I distribute these files (pyc files) to users? If I

trouble getting google through urllib

2006-12-18 Thread Dr. Locke Z2A
So I'm writing a bot in python that will be able to do all kinds of weird shit. One of those weird shit is the ability to translate text from one language to another, which I figured I'd use google translate to do. Here is the section for translation that I'm having trouble with: elif(line[abuinde

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Luc Heinrich
Peter Decker <[EMAIL PROTECTED]> wrote: > I don't have a Mac, although I would certainly like one. But one of > the two authors of Dabo is a Mac user, and says that he does all his > development on a Mac, and then tests it on the other platforms. Look > at the screencasts on the Dabo site - most o

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Luc Heinrich
Paul McNett <[EMAIL PROTECTED]> wrote: > It looks/feels like a native app on OS X. I'm sorry, but the screenshots I'm seeing on the Dabo website all look like ugly Windows ports (when they don't look like straight X11 crap). I can't comment on the feel of course, but I wouldn't hold my breath. I'

Re: How would I create an class with a "Person.Address.City" property?

2006-12-18 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Jamie J. Begin wrote: > Let's say I wanted to create an object that simply outputted something > like this: > import employees person = employee("joe") # Get Joe's employment file print employee.Title # What does Joe do? > Developer print person.Address

How would I create an class with a "Person.Address.City" property?

2006-12-18 Thread Jamie J. Begin
I'm very new to the world of Python and am trying to wrap my head around it's OOP model. Much of my OOP experience comes from VB.Net, which is very different. Let's say I wanted to create an object that simply outputted something like this: >>> import employees >>> person = employee("joe") # Get

Re: regular expression

2006-12-18 Thread Paddy
Asper Faner wrote: > I seem to always have hard time understaing how this regular expression > works, especially how on earth do people bring it up as part of > computer programming language. Natural language processing seems not > enough to explain by the way. Why no eliminate it ? If you try to

RE:

2006-12-18 Thread Divya Prakash
Hi I don't know how to implement these API's .When I use the method "Parse (file object) " it gives error. So, I m blank how to implement it in order to get all the info of java file and thn represent them in xml format.. Regards Divya -Original Message- F

Re: textwrap.dedent replaces tabs?

2006-12-18 Thread Tom Plunket
Frederic Rentsch wrote: > > Well, there is that small problem that there are leading tabs that I > > want stripped. I guess I could manually replace all tabs with eight > > spaces (as opposed to 'correct' tab stops), and then replace them when > > done, but it's probably just as easy to write a n

Script Error

2006-12-18 Thread Forced_Ambitions
Hi Guys, I am facing a problem with a script that i had written to automate opening a website and signing on to it. It was running fine for a long time but all of a sudden it has stopped progressing beyond opening the URL. I ran the code line by line on the pythonwin's IDE and it ran fine but when

Re: textwrap.dedent replaces tabs?

2006-12-18 Thread Tom Plunket
Peter Otten wrote: > > I guess I could manually replace all tabs with eight > > spaces (as opposed to 'correct' tab stops), and then replace them when > > done, but it's probably just as easy to write a non-destructive dedent. > > You mean, as easy as > > >>> "\talpha\tbeta\t".expandtabs() > '

Class property with value and class

2006-12-18 Thread manstey
Hi, 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? e.g. If ClassB has two properties, name and address: ClassA.xx=10 ClassA.xx.name = 'John' ClassA.xx.address = 'Sydn

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

2006-12-18 Thread Hendrik van Rooyen
"Kay Schluehr" <[EMAIL PROTECTED]> wrote: > 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 >

Re: Can a Tkinter GUI check for abort script:

2006-12-18 Thread Hendrik van Rooyen
Michael Yanowitz top posted: > Presently what happens is that the script takes over and all the buttons on the GUI disappear >as the GUI is not given any cpu time to refresh or check if any activity in the dialog. Yuk! you may have to run the script in a thread then, to preserve the GUI main

Re: How to replace a comma

2006-12-18 Thread Hendrik van Rooyen
"Lad" <[EMAIL PROTECTED]> top posted: > > re's are a pain. Do this instead: > > > > >>> s = "hello, goodbye,boo" > > >>> s.replace(', ',',') > > 'hello,goodbye,boo' > > >>> _.replace(',',', ') > > 'hello, goodbye, boo' > Thank you for ALL for help. > Hendrik, > your solution works great but >

Re: Is there any python-twisted tutorial or texts?

2006-12-18 Thread [EMAIL PROTECTED]
The doc in the twisted web site is a good starting point. Also there is a book . Jia Lu wrote: > Hi all > I want to study twisted of python . But I donot know how to start. > Any suggistions? > > Thank you -- http://mail.python.org/mailman/listinfo/python-list

Lightweight embedding of Firefox Gecko into application whose top level is Python--possible?

2006-12-18 Thread Kenneth McDonald
Sorry for crossposting to several lists, but from what I can tell, what I want to do may involve several different areas of expertise. (None of which I have :-( ) I'd like to use Gecko as the UI for an application mostly implemented in Python. Ideally, I'd like to somehow come up with a Python

Re: catching exceptions

2006-12-18 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > > class Test(object): > ... > def _setx(self,strvalue): > try: > self._x = float(strvalue) > except ValueError: > print 'Warning : could not set x attribute to %s' % strvalue > ... I think what you are looking for is:

Re: urllib.unquote and unicode

2006-12-18 Thread Leo Kislov
George Sakkis wrote: > The following snippet results in different outcome for (at least) the > last three major releases: > > >>> import urllib > >>> urllib.unquote(u'%94') > > # Python 2.3.4 > u'%94' > > # Python 2.4.2 > UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 0: > or

python script terminating

2006-12-18 Thread Aditya Vaish
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: # case 1 Do something

regular expression

2006-12-18 Thread Asper Faner
I seem to always have hard time understaing how this regular expression works, especially how on earth do people bring it up as part of computer programming language. Natural language processing seems not enough to explain by the way. Why no eliminate it ? -- http://mail.python.org/mailman/listin

Re: Is there any python-twisted tutorial or texts?

2006-12-18 Thread Jonathan Curran
On Monday 18 December 2006 20:45, Jia Lu wrote: > Hi all > I want to study twisted of python . But I donot know how to start. > Any suggistions? > > Thank you There is a book about using Twisted. It's called 'Twisted Network Programming Essentials.' It is an entry-level book at best, but it do

Re: merits of Lisp vs Python

2006-12-18 Thread greg
Bill Atkins wrote: > 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 For comparison, here's how something with a similar API might be used from P

SQLAlchemy, py2exe and Python 2.5 problem?

2006-12-18 Thread Karlo Lozovina
I've just upgraded to Python 2.5, SQLAlchemy 0.3.3, and py2exe 0.6.5 (the py2.5 version, yes). Simple: --- import sqlalchemy print 'Test' --- works when interpreted by Python, but when running it from compiled py2exe binary, it fails with this error: Traceback (most recent call last): File

Re: python-hosting.com projects: dead?

2006-12-18 Thread [EMAIL PROTECTED]
Carl Banks wrote: > [EMAIL PROTECTED] wrote: > > It looks to me like python hosting, aka webfaction, have shut down > > access to all projects hosted under their free hosting for open source > > python projects program. Including mine (nose). With no notice -- at > > least none that I received. > >

Re: python-hosting.com projects: dead?

2006-12-18 Thread Carl Banks
[EMAIL PROTECTED] wrote: > It looks to me like python hosting, aka webfaction, have shut down > access to all projects hosted under their free hosting for open source > python projects program. Including mine (nose). With no notice -- at > least none that I received. > > Surprised doesn't quite cov

python-hosting.com projects: dead?

2006-12-18 Thread [EMAIL PROTECTED]
It looks to me like python hosting, aka webfaction, have shut down access to all projects hosted under their free hosting for open source python projects program. Including mine (nose). With no notice -- at least none that I received. Surprised doesn't quite cover it. Perhaps someone from python h

Re: sha, PyCrypto, SHA-256

2006-12-18 Thread Tim Henderson
On Dec 16, 2:17 pm, [EMAIL PROTECTED] wrote: > Operating system: Win XP > Vsn of Python: 2.4 > > Situation is this: Required to calcluate a message digest. The process > for calcluating the digest must use an SHA-256 algorithm. > > Questions: > 1) Is it correct that the sha module comes with pytho

urllib.unquote and unicode

2006-12-18 Thread George Sakkis
The following snippet results in different outcome for (at least) the last three major releases: >>> import urllib >>> urllib.unquote(u'%94') # Python 2.3.4 u'%94' # Python 2.4.2 UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 0: ordinal not in range(128) # Python 2.5 u'\x9

Is there any python-twisted tutorial or texts?

2006-12-18 Thread Jia Lu
Hi all I want to study twisted of python . But I donot know how to start. Any suggistions? Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: pyExcelerator question

2006-12-18 Thread John Machin
Gerry wrote: > 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 >

Re: tuple.index()

2006-12-18 Thread greg
Nick Maclaren wrote: > Unfortunately, you are confusing the issue, because there are far > more extraneous aspects than relevant ones, and your view of the > similarities requires looking at the issue in a very strange way. > I think that I can see what you mean, but only just. Each member of a s

Re:

2006-12-18 Thread Gabriel Genellina
At Monday 18/12/2006 03:34, Divya Prakash wrote: I would like to parse java files and detect class name's, attributes name's type's and visibility (and or list of methods). Is there any module who can parse easily a java file using jython? You could try javadoc (the j

Using DCOP from Python

2006-12-18 Thread Jeffrey Barish
The package python-dcop makes it possible to use DCOP from Python. Does anyone know of a tutorial for this package or an example of its use? I would like to use it to read a journal entry in Korganizer. I got as far as figuring out that DCOP offers the interface korganizer.CalendarIface.openJour

Tkdnd--does anyone use it?

2006-12-18 Thread Kevin Walzer
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 complicated, particulary if you want

Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
Hi Dennis, thanks for your reply. Dennis Lee Bieber napsal: > > def dataOnSerialPort(): > > data=s.readLine() > > Unless you are using a custom serial port module, that should be > s.readline() sorry for the typo > > > if data: > > return data > > else: > > return

Re: ANN: Skimpy Gimpy ASCII Web Challenge CAPTCHA

2006-12-18 Thread Olexandr Melnyk
Looks interesting; have you considered making an audio alternative for people with visual disabilities? Olexandr Melnyk, http://omelynk.net/ 18 Dec 2006 14:40:14 -0800, [EMAIL PROTECTED] < [EMAIL PROTECTED]>: Please check it out and try it: http://skimpygimpy.s

ANN: Skimpy Gimpy ASCII Web Challenge CAPTCHA

2006-12-18 Thread aaronwmail-usenet
Please check it out and try it: http://skimpygimpy.sourceforge.net/ Find examples, documentation, links to demos and download links there. Skimpy Gimpy is a tool for generating HTML representations for strings which people can read but which web robots and other computer programs will have di

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Peter Decker
On 12/18/06, Luc Heinrich <[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...

Re: Good Looking UI for a stand alone application

2006-12-18 Thread Paul McNett
Luc Heinrich wrote: > 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

Re: def index(self):

2006-12-18 Thread Gert Cuykens
> 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.exposed = True #DOOH! i skipped rea

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

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: 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

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: 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

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: 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: 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 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: 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: 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: 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

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: 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

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

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: 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

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: 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

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: 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

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.

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

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

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: 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: 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: 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

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 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

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: 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: 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: 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

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: 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

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: 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: 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: 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: 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: 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: 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

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: 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

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: 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 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: 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 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

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

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

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. --

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: 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: 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

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: 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

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

  1   2   >