Re: Subclassing socket

2005-12-20 Thread Maksim Kasimov
you have to agregate socket and the object must have "fileno" method, thats gives a possibility to use instanses of your class with "select.select" function class mySocket: def __init__(self, ...): self.__socket = None ... def fileno(self): return self.__s

Re: Why my thread can't access the global data?

2005-12-20 Thread ddh
Thank you, but I think it may be not this reason. You see, when accept returns, the go_on will be checked in 'while go_on:', so if it is set to be false, the loop will end. I have set a 0.5 second time out on the select() function. So the 'go_on' will be checked at a frequency every 0.5 second at

Re: Why my thread can't access the global data?

2005-12-20 Thread Pelmen
your main loop already on accept when your thread change the go_on imho try to input another string after 'quit' and actually there is no need to use thread -- http://mail.python.org/mailman/listinfo/python-list

Why my thread can't access the global data?

2005-12-20 Thread ddh
Hi, I got a problem. I use a 'select' in a loop in the main thread, and when select return, a new thread will be created to handle the network event. And if the client send some special string, the thread will change a global flag to false, so the loop in the main thread will break. But it never

Re: Raw images

2005-12-20 Thread Fredrik Lundh
"Tuvas" wrote: > 1. Read string > 2. Form an array by combining 2 chars together. > 3. Divide by 256 so as to have a 8 bit number, which PIL likes alot > better than a 16 bit number. The string is called data. > 4. Use im = Image.fromstring('L', (xsize, ysize), data) to create image PIL can do th

libxml2 has schema support

2005-12-20 Thread ankit
I am new to xml and python. I have to choose a package which has schema support. I like to use libxml2 but does libxml2 has schma support ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Subclassing socket

2005-12-20 Thread Pelmen
imho: class new_socket(socket): def __init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None) socket.__init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None) def accept( self ): conn, addr = socket.accept() return ( new_socket(_sock=conn), add

Re: Windows Services

2005-12-20 Thread Mondal
Hi, Thanks Upole!!! I dowloaded it. From exe files at sourceforge.net. Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw images

2005-12-20 Thread Tuvas
Well, it's a custum-built camera, so it's not standard by any means. That being the case, I know it's exact format, which is as follows. It is a stream of 16 bit numbers, each representing a point on a grid. The grid is define in a seporate way, outside of the format, but is given a number of rows

Help turning code into a module

2005-12-20 Thread dylpkls91
Hi all, I am working on a little program for home automation under the X10 protocol. I have given up using a Palm device for input, so I have resorted to using voice recognition, which I knew nothing about. However, I found a nice little script on the internet that does exactly what I need, and it

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Paul Rubin
Kent Johnson <[EMAIL PROTECTED]> writes: > You've lost me here. The server certainly would contain Karrigell > code, it wouldn't function without it. I don't understand the analogy > to GCC, the web site is not something that is compiled with > Karrigell. Karrigell is a library or framework that is

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Kent Johnson
Paul Rubin wrote: > Kent Johnson <[EMAIL PROTECTED]> writes: >>>Remember that the GPL only applies to the code of Karrigell >>>itself, not to stuff that you write using it. >> >>IANAL but that is not my understanding of the GPL. GPL version 2 >>section 2.b) reads, "You must cause any work that you

Re: expect-like package

2005-12-20 Thread Stephen Thorne
On 21/12/05, Eric McCoy <[EMAIL PROTECTED]> wrote: > So for HTTP, for example, I'd use something > like this: > > send "HEAD / HTTP/1.0" > send "Host: server.host.name" > send "" > expect ... > "^HTTP/1\.0 200.*" then return success > "^HTTP/1\.0 4\d\d.*" then return warning > else return err

Re: type 'slice' is not an acceptable base type

2005-12-20 Thread Michael Hoffman
Antoon Pardon wrote: > Traceback (most recent call last): > File "", line 1, in ? > File "vslice.py", line 48, in ? > class iterslice(slice): > TypeError: Error when calling the metaclass bases > type 'slice' is not an acceptable base type Searching for "not an acceptable base type" i

Subclassing socket

2005-12-20 Thread groups . 20 . thebriguy
socket objects have a little quirk. If you try to receive 0 bytes on a blocking socket, they block. That is, if I call recv(0), it blocks (until some data arrives). I think that's wrong, but I don't want to argue that. I would like to create a subclass of socket that fixes the problem. Ideally

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Mike Meyer
Paul Rubin writes: >> IANAL but that is not my understanding of the GPL. GPL version 2 >> section 2.b) reads, "You must cause any work that you distribute or >> publish, that in whole or in part contains or is derived from the >> Program or any part thereof, to be license

Re: type error on porting outfile.write

2005-12-20 Thread Eric McCoy
[EMAIL PROTECTED] wrote: > I ported my code from the development to > application platform, I found a "type error" > on a fileout statement: > outfile.write(object.id +",") What is the type of object.id? I'm guessing an integer. The exception should tell you, e.g.: TypeError: unsupported ope

Re: Changing a shell's current directory with python

2005-12-20 Thread Trent Mick
[Peter Hansen wrote] > Andy B. wrote: > > I've got a python utility that I want to change my shell's current > > directory based on criteria it finds. I've scoured google and the > > python cookbook and can't seem to figure out if this is even possible. > > So far, all my attempts have changed th

Re: Python IDE (was: PythonWin troubleshooting)

2005-12-20 Thread Trent Mick
[chuck wrote] > What is Komodo written in? Komodo is based on the Mozilla framework, so in many ways it is similar to Firefox and Thunderbird. Komodo also includes PyXPCOM -- Python bindings to Mozilla's XPCOM (cross-platform component object model) system for componentizing parts of the framework

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Paul Rubin
Kent Johnson <[EMAIL PROTECTED]> writes: > I did make some changes to CherryPy. I wouldn't mind sharing those > changes back with the CherryPy community. But the product was the > server itself, not the web site. As I understand the GPL the server > software would be a "work based on the [GPL-licen

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Kent Johnson
Paul Rubin wrote: > Kent Johnson <[EMAIL PROTECTED]> writes: > >>I chose CherryPy in part because its license allows this. I >>would have considered Karrigell if it had a different license. > > > Have you had to modify CherryPy in some substantive way that you > needed to keep proprietary, I d

Re: modify a long-running python script while it is running?

2005-12-20 Thread Kevin Yuan
2005/12/20, Peter Hansen <[EMAIL PROTECTED]>: Kevin Yuan wrote:> I have a silly question: Can  *VERY*  large script cause memory overflow> if python load all the entire script file into memory?If you have a script that is literally larger than memory, then what else would happen but an overflow err

Re: When Python *Eggs* better than Python *distutils*?? What's Eggs?

2005-12-20 Thread Paul Boddie
Xavier Morel wrote: > If you ever used a debian-based linux system, think of Eggs as a > Python-specific apt-get. > > The most advanced kind of language-specific installer atm is the Ruby > Gems packaging and distribution system (http://docs.rubygems.org/), go > check it for more insight of what Eg

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Paul Rubin
Kent Johnson <[EMAIL PROTECTED]> writes: > I chose CherryPy in part because its license allows this. I > would have considered Karrigell if it had a different license. Have you had to modify CherryPy in some substantive way that you needed to keep proprietary, as opposed to simply developing conte

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Kent Johnson
Luis M. Gonzalez wrote: > I don't think Pierre (Karrigell's creator) is awared of licenses and > legal issues. > Perhaps you can tell us what's the problem with GPL and, if possible, > propose an alternative... OK I'll try. First let me say I have no interest in a licensing flame war, there are v

Re: Wed Development - Dynamically Generated News Index

2005-12-20 Thread infidel02
Thank Steve this worked! -- http://mail.python.org/mailman/listinfo/python-list

pyUnit and dynamic test functions

2005-12-20 Thread Sakcee
Hi I am trying to use pyUnit to create a framework for testing functions I am reading function name, expected output, from a text file. and in python generating dynamic test functions something like this class getUsStatesTest( unittest.TestCase ): self.setUp = lambda : function_call

Python on Nintendo DS

2005-12-20 Thread [EMAIL PROTECTED]
Hi, I tried porting Python to the Nintendo DS, and it was surprisingly easy. Installing something called devkitPro, devkitARM, libNDS, msys, msys-DTK and then just using that to cross compile a python installation. Heres a screenshot of it running in the Dualis emulator. It runs flawlessly for

Re: putenv

2005-12-20 Thread Tom Anderson
On Tue, 20 Dec 2005, Steve Holden wrote: > Mike Meyer wrote: >> Terry Hancock <[EMAIL PROTECTED]> writes: >> >>> On Tue, 20 Dec 2005 05:35:48 - >>> Grant Edwards <[EMAIL PROTECTED]> wrote: >>> On 2005-12-20, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have csh script

Re: getopt and options with multiple arguments

2005-12-20 Thread Tom Anderson
On Mon, 19 Dec 2005, [EMAIL PROTECTED] wrote: > I want to be able to do something like: > > myscript.py * -o outputfile > > and then have the shell expand the * as usual, perhaps to hundreds of > filenames. But as far as I can see, getopt can only get one argument > with each option. In the abov

Re: how to remove duplicated elements in a list?

2005-12-20 Thread Tom Anderson
On Mon, 19 Dec 2005, Brian van den Broek wrote: > [EMAIL PROTECTED] said unto the world upon 2005-12-19 02:27: >> Steve Holden wrote: >> >>> Kevin Yuan wrote: >>> How to remove duplicated elements in a list? eg. [1,2,3,1,2,3,1,2,1,2,1,3] -> [1,2,3]? Thanks!! >>> >>> >>> list(set

putting checkbuttons in a listbox

2005-12-20 Thread valen1260
I'd like to have a multicolumn listbox, with one column being a list of items and the other being a list of checkbuttons. The user could check his "favorites" and then shorten the list to show only the checked items. I have implemented the MultiListbox at http://aspn.activestate.com/ASPN/Cookb

type error on porting outfile.write

2005-12-20 Thread pmiller
I ported my code from the development to application platform, I found a "type error" on a fileout statement: outfile.write(object.id +",") Object.id is provided by a library routine that is installed on both machines. How do I fix this ? Thanks, Phil Miller -- http://mail.python.org/mailman/

Re: Wingide is a beautiful application

2005-12-20 Thread [EMAIL PROTECTED]
Tony Nelson wrote: > > 1. Python syntax checking: as I'm typing along, if I input a syntax > > error then the line is immediately highlighted in red. > > What do you use to do this? Cream doesn't seem to do this oob. Nope. I'll try to package up my vimrc and get it uploaded somewhere next week (

New Python ISAPI extension for IIS (PyISAPIe)

2005-12-20 Thread Phillip Sitbon
Hey everybody, I just released v0.1.1 of my Python ISAPI extension, which is currently in its beta stages. I'd love to have some of you look at it and see if it works well for you. It's very slimmed-down, and definitely simple compared to the more popular option(s), but my hope is that there is a

Re: Parsing text

2005-12-20 Thread Bengt Richter
On 20 Dec 2005 08:06:39 -0800, "sicvic" <[EMAIL PROTECTED]> wrote: >Not homework...not even in school (do any universities even teach >classes using python?). Just not a programmer. Anyways I should >probably be more clear about what I'm trying to do. Ok, not homework. > >Since I cant show the ac

type error on porting outfile.write

2005-12-20 Thread pmiller
I ported my code from the development to application platform, I found a "type error" on a fileout statement: outfile.write(object.id +",") Object.id is provided by a library routine that is installed on both machines. How do I fix this ? Thanks, Phil Miller -- http://mail.python.org/mailman/

Re: When Python *Eggs* better than Python *distutils*?? What's Eggs?

2005-12-20 Thread Colin J. Williams
Xavier Morel wrote: > [EMAIL PROTECTED] wrote: > >> So basically Python Eggs precompiles and compresses >> binaries for you so you just have to load it to run >> your app? >> > > Nah, Eggs is a packaging system, what you don't have to do is > compile/configure, because the packaging does that fo

Re: Raw images

2005-12-20 Thread Paul Rubin
"Tuvas" <[EMAIL PROTECTED]> writes: > I have an image that is in a "raw" format, Do you mean a RAW file from a digital camera? Those files have complex and sometimes secret formats. Google "dcraw.c" for a decoding program that works for many cameras. -- http://mail.python.org/mailman/listinfo/

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Michael Tobis
Clearly the Ruby/Rails folks are making an effort to place themselves as an easy-to-learn first language for people who might otherwise drift into the rather awkward template-first way of thinking that is PHP. I note that the Rails people are closely affiliated with the 37signals people who in tur

Re: tkinter canvas tag stuff

2005-12-20 Thread Tuvas
It's funny, I can put in more variables than needed, it doesn't even call the function, and yet, magically, the picture appears. Odd... Just wish I could solve the problem... -- http://mail.python.org/mailman/listinfo/python-list

Re: reading files

2005-12-20 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Mike Meyer wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> The text you read is still hanging around, waiting for you to use it. Once >> you are done with it, you might want to reclaim that memory used, >> especially if it is a 100MB text file: >> >> mytext = "" #

Re: parsing engineering symbols

2005-12-20 Thread Fredrik Lundh
Suresh Jeevanandam wrote: > I want to convert a string to float value. The string contains > engineering symbols. > > For example, > > s = '12k' > > I want some function which would return 12000 > function(s) > => 12000.0 > I searched the web, but could not find any function. how about: SI_prefi

Re: Raw images

2005-12-20 Thread Tuvas
Well, the numbers are in a string of variable length. My camera can read specific parts of it's display, so an image of 1024x1024 is just as likely to happen as one of 16x342. Well, not really, but they both could happen. The data is passed by giving the dimentions via a seperate protocol, and then

Re: parsing engineering symbols

2005-12-20 Thread Erik Max Francis
Suresh Jeevanandam wrote: > I want to convert a string to float value. The string contains > engineering symbols. > For example, > > s = '12k' > > I want some function which would return 12000 > function(s) > => 12000.0 > I searche

Re: Wed Development - Dynamically Generated News Index

2005-12-20 Thread infidel02
Hi Jean-Paul, The truth of the matter is that I was hoping that this could be accomplished using pure CGI. I am considering wether I need to learn these new frameworks, but I am in somewhat of a hurry. Also I have this problem with this simple test script that I have written. It pulls the infro

Re: pythonic equivalent of upvar?

2005-12-20 Thread Steven D'Aprano
On Tue, 20 Dec 2005 14:56:25 +, Richie Hindle wrote: > > [David] >> I'm trying to write something with the same brevity >> as perl's one-liner >> >> eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shift; > > import sys, re > for arg in sys.argv[1:]: > if re.match(r'\w+=.*',

Re: checking if a string contains a number

2005-12-20 Thread Steven D'Aprano
On Tue, 20 Dec 2005 15:55:37 +0100, egbert wrote: > On Tue, Dec 20, 2005 at 07:16:46PM +0530, Suresh Jeevanandam wrote: >> s1 = '12e3' >> s2 = 'junk' >> Is there any other function which would return True for s1 and False >> for s2. >> > > isinstance(12e3, (int, float)) That won

Re: Wed Development - Dynamically Generated News Index

2005-12-20 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi Jean-Paul, > > The truth of the matter is that I was hoping that this could be > accomplished using pure CGI. > > I am considering wether I need to learn these new frameworks, but I am > in somewhat of a hurry. > > Also I have this problem with this simple test scri

Re: Raw images

2005-12-20 Thread Bryan Olson
Tuvas wrote: > I have an image that is in a "raw" format, ei, no place markers to tell > the dimensions, just a big group of numbers. The adjective "raw", apt as it may be, is a long way from specifying the representation of an image. *Every* digital format is "just a big group of numbers". >

Re: How simputer COULD HAVE succeeded ?

2005-12-20 Thread mike . klaas
> PS. before investing time in Python, I wanted to find out if it > can interface low-level, by eg. calling the OS or C...etc. > eg. could it call linux's "dd if=.." ? In python you have full access to the shell, and excellent interoperability with c. -Mike -- http://mail.python.org/mailma

Re: When Python *Eggs* better than Python *distutils*?? What's Eggs?

2005-12-20 Thread Xavier Morel
[EMAIL PROTECTED] wrote: > So basically Python Eggs precompiles and compresses > binaries for you so you just have to load it to run > your app? > Nah, Eggs is a packaging system, what you don't have to do is compile/configure, because the packaging does that for you. It also handles things lik

expect-like package

2005-12-20 Thread Eric McCoy
I'm looking for a way to create simple scripts which should be accessible to a technical, though non-programmer, person. These scripts are basically network service checks so I don't need much power: "send this line," "if this line matches, keep going," and "if this line matches, quit immediately.

Re: Wed Development - Dynamically Generated News Index

2005-12-20 Thread infidel02
Hi Jean-Paul, The truth of the matter is that I was hoping that this could be accomplished using pure CGI. I am considering wether I need to learn these new frameworks, but I am in somewhat of a hurry. Also I have this problem with this simple test script that I have written. It pulls the infro

Re: checking if a string contains a number

2005-12-20 Thread Steven D'Aprano
On Tue, 20 Dec 2005 19:16:46 +0530, Suresh Jeevanandam wrote: > Hi, > I have a string like, > s1 = '12e3' > s2 = 'junk' > > Now before converting these values to float, I want to check if they > are valid numbers. Just try converting them: float_list = [] for s in strin

Re: When Python *Eggs* better than Python *distutils*?? What's Eggs?

2005-12-20 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I have been using distuils for a while and was wondering when Python > Eggs (new project) is better? Python Eggs, and the 'setuptools' package, are still new, so they're not yet a core part of Python. "The primary benefits of Python Eggs are:

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Paul Rubin
"Luis M. Gonzalez" <[EMAIL PROTECTED]> writes: > Perhaps you can tell us what's the problem with GPL and, if possible, > propose an alternative... See: http://www.gnu.org/philosophy/pragmatic.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw images

2005-12-20 Thread Tuvas
That will definatly help. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: "class Server" has a big error: what is?

2005-12-20 Thread LocaWapp
Steven D'Aprano ha scritto: > On Sat, 17 Dec 2005 12:38:00 -0800, LocaWapp wrote: > > > "class Server" has a big error: what is? > > > > http://groups.google.it/group/comp.lang.python/browse_thread/thread/de458cb7675ff4b6/f333453b0dc1aab6?q=locawapp&rnum=1#f333453b0dc1aab6 > > > Is this a game of

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Luis M. Gonzalez
> From my point of view the biggest problem with Karrigell is that it is > released under the > GPL. Most of my projects at least have the potential of being distributed to > customers and >GPL is not an option. I don't think Pierre (Karrigell's creator) is awared of licenses and legal issues.

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Luis M. Gonzalez
I don't think Pierre (Karrigell's creator) is awared of licenses and legal issues. Perhaps you can tell us what's the problem with GPL and, if possible, propose an alternative... -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Benji York <[EMAIL PROTECTED]> wrote: >Russell E. Owen wrote: >> I disagree. Once you've picked a database (not trivial in itself, of >> course), you typically only have a few options for talking to in in >> Python. > >Perhaps it's off-topic for this thread, but

Re: Raw images

2005-12-20 Thread Peter Hansen
Tuvas wrote: > I have an image that is in a "raw" format, ei, no place markers to tell > the dimensions, just a big group of numbers. I happen to know the > dimension of this array from a different source. I would like to be > able to display it. Is there a way to do this easily? I know that > seve

Re: Parsing text

2005-12-20 Thread sicvic
Thank you everyone!!! I got a lot more information then I expected. You guys got my brain thinking in the right direction and starting to like programming. You've got a great community here. Keep it up. Thanks, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: Add to python path in Linux

2005-12-20 Thread John Goebel
On 20 Dec 2005 08:13:48 -0800, ninhenzo64 <[EMAIL PROTECTED]> wrote: Hey, > Hi, > > I am trying to use wxPython under Linux. Unfortunately, our system > administrator has gone home for the holidays so I cannot get him to > install the libraries properly. However, I have unpacked the libraries > i

Re: ANNOUNCE; Try python beta

2005-12-20 Thread Mike Meyer
Richie Hindle <[EMAIL PROTECTED]> writes: >> My assumption is that if splitting on '\n' leaves us with one >> thing, we may have gotten a string that used \r for newlines > Ah, OK. Your comment talks about DOS - that won't happen on DOS (or > Windows) which uses \r\n. I don't know about the Mac.

Re: Queueing in Python (ala JMS)

2005-12-20 Thread James
Wolfgang Keller wrote: > > Is there a JMS-like API available for Python? > > Better. >:-> Omninotify, a Corba notification service implementation. > > Sincerely, > > Wolfgang Keller And it's ICE (a CORBA alternative with Python bindings) equivalent IceStorm A messaging service with support for f

Raw images

2005-12-20 Thread Tuvas
I have an image that is in a "raw" format, ei, no place markers to tell the dimensions, just a big group of numbers. I happen to know the dimension of this array from a different source. I would like to be able to display it. Is there a way to do this easily? I know that several libraries use a "ra

Re: pythonic equivalent of upvar?

2005-12-20 Thread Mike Meyer
[EMAIL PROTECTED] (David MacKay) writes: « > > I am writing a command-line reader for python. > > I'm trying to write something with the same brevity > as perl's one-liner > > eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shift; > > and with similar functionality. Why? Do

When Python *Eggs* better than Python *distutils*?? What's Eggs?

2005-12-20 Thread [EMAIL PROTECTED]
I have been using distuils for a while and was wondering when Python Eggs (new project) is better? So basically Python Eggs precompiles and compresses binaries for you so you just have to load it to run your app? Chris -- http://mail.python.org/mailman/listinfo/python-list

Matthew Collins/Seminole is out of the office.

2005-12-20 Thread MCollins
I will be out of the office starting 12/20/2005 and will not return until 12/27/2005. I'm out of the office and will return on Monday, the 22nd of March. If you have an emergency, please call 407.665.0311 -- http://mail.python.org/mailman/listinfo/python-list

Your message to ZDP awaits moderator approval

2005-12-20 Thread zdp-bounces
Your mail to 'ZDP' with the subject hi, ive a new mail address Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of t

python-list@python.org

2005-12-20 Thread ivan.dm
Hi Body, Can I set an image from file into DrawArea, so I can resize and drawing any object over its image? any tips or idea? Thanks Ivan -- http://mail.python.org/mailman/listinfo/python-list

Re: Weird memory consumption problem.

2005-12-20 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Bo Peng <[EMAIL PROTECTED]> writes >The problem is not that difficult to find, but it was 2am in the morning and >I was misled by the different behavior of pyFun1 and pyFun2. Don't know if you were using Windows, but if you were then Python Memory Validator would ha

Re: how to lock a file in ftp site

2005-12-20 Thread Steve Holden
Ben Hutchings wrote: > <[EMAIL PROTECTED]> wrote: > >>hi all >> >>am trying to write some information into the file, which is located in >>ftp, and this file can be updated by number of people, but if at all i >>download a file from the ftp to my local machine, update it and then >>upload it back

Re: pythonic equivalent of upvar?

2005-12-20 Thread Bengt Richter
On Tue, 20 Dec 2005 16:10:30 +0200, [EMAIL PROTECTED] (David MacKay) wrote: >Dear Greater Py, > > > I am writing a command-line reader for python. > > I'm trying to write something with the same brevity >as perl's one-liner > >eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shi

Re: checking if a string contains a number

2005-12-20 Thread egbert
On Tue, Dec 20, 2005 at 07:16:46PM +0530, Suresh Jeevanandam wrote: > s1 = '12e3' > s2 = 'junk' > Is there any other function which would return True for s1 and False > for s2. > isinstance(12e3, (int, float)) -- Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020

Re: Help with python_fold.vim

2005-12-20 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > Found an earlier thread that answered my question: Good for you. I often want only one or two levels of indentation at maximum. This ensures not all if/while/for etc. blocks are indented. Most of my python files either contain classes (max indent 2) or onl

Re: Add to python path in Linux

2005-12-20 Thread Sybren Stuvel
ninhenzo64 enlightened us with: > The variable PYTHONPATH doesn't seem to exist. Yet it is the one you should use. It's got the same syntax as the regular PATH variable. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don'

Re: how to lock a file in ftp site

2005-12-20 Thread Ben Hutchings
<[EMAIL PROTECTED]> wrote: > hi all > > am trying to write some information into the file, which is located in > ftp, and this file can be updated by number of people, but if at all i > download a file from the ftp to my local machine, update it and then > upload it back to ftp, and at the same tim

Re: Parsing text

2005-12-20 Thread Scott David Daniels
sicvic wrote: > Not homework...not even in school (do any universities even teach > classes using python?). Yup, at least 6, and 20 wouldn't surprise me. > The code I currently have looks something like this: > ... > f = open(sys.argv[1]) #opens output file > #loop that goes through all lines and

Re: putenv

2005-12-20 Thread Christophe
Mike Meyer a écrit : > Terry Hancock <[EMAIL PROTECTED]> writes: > >>On Tue, 20 Dec 2005 05:35:48 - >>Grant Edwards <[EMAIL PROTECTED]> wrote: >> >>>On 2005-12-20, [EMAIL PROTECTED] <[EMAIL PROTECTED]> >>>wrote: >>> I have csh script that calls a bunch of python programs and I'd like t

Re: Help with python_fold.vim

2005-12-20 Thread stephen
Found an earlier thread that answered my question: http://mail.python.org/pipermail/python-list/2005-July/289078.html """Then zo opens the fold under the cursor one level, zO opens it recursively, zc and zC close it non- and recursively. zr opens all folds one level, zR opens them all recursively

Eckel, ruby, python

2005-12-20 Thread gene tani
pretty sane article, i didn't see it linked/cited here http://www.artima.com/weblogs/viewpost.jsp?thread=141312 -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing text

2005-12-20 Thread Gerard Flanagan
sicvic wrote: > Since I cant show the actual output file lets say I had an output file > that looked like this: > > a b Person: Jimmy > Current Location: Denver It may be the output of another process but it's the input file as far as the parsing code is concerned. The code below gives t

Re: Parsing text

2005-12-20 Thread rzed
"sicvic" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Not homework...not even in school (do any universities even > teach classes using python?). Just not a programmer. Anyways I > should probably be more clear about what I'm trying to do. > > Since I cant show the actual output file l

Help with python_fold.vim

2005-12-20 Thread stephen
I see that the python_fold plugin for vim lets you fold classes/functions, etc. Can someone tell me how to fold/unfold sections? Thanks. Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Kent Johnson
Luis M. Gonzalez wrote: > The only problem with KARRIGELL, I guess, is that its creator is very > humble and doesn't like to advertise his creature. He is not very fond > of "marketing" ... From my point of view the biggest problem with Karrigell is that it is released under the GPL. Most of my

Re: Disable 'windows key'

2005-12-20 Thread Richie Hindle
> But can it change "Fn" key mapping? I don't think so, no. There's no obvious user interface for that, anyway. -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Disable 'windows key'

2005-12-20 Thread Dody Suria Wijaya
But can it change "Fn" key mapping? Richie Hindle wrote: > [Paul] >> I wonder if there might be a way of disabling [the windows key] within >> my program. > > IHateThisKey will do this globally: > > http://www.bytegems.com/ihatethiskey.shtml > > The free edition blocks the Windows key, and th

Add to python path in Linux

2005-12-20 Thread ninhenzo64
Hi, I am trying to use wxPython under Linux. Unfortunately, our system administrator has gone home for the holidays so I cannot get him to install the libraries properly. However, I have unpacked the libraries in my home directory, so if there was some way of adding this to the path that Python se

Re: Parsing text

2005-12-20 Thread sicvic
Not homework...not even in school (do any universities even teach classes using python?). Just not a programmer. Anyways I should probably be more clear about what I'm trying to do. Since I cant show the actual output file lets say I had an output file that looked like this: a b Person: J

Re: How convert text file between locale encoding and UTF-8?

2005-12-20 Thread gene tani
[EMAIL PROTECTED] wrote: > Dear Friends: > > Wondering that is there neat way to do "subject line" in Python? I am > talking about Python 2.4 with Win32 extension installed. The locale can > be any of ANSI defined, for example, zh_CN (CP936) or Korea (CP949) > . > > I am not expert in Pyth

Re: Existing FTP server code?

2005-12-20 Thread gene tani
Mateusz Soltysek wrote: > [EMAIL PROTECTED] wrote: > > Hi, I'm writing a program that needs to upload files to a server > > (probably using FTP), that also needs to be secured and be able to > > setup username/password programmatically. > > > > I wonder if there are already well written base code

Re: Which Python web framework is most like Ruby on Rails?

2005-12-20 Thread Steve Holden
Mike Meyer wrote: > "Paul Boddie" <[EMAIL PROTECTED]> writes: > >>Paul Rubin wrote: >> >>>It's been a long-time source of puzzlement to me why so many web sites >>>are so slow, and RDBMS overhead is an obvious candidate. So the rant >>>seems appropriate even in the case of web apps where clients

Re: allow_none=True in SimpleXMLRPCServer

2005-12-20 Thread Daniel Crespo
Hi Dody! It works perfect! Now, I want the SimpleXMLRPCServer.py not to be on the same directory, but in my /lib directory. I tried it, but it seems that the module loads from python24/ first. How can I change this? Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: putenv

2005-12-20 Thread Steve Holden
Mike Meyer wrote: > Terry Hancock <[EMAIL PROTECTED]> writes: > >>On Tue, 20 Dec 2005 05:35:48 - >>Grant Edwards <[EMAIL PROTECTED]> wrote: >> >>>On 2005-12-20, [EMAIL PROTECTED] <[EMAIL PROTECTED]> >>>wrote: >>> I have csh script that calls a bunch of python programs and I'd like to u

Re: parsing engineering symbols

2005-12-20 Thread gene tani
Suresh Jeevanandam wrote: > Hi, > I want to convert a string to float value. The string contains > engineering symbols. > For example, > > s = '12k' > > I want some function which would return 12000 > function(s) > => 12000.0 > I searched t

Re: parsing engineering symbols

2005-12-20 Thread Bengt Richter
On Tue, 20 Dec 2005 19:07:02 +0530, Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: >Hi, > I want to convert a string to float value. The string contains >engineering symbols. > For example, > > s = '12k' > > I want some function which would return 12000 >

Re: Do you recommend a good artificial intelligence book?

2005-12-20 Thread Bengt Richter
On 20 Dec 2005 04:27:29 -0800, Paul Rubin wrote: >"Tolga" <[EMAIL PROTECTED]> writes: >> Is there anybody here interested in artificial intelligence (AI)? Yes, >> perhaps this thread would be more suitable for an AI usenet group and I >> have also posted my question ther

  1   2   >