dynamically generating temporary files through python/cgi

2005-04-27 Thread poisondart
Is there a way to dynamically generate temporary files (such as an html, xml or text file) in Python? I'm not sure if I'm explaining myself clearly as I've no clue how to describe this mechanism. I've seen it on certain websites that will generate a file under certain parameters (through forms) th

Re: Which IDE is recommended?

2005-04-27 Thread Ville Vainio
> "pydev" == Brian Beck <[EMAIL PROTECTED]> writes: pydev> * PyDev isn't yet mature enough to make it practical for me What version? PyDev has increased in maturity quite a bit lately. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: pyqt and Eric 3

2005-04-27 Thread Phil Thompson
On Thursday 28 April 2005 3:46 am, ChrisH wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] says... > > > Are there any Eric 3 users out there? > > > > I've been thinking about trying it. > > > > Also, if I write scripts for internal use only at my company, do I have > > to purchase a Qt

Re: creating very small types

2005-04-27 Thread Michael Spencer
andrea wrote: No it's not for homework but for learning purposes... Bengt wrote: I think I prefer little-endian bit streams though, good point: should lead to easier decoding via right-shifts e.g. (just hacked, not tested beyond what you see Yep, yours looks better. Pretty soon there isn't going

Re: Question about python code distribution...

2005-04-27 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Hi, > > I am sure that this question might have come up repeatedly. Companies > may not want to distribute their python code in source form. Even > though pyc files are one option, it gets inconvenient to distribute > bunch of them . If there is some way to bundle pyc fi

Re: regex over files

2005-04-27 Thread Bengt Richter
On Wed, 27 Apr 2005 21:39:45 -0500, Skip Montanaro <[EMAIL PROTECTED]> wrote: > >Robin> I implemented a simple scanning algorithm in two ways. First > buffered scan >Robin> tscan0.py; second mmapped scan tscan1.py. > >... > >Robin> C:\code\reportlab\demos\gadflypaper>\tmp\tscan0.

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-27 Thread Michele Simionato
Mir Nazim: > Can you please brief me a bit about your decision to CherryPy Decision? I made no decision about CherryPy, I am actually a Quixote user. I evalued CherryPy six months ago and I did not like it, since they were using custom classes and a strange compilation procedure. However, from th

Re: python equivalent of php implode

2005-04-27 Thread Dave Cook
On 2005-04-27, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Wed, 27 Apr 2005 08:44:36 +0200, Ola Natvig <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: >> sql = "INSERT INTO %s (%s) VALUES (%s)" % (table, ','.params.keys()), >> ','.join(param.values())) > That also

Re: creating very small types

2005-04-27 Thread Bengt Richter
On Wed, 27 Apr 2005 15:54:54 -0700, Michael Spencer <[EMAIL PROTECTED]> wrote: >andrea wrote: I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? > I had a look to t

Re: How do I parse this ? regexp ?

2005-04-27 Thread Paul McGuire
Jake - If regexp's give you pause, here is a pyparsing version that, while verbose, is fairly straightforward. I made some guesses at what some of the data fields might be, but that doesn't matter much. Note the use of setResultsName() to give different parse fragments names so that they are dir

Re: Fast plotting?

2005-04-27 Thread William Park
Russell E. Owen <[EMAIL PROTECTED]> wrote: > Can anyone recommend a fast cross-platform plotting package for 2-D > plots? > > Our situation: > We are driving an instrument that outputs data at 20Hz. Control is via > an existing Tkinter application (which is being extended for this new > instrum

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-27 Thread Mir Nazim
Can you please brief me a bit about your decision to CherryPy -- http://mail.python.org/mailman/listinfo/python-list

Re: bytecode non-backcompatibility

2005-04-27 Thread "Martin v. Löwis"
Maurice LING wrote: > I've emailed to catelog-sig mailing list and is still waiting to hear > something. Currently, I have no idea of the structure of PyPI. I hope I > can hear from them soon and generate some starting points... Posting questions is not the only way to find answers. The source cod

Re: bytecode non-backcompatibility

2005-04-27 Thread "Martin v. Löwis"
Maurice LING wrote: >> I doubt anyone disputes that upgrades are more hassle than we would >> like. My main point was that freezing CPython's technology is not the >> solution. Any other upgrade helper that you can contribute will be >> welcome. > > So there is no way of releasing a close-source a

Re: win32ui CreateFileDialog SLOW (since the SP2 Windows XP patch?)

2005-04-27 Thread MsKitty
Neil - Interesting theory, but I installed brand new versions of Python (2.4.1) and the win32 extensions on a machine that had no Python and got the the same 4 minute response time, so that does not seem a likely explanation, although its possible. - Kitty -- http://mail.python.org/mailman/list

Re: Can .py be complied?

2005-04-27 Thread steve.leach
Harlin Seritt wrote: Hi monkey, Not a stupid question especially if you're trying to create commercial software and don't want to reveal your source. At any rate, you can use py2exe to create a .exe file. It does have some cons to it since you Some very severe cons considering that would mean his c

TKinter and Python Sync. Problems

2005-04-27 Thread Brian Kazian
I am currently having trouble running a piece of code I have written. My main code is called new.py, and when I run it, it pops up the TKinter root window as specified. However, if I try perform a function that uses an imported module, the code crashes, giving me this error: Exception in Tki

Re: PyGTK vs. wxPython

2005-04-27 Thread dcrespo
> Really though, these questions are more suited for the wxPython mailing list. Thank you very much for this acclaration :) -- http://mail.python.org/mailman/listinfo/python-list

urllib2 file upload error

2005-04-27 Thread Thomas
    import urllib2 URL = '' FILE= 'c:/Documents and Settings/Administrator/Desktop/Vousleve 1 .pps'; d = [ ('cmd', 'add-item'),   ('protocol_version', '2.1'),   ('userfile', open(FILE)),     ] req = urllib2.Request(URL, d) try:     u = urllib2.urlopen(req) except urllib2

Question about python code distribution...

2005-04-27 Thread [EMAIL PROTECTED]
Hi, I am sure that this question might have come up repeatedly. Companies may not want to distribute their python code in source form. Even though pyc files are one option, it gets inconvenient to distribute bunch of them . If there is some way to bundle pyc files (akin to .jar), it would be reall

Re: PyGTK vs. wxPython

2005-04-27 Thread Jaime Wyant
On 27 Apr 2005 11:31:00 -0700, dcrespo <[EMAIL PROTECTED]> wrote: > Correct me if I'm wrong: XRCed doesn't allow to do MDI Parent and Child > frames, but simple apps only. > For what you wouldn't use it? And instead, what would you use instead? > GUI Hand coding? > > Daniel > Looking at the docs

Re: regex over files

2005-04-27 Thread Skip Montanaro
Robin> I implemented a simple scanning algorithm in two ways. First buffered scan Robin> tscan0.py; second mmapped scan tscan1.py. ... Robin> C:\code\reportlab\demos\gadflypaper>\tmp\tscan0.py dingo.dat Robin> len=139583265 w=103 time=110.91 Robin> C:\code\reportlab\de

Re: pyqt and Eric 3

2005-04-27 Thread ChrisH
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Are there any Eric 3 users out there? > > I've been thinking about trying it. > > Also, if I write scripts for internal use only at my company, do I have > to purchase a Qt or pyqt license? > > Thanks for the info! > Chris > Oops..

pyqt and Eric 3

2005-04-27 Thread ChrisH
Are there any Eric 3 users out there? I've been thinking about trying it. Also, if I write scripts for internal use only at my company, do I have to purchase a Qt or pyqt license? Thanks for the info! Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with sending a variable(python) while using html

2005-04-27 Thread Hal Rosser
append "&eventid=str(variable_name)" to the url in the link The hidden field is not sent unless the form is submitted. If you use the link - you send the data appended to the url "Hansan" wrote in message news:[EMAIL PROTECTED] > Hi. > > Sorry forgot to post a "non-working" example > > That coul

Re: PyGTK vs. wxPython

2005-04-27 Thread dcrespo
Ok, I get the point. So, when a dynamic component comes up, It can be handled importing from an XRC file? I have to develop a complete MDI app, so I'm realizing that I will get ride of hand-coding it. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better interactive plotter then pylab?

2005-04-27 Thread Charles Krug
On Wed, 27 Apr 2005 20:56:07 -0500, John Hunter <[EMAIL PROTECTED]> wrote: >> "Charles" == Charles Krug <[EMAIL PROTECTED]> writes: > >Charles> List: I'm trying to us pylab to see what I'm doing with >Charles> some DSP algorithms, in case my posts about convolution >Charles> and ff

Re: Problem with sending a variable(python) while using html

2005-04-27 Thread Jaime Wyant
On 4/27/05, Hansan <[EMAIL PROTECTED]> wrote: > Hi. > > Sorry forgot to post a "non-working" example > > That could be > print "", "some text" type=hidden name="eventid" value='''+str(variable_name)+'''>'''" > > I know that it isnt very creative, but I am having a hard time getting html > to w

converting binary data

2005-04-27 Thread Dan Stromberg
I've written up a page about how to convert native binary data to another platform's native binary data, as I did some fortran data conversions for a client. The programs and documentation are at: http://dcs.nac.uci.edu/~strombrg/converting-binary.html So far, the page includes a variety of pro

Re: Ron Grossi: God is not a man

2005-04-27 Thread Matt Hayden
Johnny Gentile wrote: > C'mon. Everyone knows God plays a Martin. I dunno. I think God has a honkin' big collection so he won't offend ANY luthiers when they come to visit. SOMEONE has to set up his guitars... mh -- http://mail.python.org/mailman/listinfo/python-list

Re: kdialog and unicode

2005-04-27 Thread dmbkiwi
John Ridley wrote: > dmbkiwi wrote: > > > I'm trying to get python, unicode and kdialog to play nicely > together. > > This is a linux machine, and kdialog is a way to generate dialog > boxes in > > kde with which users can interact (for example input text), and you > can > > use the outputted tex

Re: win32ui CreateFileDialog SLOW (since the SP2 Windows XP patch?)

2005-04-27 Thread Neil Hodgson
Kitty: > Now it can take up to 4 minutes for the file dialog box to appear. No > problems with speed in PythonWin, of course, but she is not used to > doing that. Any suggestions? Anyone know why it is so slow? I have seen similar issues in the past but mainly on Windows 9x with particular st

Re: Is there a better interactive plotter then pylab?

2005-04-27 Thread John Hunter
> "Charles" == Charles Krug <[EMAIL PROTECTED]> writes: Charles> List: I'm trying to us pylab to see what I'm doing with Charles> some DSP algorithms, in case my posts about convolution Charles> and ffts weren't giving it away. Charles> I've been using pylab's plot function, b

Re: suggestions on how to do this

2005-04-27 Thread bwaha
Hi bgs Many thanks. This generates the correct coefficients. I am studying your implementation now. I've not used a dictionary of dictionaries before so there's a bit of a learning curve going on right now. However I can see that b[k] holds the relevant info (coefficients and powers) so I can eas

Re: Trigraph Idiom - Original?

2005-04-27 Thread Shane Hathaway
Jeff Winkler wrote: > I've come up with a trigraph idiom, am curious if it's been done before > (probably). I like to use trigraphs occasionally. > > Scenario: I'm doing an RSS->Javascript conversion for our intranet. I'd > like to use different CSS class if a post is new. Code: > > hoursOld=abs(

Re: Shutting down twisted reacotr

2005-04-27 Thread Jason Mobarak
Why do you want to do this in a thread? What's wrong with reactor.callLater? import time from twisted.internet import reactor def shutdown(): time.sleep(3) print "stopping" reactor.callFromThread(reactor.stop) reactor.callInThread(shutdown) reactor.run() -- http://mail.python.org/

Re: Trigraph Idiom - Original?

2005-04-27 Thread Michael Spencer
Jeff Winkler wrote: I've come up with... cssClass=['rssLink','rssLinkNew'][hoursOld<12] Not hideous, but: >>> cssClass=('rssLink','rssLinkNew')[hoursOld<12] is IMO, slightly less surprising, and in this context: >>> cssClass = hoursOld<12 and 'rssLinkNew' or 'rssLink' >>> reads better too Micha

Is there a better interactive plotter then pylab?

2005-04-27 Thread Charles Krug
List: I'm trying to us pylab to see what I'm doing with some DSP algorithms, in case my posts about convolution and ffts weren't giving it away. I've been using pylab's plot function, but I'm finding it a bit cumbersome. It works, but if I switch from the interactive window to the plot window an

Re: suggestions on how to do this

2005-04-27 Thread bgs
You could probably use scipy.base.polynomial, but it's easy enough to implement a polynomial yourself. Just use a dict-- each key represents the power and each value the coefficient of the polynomial. You didn't say exactly how efficient you need this. It takes only a couple seconds to sum 100 o

Re: Which IDE is recommended?

2005-04-27 Thread Dave Cook
On 2005-04-27, monkey <[EMAIL PROTECTED]> wrote: > Read through python site for programming tool, really plenty of choices :-) > (For c++, I just can't breath with very very limited choices) > > Tried Spe, it come with wxGlade built-in very nice(is Spe still actively > develop?). But seem that Boa

Re: creating very small types

2005-04-27 Thread Dan Bishop
Michael Spencer wrote: > andrea wrote: > >>>I was thinking to code the huffman algorithm and trying to compress > >>>something with it, but I've got a problem. > >>>How can I represent for example a char with only 3 bits?? > > >>>I had a look to the compression modules but I can't understand them m

Re: Trigraph Idiom - Original?

2005-04-27 Thread John Machin
On 27 Apr 2005 16:26:02 -0700, "Jeff Winkler" <[EMAIL PROTECTED]> wrote: >I've come up with a trigraph idiom, am curious if it's been done before >(probably). I like to use trigraphs occasionally. > >Scenario: I'm doing an RSS->Javascript conversion for our intranet. I'd >like to use different CS

Re: kdialog and unicode

2005-04-27 Thread John Ridley
dmbkiwi wrote: > I'm trying to get python, unicode and kdialog to play nicely together. > This is a linux machine, and kdialog is a way to generate dialog boxes in > kde with which users can interact (for example input text), and you can > use the outputted text in your script. > > Anyway, what I

Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you are, nor if you are a church member, but are you saved? Are you sure you will go to Heaven when you die? GOOGLE·NEWSGROUP·POST·151

2005-04-27 Thread George Sakkis
wrote in message news:[EMAIL PROTECTED] > Reports to [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], > [EMAIL PROTECTED], [EMAIL PROTECTED] > > And do not feed the troll! I'm afraid he's not a troll. He's just a lame spammer, doesn't need feeding to survive... In any case, the hell with

Re: suggestions on how to do this

2005-04-27 Thread cfriedl
Hi Bengt OK, that's right. So I'm curious how you did this. And any comments on how to collect coefficients of like powers in your result. Be Well and Happy Always Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: suggestions on how to do this

2005-04-27 Thread cfriedl
Hi Terry I apprecaite the advice. Briefly I'm familiar with the math (its an eigenvalue problem in fluid flow) but not so much with python (3 months on and off), hence my post here. I'm looking for python advice on how to implement this effectively. I love python and would like to use it well. As

Re: Lexicographical sort for numarray

2005-04-27 Thread Jason Mobarak
Ah, okay, I didn't remember correctly what arr.tolist did. My mistake. -- http://mail.python.org/mailman/listinfo/python-list

Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you are, nor if you are a church member, but are you saved? Are you sure you will go to Heaven when you die? GOOGLE·NEWSGROUP·POST·151

2005-04-27 Thread Please
Reports to [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] And do not feed the troll! -- http://mail.python.org/mailman/listinfo/python-list

win32ui CreateFileDialog SLOW (since the SP2 Windows XP patch?)

2005-04-27 Thread MsKitty
My client is used to clicking on the script name on her PC and getting a windows command line box which it runs in. Not fancy but did the job until recently... Now it can take up to 4 minutes for the file dialog box to appear. No problems with speed in PythonWin, of course, but she is not used to

Re: Which IDE is recommended?

2005-04-27 Thread runes
I used Boa for a Win32 project. It helped me enormously. It's very easy to design windows etc. But the generated python code is not beautiful. -- http://mail.python.org/mailman/listinfo/python-list

Trigraph Idiom - Original?

2005-04-27 Thread Jeff Winkler
I've come up with a trigraph idiom, am curious if it's been done before (probably). I like to use trigraphs occasionally. Scenario: I'm doing an RSS->Javascript conversion for our intranet. I'd like to use different CSS class if a post is new. Code: hoursOld=abs(time.time()-time.mktime(i.modified

Re: Python, Perl & PDF files

2005-04-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, rbt <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: >> In article <[EMAIL PROTECTED]>, >> rbt <[EMAIL PROTECTED]> wrote: >> . >> . >> . >> >>>Read and search them for strings. If I could do that on wi

mbx repair script

2005-04-27 Thread David Isaac
I'm looking for a Python script to repair the mbx header for a mail file where only the header is corrupted. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: creating very small types

2005-04-27 Thread Michael Spencer
andrea wrote: I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? I had a look to the compression modules but I can't understand them much... ... I understand I can't do it easily i

Re: bytecode non-backcompatibility

2005-04-27 Thread Maurice LING
Martin v. Löwis wrote: [automatically install a set of packages] What do you think? That would certainly be possible. Contributions are welcome. Regards, Martin I've emailed to catelog-sig mailing list and is still waiting to hear something. Currently, I have no idea of the structure of PyPI. I h

Descriptor Transparency

2005-04-27 Thread Eric Huss
I'm trying to write a descriptor (similar to the EiffelDescriptor example in the Demo directory). However, I noticed an odd behavior that descriptors written in pure Python mask the underlying object they are wrapping, whereas the descriptors written in C do not. For example, taking the code from

Re: bytecode non-backcompatibility

2005-04-27 Thread Maurice LING
Terry Reedy wrote: I doubt anyone disputes that upgrades are more hassle than we would like. My main point was that freezing CPython's technology is not the solution. Any other upgrade helper that you can contribute will be welcome. Terry J. Reedy So there is no way of releasing a close-source

Re: creating very small types

2005-04-27 Thread andrea
Jeremy Bowers wrote: >On Wed, 27 Apr 2005 22:17:07 +0200, andrea wrote: > > > >>I was thinking to code the huffman algorithm and trying to compress >>something with it, but I've got a problem. >>How can I represent for example a char with only 3 bits?? >>I had a look to the compression modules b

Re: [pygame] Very simple program fails. Why?

2005-04-27 Thread Sizer
"Brent W. Hughes" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I'm just starting to learn pygame. I write what I think is just about > the simplest program that should display a window and then quit. > #--- > import sys > import time > import

Re: creating very small types

2005-04-27 Thread Jeremy Bowers
On Wed, 27 Apr 2005 22:17:07 +0200, andrea wrote: > I was thinking to code the huffman algorithm and trying to compress > something with it, but I've got a problem. > How can I represent for example a char with only 3 bits?? > I had a look to the compression modules but I can't understand them muc

Re: tkinter text width

2005-04-27 Thread Jeremy Bowers
On Wed, 27 Apr 2005 12:52:21 -0700, James Stroud wrote: > Thank you to everybody helping me. I think I am almost there... > > On Wednesday 27 April 2005 12:10 pm, so sayeth Jeremy Bowers: >> 2. Use a fixed-width font and manually wrap. (It's pretty easy then, you >> can ask the font for how wide

Re: Lexicographical sort for numarray

2005-04-27 Thread Robert Kern
Jason Mobarak wrote: It does what the OPs example does, but with numeric types. It certainly does not. In [15]:arr = na.arange(100) In [16]:random.shuffle(arr) In [17]:arr.shape = (10,10) In [18]:arr2 = na.array(arr) In [19]:L = arr.tolist() In [20]:L.sort() In [21]:na.array(L) Out[21]: array([[ 8,

Re: interactive web graphics

2005-04-27 Thread Diez B. Roggisch
> I would like a form with progress bars, but I guess > that would have to be implemented in some special way. > Sorry if these questions are ill-posed; I am just > getting my feet wet with python. Larry already said some true things about this. Let me just add that what you are after _might_ be d

Re: PyGTK vs. wxPython

2005-04-27 Thread Szabolcs Nagy
I forgot to mention in my previous post that the best thing in wxPython is the wxPython demo. It helped me a lot. Browsing through the examples usually faster than browsing through the api doc. About XRCed: I put every static components of the window layout in an xml file with XRCed (not static co

Re: Lexicographical sort for numarray

2005-04-27 Thread Jason Mobarak
It does what the OPs example does, but with numeric types. -- http://mail.python.org/mailman/listinfo/python-list

Re: interactive web graphics

2005-04-27 Thread Larry Bates
Web application are different than local or client server applications. Web browser can connect to a server and make a request, but the program that satisfies the request runs to completion and disconnects from the client. You cannot easily do interactive-type applications. Things like progress

Re: Lexicographical sort for numarray

2005-04-27 Thread Robert Kern
Jason Mobarak wrote: import numarray as na import random # example array arr = range(100) random.shuffle(arr) arr = na.array(arr) arr = na.reshape(arr, (10,10)) print arr # not rowsort'ed arr.flat.sort() # key line print arr # rowsort'ed That's definitely not a lexicographic sort. -- Robert Kern [E

Re: Which IDE is recommended?

2005-04-27 Thread Bruno Desthuilliers
monkey a écrit : Read through python site for programming tool, really plenty of choices :-) (For c++, I just can't breath with very very limited choices) Tried Spe, it come with wxGlade built-in very nice(is Spe still actively develop?). But seem that Boa Constructor and PyDev(the plug-in for Ecli

Re: kdialog and unicode

2005-04-27 Thread dmbkiwi
John Machin wrote: > On 26 Apr 2005 19:16:25 -0700, [EMAIL PROTECTED] wrote: > > > > >John Machin wrote: > >> On 26 Apr 2005 13:39:26 -0700, [EMAIL PROTECTED] (dumbkiwi) wrote: > >> > >> >Peter Otten <[EMAIL PROTECTED]> wrote in message > >news:<[EMAIL PROTECTED]>... > >> >> Dumbkiwi wrote: > >> >

Re: Secure FTP

2005-04-27 Thread Steve Horsley
Daniel Bowett wrote: I need to download files over a secure channel. I have been looking into Paramiko which seems to have the functonality I need. The problem is I need a FTP server which supports key based encryption to install on my windows server. Has anyone succeeded in doing this? If so -

interactive web graphics

2005-04-27 Thread Eckhoff, Michael A
Hello, I failed to locate a list for pygtk, so I thought I'd ask my question here. Is it possible to write CGI scripts that bring up a GUI (as in GTK+, QT, Tk, ...) or an openGL display that is windowed inside a web browser? The answer would seem to me to be no, since the client could be Windows

Re: Lexicographical sort for numarray

2005-04-27 Thread Jason Mobarak
import numarray as na import random # example array arr = range(100) random.shuffle(arr) arr = na.array(arr) arr = na.reshape(arr, (10,10)) print arr # not rowsort'ed arr.flat.sort() # key line print arr # rowsort'ed -- http://mail.python.org/mailman/listinfo/python-list

Re: compile shebang into pyc file

2005-04-27 Thread rbt
Fredrik Lundh wrote: Joerg Schuster wrote: > #!/usr/bin/env python > import app Yes, of course this is a possibility. But it implies having (or giving away) two files. yeah, think of all the disk space you'll waste! Because if you have two files, you need a third one: a README that tells you what

Re: how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread Steven Bethard
Lonnie Princehouse wrote: Might as well make a class for Book instead of dealing with buckets of lists... class Book(object): def __init__(self, title, author, publisher, isbn, date):# add more fields according to CSV self.__dict__.update(locals()) # lazy! Just for any newbies not

Re: Problem with sending a variable(python) while using html

2005-04-27 Thread Hansan
Hi. Sorry forgot to post a "non-working" example That could be print "", "some text" '''" I know that it isnt very creative, but I am having a hard time getting html to work together with python. When the link "some text" is clicked I want to send both the first variable called variable and

Re: how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread Lonnie Princehouse
Might as well make a class for Book instead of dealing with buckets of lists... class Book(object): def __init__(self, title, author, publisher, isbn, date):# add more fields according to CSV self.__dict__.update(locals()) # lazy! def __repr__(self): return '<"%s" by %

Inheriting socket handles on Windows

2005-04-27 Thread Iker Arizmendi
Hello all. I'm trying to get a server process to do the following on both Linux and Windows: 1) Create a socket and bind it to some port number. 2) Use spawnl to create other processes that will then listen and accept on that socket. On Linux I've managed to do that by using command lin

creating very small types

2005-04-27 Thread andrea
I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? I had a look to the compression modules but I can't understand them much... Thank you very much Any good link would be appreciate

Shutting down twisted reacotr

2005-04-27 Thread Operation Latte Thunder
I have a simple ( I hope ) problem that I have been baning my head against all day. I have isolated it down to a very small demo script, which I will include below. Basically, I want to have twisted run until an event makes it stop. My problem is that my reactor.stop() doesn't seem to do anything

Re: suggestions on how to do this

2005-04-27 Thread Kay Schluehr
Seems You are looking for a generating function of a recurrence relation. There is a standard text about this topic written by Herbert S. Wilf downloadable from his homapage: http://www.cis.upenn.edu/~wilf/ Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter text width

2005-04-27 Thread James Stroud
Thank you to everybody helping me. I think I am almost there... On Wednesday 27 April 2005 12:10 pm, so sayeth Jeremy Bowers: > 2. Use a fixed-width font and manually wrap. (It's pretty easy then, you > can ask the font for how wide any char is and do the math from there.) How might I query the s

Re: odeint function in SciPy

2005-04-27 Thread Robert Kern
FLChamp wrote: I was wondering what numerical method the odeint function is based on. I have checked the documentation but couldnt find anything. I would be very grateful if someone could answer this question for me, I'm not looking for a heavy mathematical answer! You could also check the source o

odeint function in SciPy

2005-04-27 Thread FLChamp
I was wondering what numerical method the odeint function is based on. I have checked the documentation but couldnt find anything. I would be very grateful if someone could answer this question for me, I'm not looking for a heavy mathematical answer! Cheers! Ben -- http://mail.python.org/mailma

Re: Problem with sending a variable(python) while using html

2005-04-27 Thread Jaime Wyant
On 4/27/05, Hansan <[EMAIL PROTECTED]> wrote: > Hi all. > > I am working on a webpage where I use python and html. > > When I want to send one variable to a new script/page I use the following > code: > 0) print ''' value='''+str(variable_name)+'''>''' > > This works fine, the problem occurs whe

Re: Design advice for unit test asserters

2005-04-27 Thread Gary
First, thanks to both Kent and Edvard for useful comments. I certainly need to consider whether it make sense to switch to py.test at this time; its simplicity is attractive. In response to Edvards question: Edvard Majakari wrote: > "Gary" <[EMAIL PROTECTED]> writes: ... > > self.Assert

How to launch an application on a remote computer using Python

2005-04-27 Thread Milon
I have 2 computers hooked to the same network. One of the computer has Python installed, and I want to write a python script to launch "c:\notepad.exe" on the second computer, how do I do this? (Note: Python is not installed on the second computer) Thanks. -- http://mail.python.org/mailman/lis

Re: tkinter text width

2005-04-27 Thread Jeremy Bowers
On Wed, 27 Apr 2005 10:52:14 -0700, James Stroud wrote: > This is more or less what I would like, but I would also like to probe the > Text to see how many characters it thinks it can display within the container > window. I am formatting text dynamically and so I rely on the width. I am not > a

Problem with sending a variable(python) while using html

2005-04-27 Thread Hansan
Hi all. I am working on a webpage where I use python and html. When I want to send one variable to a new script/page I use the following code: 0) print '' This works fine, the problem occurs when I want to send a variable to a page while using a 1)meta refresh or a 2)Href. 1) and 2) works

Re: bytecode non-backcompatibility

2005-04-27 Thread "Martin v. Löwis"
Maurice LING wrote: > So if C extension API (or whatever that is really called) is stable, the > system admin can just copy all of /sw/lib/python2.3/site-packages into > /sw/lib/python2.4/site-packages and it should work. It would be counter-productive to make it stable, as this would render cert

Re: suggestions on how to do this

2005-04-27 Thread Bengt Richter
On Wed, 27 Apr 2005 11:34:53 GMT, "chris" <[EMAIL PROTECTED]> wrote: >The problem I have is as follows: > >I have a recursive function b(k) > >b(k) = -(A/k**2)*(b(k-2) - b(k-5)) >k<0, b(k)=0 >k=0, b(k)=1 >k=1, b(k)=0 > >eg. b(2) = -A/4 > b(3) = 0 > b(4) = A**2/64 > >note that as k increa

Re: how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread Steven Bethard
James Stroud wrote: Oops, last one had a typo: a = ['bob', 'greg', 'cindy', 'alice'] b = ['fred','barney','betty','wilma','pebbles','bambam'] c = ['jed', 'granny', 'jethro', 'ellie-mae'] d = ['bob','carol','ted','alice'] e = [a,b,c,d] for ary in e: print ary e.sort(lambda x,y:cmp(x[1],y[1])) for

Re: PyGTK vs. wxPython

2005-04-27 Thread dcrespo
Correct me if I'm wrong: XRCed doesn't allow to do MDI Parent and Child frames, but simple apps only. For what you wouldn't use it? And instead, what would you use instead? GUI Hand coding? Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: List comprehension and FieldStorage

2005-04-27 Thread Derek Basch
Sorry Peter. I will refrain from nudging in the future. I did spend time at the interactive prompt and got nothing. Maybe I will have better luck next time. -- http://mail.python.org/mailman/listinfo/python-list

Re: List comprehension and FieldStorage

2005-04-27 Thread Peter Hansen
Derek Basch wrote: bump If "bump" is supposed to be some kind of nudge to get people to reply, please have more patience. You posted only sometime late yesterday, and many people take up to a few days to receive the posts from this newsgroup, and even those who don't shouldn't be expected to re

Re: how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread [EMAIL PROTECTED]
What you want I guess is to read first all lines of the file into a string as you did, and then let the split method split it based on newlines only - see example below. Then you use split again to put all elements of one line into another list - split it on commas. Now you can define sortfunctio

Re: how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread James Stroud
Oops, last one had a typo: a = ['bob', 'greg', 'cindy', 'alice'] b = ['fred','barney','betty','wilma','pebbles','bambam'] c = ['jed', 'granny', 'jethro', 'ellie-mae'] d = ['bob','carol','ted','alice'] e = [a,b,c,d] for ary in e: print ary e.sort(lambda x,y:cmp(x[1],y[1])) for ary in e: pr

Re: names of methods, exported functions

2005-04-27 Thread M.E.Farmer
Appears that most of the relevant code is in the Helper and TextDoc classes of pydoc also might need the doc() function. My head hurts every time I stare at the internals of pydoc ;) I guess it is time for a lunch break. M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

Re: how can I sort a bunch of lists over multiple fields?

2005-04-27 Thread James Stroud
I think if you work backwards, it comes out: a = ['bob', 'greg', 'cindy', 'alice'] b = ['fred',barney','betty','wilma','pebbles','bambam'] c = ['jed', 'granny', 'jethro', 'ellie-mae'] d = ['bob','carol','ted','alice'] e = [a,b,c,d] for ary in e: print ary e.sort(lambda x,y:cmp(x[1],y[1])) fo

Re: List comprehension and FieldStorage

2005-04-27 Thread Derek Basch
bump -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter text width

2005-04-27 Thread James Stroud
On Wednesday 27 April 2005 02:31 am, so sayeth Eric Brunel: > The "trick" is to create the Text as small as possible (width=1, height=1), > make it fill its whole container (pack(fill=BOTH, expand=1)), then set the > dimensions for the container window (geometry('500x200')). You'll get a > Text tha

  1   2   >