Re: Construct raw strings?

2005-09-07 Thread Terry Reedy
"Thomas W" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I got a stupid problem; on my WinXP-box I want to scan the filesystem > and enter a path to scan like this : > > path_to_scan = 'd:\test_images' I believe you can always use / instead of \ for Win filenames from Python. Av

Re: List of integers & L.I.S.

2005-09-07 Thread n00m
Thanks guys! > Are you sure that this is not a homework problem? ... and let me reveal the secret: http://spoj.sphere.pl/problems/SUPPER/ Hardly it can be easily reduced to "standard" LIS problem (i.e. to find just a (any) Longest Increasing Sequence). > I coded a solution that can compute the or

Re: determine if os.system() is done

2005-09-07 Thread Martin P. Hellwig
Peter Hansen wrote: > Martin P. Hellwig wrote: > >> The only thing I am disappointed at his writing style, most likely he >> has a disrupted view on social acceptable behavior and communication. >> These skills might be still in development, so perhaps it is >> reasonable to give him a chance an

Re: Manging multiple Python installation

2005-09-07 Thread Mike Meyer
Andy Leszczynski writes: > Robert Kern wrote: >> Andy Leszczynski wrote: >> >>>Jeremy Jones wrote: >>> >>> Andy Leszczynski wrote: Download the source, untar, cd to the new directory, run: ./configure --prefix=/opt/mypython make make install >>> >>>Is there any way t

Re: determine if os.system() is done

2005-09-07 Thread Xah Lee
Thanks all. I found the answer, rather easily. To make a system call and wait for it, do: subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]).wait(); -- this post is archived at: http://xahlee.org/perl-python/system_calls.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xah Lee wr

Weekly Python Patch/Bug Summary

2005-09-07 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 342 open ( +3) / 2923 closed ( +1) / 3265 total ( +4) Bugs: 908 open ( +5) / 5232 closed (+10) / 6140 total (+15) RFE : 188 open ( +1) / 185 closed ( +1) / 373 total ( +2) New / Reopened Patches __ String fo

Re: Django Vs Rails

2005-09-07 Thread flamesrock
Wow- thanks for all of the replies. I'm torn. On the one hand, I'm fluent in Python and love it. On the other, Rails seems to have a brighter future, and is a bit more featureful (at this time.) However the only Ruby I know is what I've already learnt with Python(even though I would like to learn

Re: improvements for the logging package

2005-09-07 Thread Trent Mick
[EMAIL PROTECTED] wrote] > > >> - It's a package, but contrary to any other package I've ever seen, > >> most of its functionality is implemented in __init__.py. > > Trent> I'm not defending the implementation, but does this cause any > Trent> particular problems? > > No, it ju

CGI File Uploads and Progress Bars

2005-09-07 Thread Doug Helm
Hey, Folks: I'm writing a CGI to handle very large file uploads. I would like to include a progress bar. I think I'm about done. I have code to handle the file upload, and I think I can add an IFrame to my page which posts to check file size (so I can tell how many bytes have been received). M

Re: improvements for the logging package

2005-09-07 Thread skip
>> - It's a package, but contrary to any other package I've ever seen, >> most of its functionality is implemented in __init__.py. Trent> I'm not defending the implementation, but does this cause any Trent> particular problems? No, it just seems symptomatic of some potential or

Re: Construct raw strings?

2005-09-07 Thread Peter Hansen
Benji York wrote: > It's not join that's getting you, it's the non-raw string representation > in path_to_scan. Use either 'd:\test_images' or 'd:\\test_images' instead. Benji, you're confusing things: you probably meant r'd:\test_images' in the above, but in any case I think Robert Kern's on t

Re: determine if os.system() is done

2005-09-07 Thread Peter Hansen
Martin P. Hellwig wrote: > The only thing I am disappointed at his writing style, most likely he > has a disrupted view on social acceptable behavior and communication. > These skills might be still in development, so perhaps it is reasonable > to give him a chance and wait until he is out of his

Re: Job Offer in Paris, France : R&D Engineer (Plone)

2005-09-07 Thread Peter Hansen
Fred Pacquier wrote: > This is a general case, and it goes both ways : we French usually > communicate much more easily with italians (or whatever) speaking english > than with native anglo-american speakers. Anyway, source code (esp. python) > is the modern esperanto/volapük :-) I can't let th

Re: Manging multiple Python installation

2005-09-07 Thread Jeremy Jones
Andy Leszczynski wrote: >Jeremy Jones wrote: > > >>Andy Leszczynski wrote: >> >>Download the source, untar, cd to the new directory, run: >> >>./configure --prefix=/opt/mypython >>make >>make install >> >> > >Is there any way to pass the prefix to the "make install"? Why "make" >depends on

Re: Manging multiple Python installation

2005-09-07 Thread Andy Leszczynski
Robert Kern wrote: > Andy Leszczynski wrote: > >>Jeremy Jones wrote: >> >> >>>Andy Leszczynski wrote: >>> >>>Download the source, untar, cd to the new directory, run: >>> >>>./configure --prefix=/opt/mypython >>>make >>>make install >> >>Is there any way to pass the prefix to the "make install"? >

Re: Manging multiple Python installation

2005-09-07 Thread Robert Kern
Andy Leszczynski wrote: > Jeremy Jones wrote: > >>Andy Leszczynski wrote: >> >>Download the source, untar, cd to the new directory, run: >> >>./configure --prefix=/opt/mypython >>make >>make install > > Is there any way to pass the prefix to the "make install"? Is passing it to the configure scr

Re: Manging multiple Python installation

2005-09-07 Thread Andy Leszczynski
Jeremy Jones wrote: > Andy Leszczynski wrote: > > Download the source, untar, cd to the new directory, run: > > ./configure --prefix=/opt/mypython > make > make install Is there any way to pass the prefix to the "make install"? Why "make" depends on that? A. -- http://mail.python.org/mailman/

Re: Manging multiple Python installation

2005-09-07 Thread Jeremy Jones
Andy Leszczynski wrote: >Hi, >I run Mandrake 10.0 with python 2.3 installed by default. I want to keep >it as it is but need another, very customized Python installation based >of 2.3 as well. I would prefer to have it the way it is on Windows, one >folder e.g. /opt/mypython with all the stuff

Re: Need help with C extension module

2005-09-07 Thread chris
Many thanks Robert. That will be a good starting point. -Chris http://auslunch.com/ http://fetidcascade.com/ http://strombergers.com/python/ -- http://mail.python.org/mailman/listinfo/python-list

Manging multiple Python installation

2005-09-07 Thread Andy Leszczynski
Hi, I run Mandrake 10.0 with python 2.3 installed by default. I want to keep it as it is but need another, very customized Python installation based of 2.3 as well. I would prefer to have it the way it is on Windows, one folder e.g. /opt/mypython with all the stuff under that. It would be unlik

Re: Need help with C extension module

2005-09-07 Thread Robert Kern
chris wrote: > Any tips on what the pyrex should look like for my example? # Untested and off the top of my head; please read the Pyrex # documentation and correct my mistakes before using any of this! # Notably, I'm pretty sure the __init__ and __dealloc__ bits are # slightly wrong. cdef extern

Re: Django Vs Rails

2005-09-07 Thread Greg McIntyre
Diez B. Roggisch wrote: > I tried to find out if subway and > rails can do the same - that is, generate the sql. For subway the lack > of documentation prevented that, and I didn't find it in rails , too. In Rails you can do that with the command: $ rake db_structure_dump However I think it's n

Re: encryption with python

2005-09-07 Thread Steve Holden
Paul Rubin wrote: > James Stroud <[EMAIL PROTECTED]> writes: > >>Then your best bet is to take a reasonable number of bits from an sha hash. >>But you do not need pycrypto for this. The previous answer by "ncf" is good, >>but use the standard library and take 9 digits to lessen probability for

Re: __dict__ of object, Was: Regular Expression IGNORECASE differentfor findall and split?

2005-09-07 Thread Mike Meyer
Chris <[EMAIL PROTECTED]> writes: > Fredrik Lundh wrote: >> Chris <[EMAIL PROTECTED]> wrote: >> >>>but more of a basic question following, I was doing the following before: >>> >>>method = 'split' # came from somewhere else of course >>>result = re.__dict__[method].(REGEX, TXT) >>> >>>precompiling

[ANN] PySuDoku version 0.2

2005-09-07 Thread Glenn Hutchings
Announcing PySuDoku version 0.2, yet another Sudoku program written in Python, featuring: * Cute interactive solving mode via Tkinter. * Puzzle generation option, for making your own puzzles. * Nicely packaged for installation via distutils. New in this release: * Now uses psyco module,

Re: encryption with python

2005-09-07 Thread Paul Rubin
James Stroud <[EMAIL PROTECTED]> writes: > Then your best bet is to take a reasonable number of bits from an sha hash. > But you do not need pycrypto for this. The previous answer by "ncf" is good, > but use the standard library and take 9 digits to lessen probability for > clashes > > import s

Re: Need help with C extension module

2005-09-07 Thread chris
Any tips on what the pyrex should look like for my example? -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP-able? Expressional conditions

2005-09-07 Thread Steven Bethard
Kay Schluehr wrote: > Terry Reedy wrote: >> *If* bool(result_expression_i) == True for all i, (except maybe last >> default expression), which is true for some actual use cases, then the >> following expression evaluates to the result corresponding to the first >> 'true' condition (if there is one

Using Python to interact with BMC Patrol

2005-09-07 Thread Andrew Robert
Hi Everyone, Has anyone done any Python coding to manage/interact/customize BMC Patrol? If anyone has, could you please point me to where I can find documentation/guides on this? I checked the Python SIGs and Vault of Parnasus but didn't see anything available. Any insight you might have on thi

Re: encryption with python

2005-09-07 Thread James Stroud
Also, I should note that the sha function will, to the limits of anyone's ability to analyze it, decouple the information from the hash. So, to be careful, you should keep the algorithm to generate the IDs secret. The advantage of creating an ID from info in this way is that the ID is ("should

Re: PEP-able? Expressional conditions

2005-09-07 Thread Terry Hancock
On Wednesday 07 September 2005 02:44 pm, Paul Rubin wrote: > Terry Hancock <[EMAIL PROTECTED]> writes: > > def ternary(condition, true_result, false_result): > > if condition: > > return true_result > > else: > > return false_result > > > > Almost as good, and you d

Re: Need help with C extension module

2005-09-07 Thread Robert Kern
chris wrote: > This is my first attempt at undertaking a C extension module. I want > to wrap an existing C library so I can call the functions from Python. > There are only two functions I'm interested in calling. I did mess > with Pyrex a bit and Swig, to no avail, so I turned to doing it by >

Re: Best dbm to use?

2005-09-07 Thread Ivan Voras
[EMAIL PROTECTED] wrote: > I'm creating an persistant index of a large 63GB file > containing millions of peices of data. For this I would > naturally use one of python's dbm modules. But which is the > best to use? BDB4, but consider using sqlite - it's really simple, holds all data in a single

Re: Construct raw strings?

2005-09-07 Thread Robert Kern
Thomas W wrote: > I got a stupid problem; on my WinXP-box I want to scan the filesystem > and enter a path to scan like this : > > path_to_scan = 'd:\test_images' path_to_scan = r'd:\test_images' > This is used in a larger context and joined like > > real_path_after_scanning = os.path.join(pat

Re: encryption with python

2005-09-07 Thread James Stroud
On Wednesday 07 September 2005 14:31, [EMAIL PROTECTED] wrote: > Basically I will like to combine a social security number (9 digits) > and a birth date (8 digits, could be padded to be 9) and obtain a new > 'student number'. It would be better if the original numbers can't be > traced back, they w

Re: Construct raw strings?

2005-09-07 Thread Benji York
Thomas W wrote: > I got a stupid problem; on my WinXP-box I want to scan the filesystem > and enter a path to scan like this : > > path_to_scan = 'd:\test_images' Note the lack of an "r" prefix and the \t sequence above. > The problem is that some of the parts being joined contains escape > c

Need help with C extension module

2005-09-07 Thread chris
This is my first attempt at undertaking a C extension module. I want to wrap an existing C library so I can call the functions from Python. There are only two functions I'm interested in calling. I did mess with Pyrex a bit and Swig, to no avail, so I turned to doing it by hand. Using the exampl

Construct raw strings?

2005-09-07 Thread Thomas W
I got a stupid problem; on my WinXP-box I want to scan the filesystem and enter a path to scan like this : path_to_scan = 'd:\test_images' This is used in a larger context and joined like real_path_after_scanning = os.path.join(path_to_scan, somepart, 'foo', 'bar', filename) Using os.path.exis

Re: Python CGI and Firefox vs IE

2005-09-07 Thread dimitri pater
On 7 Sep 2005 11:10:00 -0700, Jason <[EMAIL PROTECTED]> wrote: IE... Yeah, I  know what you mean. Here's another one that doesn't work in IE, but it does work in Firefox: canvas = pid.PILCanvas()  canvas.drawRect(0,400, 500, 0, fillColor=pid.floralwhite, edgeColor=pid.maroon ) # display stuff

Re: List of integers & L.I.S.

2005-09-07 Thread [EMAIL PROTECTED]
I coded a solution that can compute the ordering numbers for random.shuffle(range(1, 101)) in 2.5 seconds (typical, Win 2K Pro, Pentium 4 2.40GHz 785Meg RAM) Are you sure that this is not a homework problem? -- http://mail.python.org/mailman/listinfo/python-list

Re: bug in numarray?

2005-09-07 Thread Terry Reedy
"Xiangyi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I got the following segmentation fault. >> from numarray import * >> a = zeros((5,100), Float64) >> b = kroneckerproduct(a, identity(12)) >> segmentation fault > > If I use a = zeros((5,100)), everything is fine. Kind of weir

Re: encryption with python

2005-09-07 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Basically I will like to combine a social security number (9 digits) > and a birth date (8 digits, could be padded to be 9) and obtain a new > 'student number'. It would be better if the original numbers can't be > traced back, they will be kept in a database anyways. Hop

Re: encryption with python

2005-09-07 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Basically I will like to combine a social security number (9 digits) > and a birth date (8 digits, could be padded to be 9) and obtain a new > 'student number'. It would be better if the original numbers can't be > traced back, they will be kept in a database anyways. Ho

Re: bug in numarray?

2005-09-07 Thread [EMAIL PROTECTED]
python 2.4.1 numarray 1.3.1 works ok here. I'd try numarray 1.3.1 and see if it is unique to your version. Also, if you built it yourself, you might make sure you have sane CFLAGS. [EMAIL PROTECTED] ~ $ python Python 2.4.1 (#1, Sep 3 2005, 16:55:52) [GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pi

Re: bug in numarray?

2005-09-07 Thread Robert Kern
Xiangyi wrote: > Hi, there, > > I got the following segmentation fault. > >>from numarray import * >>a = zeros((5,100), Float64) >>b = kroneckerproduct(a, identity(12)) >>segmentation fault > > If I use a = zeros((5,100)), everything is fine. Kind of weird! > Can someone help me figure it out

Re: encryption with python

2005-09-07 Thread jlocc
Basically I will like to combine a social security number (9 digits) and a birth date (8 digits, could be padded to be 9) and obtain a new 'student number'. It would be better if the original numbers can't be traced back, they will be kept in a database anyways. Hope this is a bit more specific, th

bug in numarray?

2005-09-07 Thread Xiangyi
Hi, there, I got the following segmentation fault. > from numarray import * > a = zeros((5,100), Float64) > b = kroneckerproduct(a, identity(12)) > segmentation fault If I use a = zeros((5,100)), everything is fine. Kind of weird! Can someone help me figure it out? BTW, the python version is 2

Re: improvements for the logging package

2005-09-07 Thread Grig Gheorghiu
I recommend py.log (part of the py lib) as an example of a pythonic implementation of logging. It uses a keyword-based mechanism and it distinguishes between "producers" of log messages (i.e. your app) and "consumers" of log messages (i.e. stdout, stderr, a database, a mail server, etc.) You can d

Best dbm to use?

2005-09-07 Thread brianc
I'm creating an persistant index of a large 63GB file containing millions of peices of data. For this I would naturally use one of python's dbm modules. But which is the best to use? The index would be created with something like this: fh=open('file_to_index') db=dbhash.open('file_to_index.idx') f

Re: List of integers & L.I.S.

2005-09-07 Thread Dan Sommers
On 7 Sep 2005 09:48:52 -0700, "n00m" <[EMAIL PROTECTED]> wrote: > Given a list of N arbitrarily permutated integers from set {1..N}. > Need to find the ordering numbers of each integer in the LONGEST > increasing sequence to which this number belongs. Sample: > List: > [4, 5, 6, 1, 2, 7, 3] > Co

Re: can i move attribute values from one class to another?

2005-09-07 Thread nephish
oh wait. never mind , i figgured it out! thanks anyway -- http://mail.python.org/mailman/listinfo/python-list

Re: Ode to python

2005-09-07 Thread liquidbinary
[EMAIL PROTECTED] wrote: > Very good poem. > Mind if forward it around?? I'll include ur email ID if u don't mind Sure, spread the love of python! -- http://mail.python.org/mailman/listinfo/python-list

Re: Yielding a chain of values

2005-09-07 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > dude - this business is so confusing that you actually have to *think* > about it! > but python is all about simplicity. > with python, when I program - I don't think *about* it - I think it. or > something - don't make me think about it. > > so how about a "reyield" or

Re: PEP-able? Expressional conditions

2005-09-07 Thread Kay Schluehr
Terry Reedy wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > No, as I explained it is not a ternary operator and it can't easily be > > implemented using a Python function efficiently because Python does not > > support lazy evaluation. > > By *carefully* us

Re: dual processor

2005-09-07 Thread Michael Sparks
Thomas Bellman wrote: > Michael Sparks <[EMAIL PROTECTED]> writes: >> Similarly, from >> a unix command line perspective, the following will automatically take >> advantage of all the CPU's I have available: >>(find |while read i; do md5sum $i; done|cut -b-32) 2>/dev/null |sort > > No, it won'

can i move attribute values from one class to another?

2005-09-07 Thread nephish
heres the deal. i am working on a threading gui. pygtk in one class (main) is all the gui stuff, but in another class that is a thread, i am reading serial input. what i want to be able to do is take what read in the thread and print it in a textview in the gui class. here is what i have: class

Re: Yielding a chain of values

2005-09-07 Thread yairchu
dude - this business is so confusing that you actually have to *think* about it! but python is all about simplicity. with python, when I program - I don't think *about* it - I think it. or something - don't make me think about it. so how about a "reyield" or some other new keyword (cause reyield i

Re: PEP-able? Expressional conditions

2005-09-07 Thread Paul Rubin
Terry Hancock <[EMAIL PROTECTED]> writes: > def ternary(condition, true_result, false_result): > if condition: > return true_result > else: > return false_result > > Almost as good, and you don't have to talk curmudgeons into providing > it for you. Not the

Re: ~ after script filename?

2005-09-07 Thread presentt
Oh okay. Thank you all. Now that you mention it, the ~ makes sense; I know M$ Word uses a ~ in the temp files that it autosaves periodically. And I think I've seen it with M$ Notepad too. Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: determine if os.system() is done

2005-09-07 Thread Martin P. Hellwig
Lars Gustäbel wrote: > [Fredrik Lundh] > >>han har försökt, men hans tourette tog överhanden: > > > IMHO it's more likely an Asperger's syndrome. > > http://en.wikipedia.org/wiki/Asperger_Syndrome > I disagree, in his writings I found no evidence of autisme. Actually most of it can be classif

Re: encryption with python

2005-09-07 Thread James Stroud
This is either a very simple or a very open-ended question you have asked. Do you want to be able to recover the original numbers arbitrarily from the combination? What properties do you want the combination to have? Do you want to take the combination and a number and see if the number is in th

Re: Sockets: code works locally but fails over LAN

2005-09-07 Thread Bryan Olson
n00m wrote: > Btw, why we need send() if there is sendall()? Mostly because sendall() can block, even if you do all the select() and setblocking() magic. That's no problem in the threaded architecture we're using, but a deal-breaker for a single-threaded server. -- --Bryan -- http://mail.pytho

Re: encryption with python

2005-09-07 Thread ncf
Steve M wrote: > >My goal is to combine two different numbers and > encrypt them to create a new number that cann't be traced back to the > originals. > > Here's one: > def encrypt(x, y): > """Return a number that combines x and y but cannot be traced back > to them.""" > return x + y Or y

Improving Python docs (was Re: OpenSource documentation problems)

2005-09-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> Steve Holden <[EMAIL PROTECTED]> wrote: >.> >>>Bear in mind that the PSF made its very first grants last year. The >>>reason none of those grants was awarded to a documenta

Re: determine if os.system() is done

2005-09-07 Thread Steve Horsley
Xah Lee wrote: > suppose i'm calling two system processes, one to unzip, and one to > “tail” to get the last line. How can i determine when the first > process is done? > > Example: > > subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]); > > last_line=subprocess.Popen([r"/usr/bin/tail","

Re: dual processor

2005-09-07 Thread Michael Sparks
Jorgen Grahn wrote: > On Tue, 06 Sep 2005 08:57:14 +0100, Michael Sparks <[EMAIL PROTECTED]> > wrote: ... >> Are you so sure? I suspect this is due to you being used to writing code >> that is designed for a single CPU system. What if you're basic model of >> system creation changed to include sys

pickling objects in jython

2005-09-07 Thread Shahin Saadati
Hi, The following sample code is to pickle and unpickle an object. It works fine with CPython, but the unpickling fails in Jython and I receive an error stating that "A" is unsafe to unpickle (even though I believe I have the code to make "A" safe for unpickling). What do I do wrong and how can

Re: Ode to python

2005-09-07 Thread James Stroud
On Tuesday 06 September 2005 09:29 pm, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > Python or C? C is simply a pawn. > > Venomous problem? Pythons squeeze and constrict, until the problem is > > gone. > > Don't quit your day job. I beg to differ, perhaps we see a spark of inspiration: > Abol

Re: ~ after script filename?

2005-09-07 Thread Steve Horsley
presentt wrote: > Hello all, > > I just wrote a really simple script and named it helloworld.py. Inside > was only: > > #!/usr/bin/env > print "Hello, world" > > I used chmod to set the permissions, and ran it to see what happened (I > just started learning Python, if you couldn't guess) > > T

Re: PEP-able? Expressional conditions

2005-09-07 Thread Terry Reedy
"Kay Schluehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > No, as I explained it is not a ternary operator and it can't easily be > implemented using a Python function efficiently because Python does not > support lazy evaluation. By *carefully* using the flow-control operators

Re: Sniffer with RAW SOCKETS

2005-09-07 Thread Grant Edwards
On 2005-09-07, billiejoex <[EMAIL PROTECTED]> wrote: > Hi all. I'm trying to make a simple icmp sniffer by using > SOCK_RAW. Just a suggestion: you'd probably be better off using the PCAP library. > The code below works but ONLY if I first use the sendto() > function. Does anybody knows why? 'F

Re: Question about concatenation error

2005-09-07 Thread Terry Hancock
On Wednesday 07 September 2005 11:34 am, colonel wrote: > I am new to python and I am confused as to why when I try to > concatenate 3 strings, it isn't working properly. > > Here is the code: I'm not taking the time to really study it, but at first glance, the code looks like it's probably much

Re: Python CGI and Firefox vs IE

2005-09-07 Thread Jason
IE... Have to come up with a workaround, go back to the old . I'm about the only one who uses firefox in our facility. Thanks for the reply and the link. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI and Firefox vs IE

2005-09-07 Thread infidel
> I see what's happening, but I'm at a loss to figure out what to do > about it. Any help would be appreciated. Try giving the buttons different name attributes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about concatenation error

2005-09-07 Thread Terry Reedy
"colonel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > so can anyone tell me why "cleanlink" gets coverted to a list? > Is it during the slicing? Steve answered for you, but for next time, you could find out faster by either using the all-purpose debuging tool known as 'print'

Re: Python CGI and Firefox vs IE

2005-09-07 Thread Stephan Diehl
On Wed, 07 Sep 2005 10:50:15 -0700, Jason wrote: > Hey y'all, this falls under the murky realm of HTML, CGI and > Python...and IE. > > Python 2.4, using CGI to process a form. > > Basically I've got 3 buttons. Here's the HTML code: > > > All > Servers > type='submit'>WKPEA1 > type='submit'>

distutils question

2005-09-07 Thread Joachim Dahl
I am trying to make a customized install script for an extension module using the distutils.ccompiler class. I want to embed an existing makefile for the C libraries into the Python setup script, but I am not sure what's the right way to do it... E.g., say I want to compile a project as: gcc -

Sniffer with RAW SOCKETS

2005-09-07 Thread billiejoex
Hi all. I'm trying to make a simple icmp sniffer by using SOCK_RAW. The code below works but ONLY if I first use the sendto() function. Does anybody knows why? Regards from socket import * import select def recv(): while 1: if s in select.select([s],[],[],99)[0]: reply = s.

Python CGI and Firefox vs IE

2005-09-07 Thread Jason
Hey y'all, this falls under the murky realm of HTML, CGI and Python...and IE. Python 2.4, using CGI to process a form. Basically I've got 3 buttons. Here's the HTML code: All Servers WKPEA1 WKNHA2 And the code that's messing things up: fields = cgi.FieldStorage() if fields.has_key('displa

Re: epydoc CLI and many files

2005-09-07 Thread Dave Benjamin
Terry Hancock wrote: > On Monday 05 September 2005 08:10 am, Laszlo Zsolt Nagy wrote: > >>The problem is that now I have so many modules that the shell (cmd.exe) >>cannot interpret this as a one command. > > In POSIX systems, the shell expands wildcards into multiple files on > the command line

Re: py2exe 0.6.2 released

2005-09-07 Thread Bugs
As a big test of Thomas's excellent work with py2exe, I tried to create a single-file executable of the wxPython demo (demo.py). The executable was built (5.3MB) but gets a C++ runtime error when I try to execute? Here's the log: Traceback (most recent call last): File "demo.py", line 4, in ?

Re: PEP-able? Expressional conditions

2005-09-07 Thread Kay Schluehr
Terry Hancock wrote: > On Wednesday 07 September 2005 05:29 am, Kay Schluehr wrote: > > Instead of pushing statements into expressions one can try to do it the > > other way round and model expressions with the functionality of > > statements. > > > Alternative syntax proposals: > > > > (a) (COND

Re: improvements for the logging package

2005-09-07 Thread Trent Mick
[EMAIL PROTECTED] wrote] > Perhaps so, but the logging module seems like such an unpythonic beast to > me. How about cleaning it up (*) before we add more to it? Yes. I was also trying to encourage Rotem to get involved in other parts of the logging module/package later on in my email. :) > Stuf

Re: Question about concatenation error

2005-09-07 Thread Steve Holden
colonel wrote: > On Wed, 07 Sep 2005 16:34:25 GMT, colonel <[EMAIL PROTECTED]> > wrote: > > >>I am new to python and I am confused as to why when I try to >>concatenate 3 strings, it isn't working properly. >> >>Here is the code: >> >>-

Re: Possible improvement to slice opperations.

2005-09-07 Thread Ron Adam
Bengt Richter wrote: > Then the question is, do we need sugar for reversed(x.[a:b]) > or list(reversed(x.[a:b])) for the right hand side of a statement, > and do we want to to use both kinds of intervals in slice assignment? > (maybe and yes ;-) Yes, I think this is the better way to do it, as th

Re: Sockets: code works locally but fails over LAN

2005-09-07 Thread n00m
I was trying to test the send() vs sendall() like this: x=send(data) print len(data)-x > 0 ? (when the code fails) but I could not reproduce the failures anymore. As if the lan got "refreshed" after the first using of sendall() instead of send(). Btw, why we need send() if there is sendall()? -

Re: anaconda.real in RH7.1

2005-09-07 Thread Steve Holden
Allan Adler wrote: > Allan Adler <[EMAIL PROTECTED]> writes: > > >>I'm trying to reinstall RedHat 7.1 Linux on a PC that was disabled when >>I tried to upgrade from RH7.1 [] >>The file anaconda.real is invoked with the line >>exec /usr/bin/anaconda.real -T "$@" >>I don't know what effect the

Re: [Py2exe-users] py2exe 0.6.2 released

2005-09-07 Thread Ray Schumacher
First, Thanks again for the update. At 08:55 AM 9/7/2005, Thomas Heller wrote: > This part of the code is distributed under the MPL 1.1, so this > license is now pulled in by py2exe. As I read it, it seems that I need to include an Exibit A http://www.mozilla.org/MPL/MPL-1.1.html#exhib

Re: Code run from IDLE but not via double-clicking on its *.py

2005-09-07 Thread n00m
> Code run from IDLE but not via double-clicking on its *.py It still does not work. Weird. -- http://mail.python.org/mailman/listinfo/python-list

List of integers & L.I.S.

2005-09-07 Thread n00m
Given a list of N arbitrarily permutated integers from set {1..N}. Need to find the ordering numbers of each integer in the LONGEST increasing sequence to which this number belongs. Sample: List: [4, 5, 6, 1, 2, 7, 3] Corresponding ordering numbers: [1, 2, 3, 1, 2, 4, 3] Details: e.g. number 7 b

Re: Question about concatenation error

2005-09-07 Thread colonel
On Wed, 07 Sep 2005 16:34:25 GMT, colonel <[EMAIL PROTECTED]> wrote: >I am new to python and I am confused as to why when I try to >concatenate 3 strings, it isn't working properly. > >Here is the code: > >--

Question about concatenation error

2005-09-07 Thread colonel
I am new to python and I am confused as to why when I try to concatenate 3 strings, it isn't working properly. Here is the code: -- import string import sys import re import urllib linkArray = [] srcArray =

Re: Cleaning strings with Regular Expressions

2005-09-07 Thread sheffdog
Good Idea I'll try that! Thanks for your assistance. /\/\ -- http://mail.python.org/mailman/listinfo/python-list

Re: [Jython-users] ANN: PyDev 0.9.8.1 released

2005-09-07 Thread stri ker
I am a Mac OS X user running Tiger. The install was extremely easy and Eclipse seems to have some good features at first glance. For anyone interested after installing Eclipse you can download and install PyDev with the instructions on this page. They are for Windows, but other OS's should

Re: py2exe 0.6.1 released

2005-09-07 Thread Thomas Heller
[EMAIL PROTECTED] (Bengt Richter) writes: > If you have a place in the program where output should never happen > except when you would want a console window to see it in, you can > call AllocConsole [1] safely even in multiple such places, just before > the printing, and the first such call will

Re: py2exe 0.6.1 released

2005-09-07 Thread Thomas Heller
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > >>> I tried it using the wx singlefile example, but unfortunately the >>> resulting executable segfaults at startup (using Python 2.3.3 on >>> Windows 2000, with latest wxWindows). >> >> Yes, I can reproduce that. I'm still usin

py2exe 0.6.2 released

2005-09-07 Thread Thomas Heller
This is a bugfix release for py2exe 0.6.1. py2exe 0.6.2 released = py2exe is a Python distutils extension which converts python scripts into executable windows programs, able to run without requiring a python installation. Console and Windows (GUI) applications, windows NT se

Re: encryption with python

2005-09-07 Thread Steve M
>My goal is to combine two different numbers and encrypt them to create a new number that cann't be traced back to the originals. Here's one: def encrypt(x, y): """Return a number that combines x and y but cannot be traced back to them.""" return x + y -- http://mail.python.org/mailman/l

Re: anaconda.real in RH7.1

2005-09-07 Thread Allan Adler
Allan Adler <[EMAIL PROTECTED]> writes: > I'm trying to reinstall RedHat 7.1 Linux on a PC that was disabled when > I tried to upgrade from RH7.1 [] > The file anaconda.real is invoked with the line > exec /usr/bin/anaconda.real -T "$@" > I don't know what effect the -T "$@" has. Tiny progre

python and ARCView GIS desktop

2005-09-07 Thread GISDude
hi all. I am a newbie, so be kind. I am using ARCView GIS 9.1 and python win. I am trying to develop a module using the GZIP module in my ARCView map session. What I am attempting to do (I think) is use the zip mod to zip up all the files in a .mxd document into one neat little zipped file, ready t

  1   2   >