Re: Bounding box on clusters in a 2D list

2005-04-24 Thread [EMAIL PROTECTED]
Richter,yes what I am looking for is for cluster with rectangular bounding boxes as you explained in the first figure. -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse: store callback return value

2005-04-24 Thread [EMAIL PROTECTED]
gs() - -print options, args prints when executed with or without argument: [EMAIL PROTECTED]:~$ ./test2.py --foo saw foo {} [] [EMAIL PROTECTED]:~$ ./test2.py {} [] [EMAIL PROTECTED]:~$ -- http://mail.python.org/mailman/listinfo/python-list

Re: Bounding box on clusters in a 2D list

2005-04-24 Thread [EMAIL PROTECTED]
hi Bearphile! That really gives me an idea.Thanks much for that. Yes as you said the algorithm reaches a maximium recursion depth for larger sets i tried.I still have a question. if m = [[0,0,0,0],[0,1,1,0,0],[0,0,1,0,0],[0,0,0,0]] all it does is count the number of 1's and return us the number in

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-25 Thread [EMAIL PROTECTED]
It would be *really* nice if it worked for Python itself for making an RPM distribution of Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Injecting code into a function

2005-04-25 Thread [EMAIL PROTECTED]
use eval. eval will accept any string and treat the string as a code. pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread [EMAIL PROTECTED]
bearphile, Is there a way I could do the floodfill rather iteratively than recursive. It somehow breaks although I made some optimisations to the code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread [EMAIL PROTECTED]
Just was wondering how to integrate the floodfill with the stack.I guess it will get rid of recursion problem. You mean read all the elements of the array to a stack and then push and pop based on conditions? -- http://mail.python.org/mailman/listinfo/python-list

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread [EMAIL PROTECTED]
Bearophile,I have written the floodfill in python with stack. But i think I am making something wrong I dont get what i need.Need your opinion.the code follows def connected(m, foreground=1, background=0): def floodFill4(m, r,c, newCol, oldCol): if newCol == oldCol: print "

create python process

2005-04-25 Thread [EMAIL PROTECTED]
Hello, I would like to create python processes instead of thread. Can anyone give me an example or site which shows a tutorial about how to create processes ? Sincerely Yours, Pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: create python process

2005-04-26 Thread [EMAIL PROTECTED]
I use windows and os.fork is not working in windows. Can we create process inside python I mean I have function and I want to run it as a process not a thread ? Should I run code from os. in order to run a processes? Sincerely Yours, pujo -- http://mail.python.org/mailman/listinfo/python-list

delete will assure file is deleted?

2005-04-26 Thread [EMAIL PROTECTED]
Hello, If I use os.remove(fileName), does it always assure that the code will move to the next code only if the fileName is deleted completely? Pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: delete will assure file is deleted?

2005-04-26 Thread [EMAIL PROTECTED]
Hello Mike, I have to know this topic otherwise my program has to check whether the file / files are already deleted and this is a little bit messy. Pujo -- http://mail.python.org/mailman/listinfo/python-list

How to start python interactively from python script?

2005-04-26 Thread [EMAIL PROTECTED]
Hi, I would like to have a python script which does some computations at the beginning and then changes to interactive mode (by displaying the prompt). How can I do this? Thanks in advance, Raghu. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to start python interactively from python script?

2005-04-26 Thread [EMAIL PROTECTED]
Thank you. 'os.environ["PYTHONINSPECT"] = "1"' does the job. Raghu. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find the drive in python/cygwin?

2005-04-26 Thread [EMAIL PROTECTED]
How about doing "cygpath -w /home/user" and picking the drive letter? Raghu. -- http://mail.python.org/mailman/listinfo/python-list

Re: compile shebang into pyc file

2005-04-26 Thread [EMAIL PROTECTED]
Is there some reason why you want to run the .pyc file, rather than the .py file? If you start the script with #! /usr/bin/env python Then if the file has the execution permission set, typing the file name (foo.py) will make the script call up the Python interpreter on its own. -- http://mail.p

Re: App suggestion please: blog / forum software in Python

2005-04-26 Thread [EMAIL PROTECTED]
thanks Kartic. I use Frog already at my office. For this particular application, its design may not be appropriate, since each user gets her own blog space. I'm actually after a community blog, where any one of the registered users can post an item, or discuss on a forum. Drupal, from http://dr

Re: Can .py be complied?

2005-04-26 Thread [EMAIL PROTECTED]
I don't know the exact details, but try using the compiled Python scripts (bytecode). I believe they are semi-optimized and platform independent. They are the .pyc and .pyo files generated when the script is run. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can .py be complied?

2005-04-26 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I don't know the exact details, but try using the compiled Python > scripts (bytecode). I believe they are semi-optimized and platform > independent. They are the .pyc and .pyo files generated when the script > is run. Okay, I found this do

Re: App suggestion please: blog / forum software in Python

2005-04-26 Thread [EMAIL PROTECTED]
thx Irmen. Frog is good at what it does, and of course it can't do everything (not yet, anyway! :-) ) But it's interesting to note your future directions for the project. S -- http://mail.python.org/mailman/listinfo/python-list

Re: Semi-newbie, rolling my own __deepcopy__

2005-04-27 Thread [EMAIL PROTECTED]
Michael Spencer wrote: > It appears that if you want to deepcopy an object that may contain arrays, > you're going to have to 'roll your own' deep copier. Something like this > would do it: [method deleted] Whew! Michael, that was way more than I bargained for. New issues for me: the "**" nota

How do I parse this ? regexp ?

2005-04-27 Thread [EMAIL PROTECTED]
Hello all, I have this line of numbers: 04242005 18:20:42-0.02, 271.1748608, [-4.119873046875, 3.4332275390625, 105.062255859375], [0.093780517578125, 0.041015625, -0.960662841796875], [0.01556396484375, 0.01220703125, 0.01068115234375] repeated several times in a text file and I would lik

Re: How do I parse this ? regexp ?

2005-04-27 Thread [EMAIL PROTECTED]
Hello, I am not understanding your answer, but I probably asked the wrong question :-) I want to remove the commas, and square brackets [ and ] characters and rewrite this whole line (and all the ones following in a text file where only space would be a delimiter. How do I do this ? I have trie

Re: How do I parse this ? regexp ?

2005-04-27 Thread [EMAIL PROTECTED]
Thank you, it works, but I guess not all the way: for instance, I have this: 04242005 18:20:42-0.024329, 271.2469504, [-4.097900390625, 3.4332275390625, 105.062255859375], [0.0384521484375, 0.08416748046875, -1.026885986328125], [0.00640869140625, 0.00885009765625, 0.00701904296875] translates in

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

2005-04-27 Thread [EMAIL PROTECTED]
- -l.sort(cmp_0) -print l -l.sort(cmp_1) -print l with output like: [EMAIL PROTECTED]:~ $ ./test.py [['Dikkie Dik', 'Jet Boeke'], ['Kikker en Eend', 'Max Veldhuis'], ['Ruminations on C++', 'Andrew Koenig & Barbara Moo']] [['Rumin

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

Re: Question about python code distribution...

2005-04-28 Thread [EMAIL PROTECTED]
Hi, I would like for all platforms, not just for windows. In any case, the above two replies about "zipfile" support and "eggs" answer my question. That's exactly what I was looking for. Thanks for prompt and useful responses. Raghu. -- http://mail.python.org/mailman/listinfo/python-list

Re: logging problems

2005-04-29 Thread [EMAIL PROTECTED]
I probably did not mention it, but I've used traceback module in other places, and it works fine. We've been planning to upgrade to 2.4 but unfortunately I cannot do that right now, and no, I have not messed with any other system modules. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast plotting?

2005-04-29 Thread [EMAIL PROTECTED]
Are you sure about these numbers? Most monitors refresh at 70-80Hz, so unless you have special display hardware, I'm suspicious of these numbers doubt . I once had a user post to the matplotlib mailing list that xplt was refreshing at 1000 Hz. I think xplt drops plot requests while requests are

Re: date to digit

2005-04-30 Thread [EMAIL PROTECTED]
try time.strptime() , and then time.time() - see documentation (http://docs.python.org/lib/module-time.html) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run a program?

2005-04-30 Thread [EMAIL PROTECTED]
please read the documentation for subprocess, http://docs.python.org/lib/node230.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Library Naming Conventions.

2005-04-30 Thread [EMAIL PROTECTED]
see http://www.python.org/peps/pep-0008.html for naming conventions and other style issues -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing to log file when script is killed

2005-04-30 Thread [EMAIL PROTECTED]
If you run on unix you can use the signal module to intercept a kill - see http://docs.python.org/lib/node368.html for a quick example -- http://mail.python.org/mailman/listinfo/python-list

Re: User Directory Path

2005-04-30 Thread [EMAIL PROTECTED]
os.getenv or os.envoron, see http://docs.python.org/lib/os-procinfo.html -- http://mail.python.org/mailman/listinfo/python-list

wxpython book

2005-12-11 Thread [EMAIL PROTECTED]
I have seen some brief mention of the new book by Robin Dunn in one or two posts. But none that highlight that the book is to be published sometime at then end of Jan 2006. I hope that turns out to be an accurate date. It has been long-awaited so I thought it ought to get a proper mention. I mus

Re: Random Number Generation?

2005-12-11 Thread [EMAIL PROTECTED]
Dimos wrote: > Hello All, > > I need some help with random number generation. What I > need exactly is: > > To create a few thousand numbers, decimal and > integers, between 5 and 90, > and then to export them as a single column at a > spreadsheet. > > I am newbie, I was not able to create decimal

Problem with Lexical Scope

2005-12-11 Thread [EMAIL PROTECTED]
I am not completely knowledgable about the status of lexical scoping in Python, but it was my understanding that this was added in a long time ago around python2.1-python2.2 I am using python2.4 and the following code throws a "status variable" not found in the inner-most function, even when I try

Re: Problem with Lexical Scope

2005-12-12 Thread [EMAIL PROTECTED]
Well, I think I found a nasty little hack to get around it, but I still don't see why it doesn't work in the regular way. def collect(fields, reducer): def rule(record): # Nasty hack b/c can't get lexical scoping of status to work status = [True] def _(x, y, s=status):

Re: Problem with Lexical Scope

2005-12-12 Thread [EMAIL PROTECTED]
That does make sense. So there is no way to modify a variable in an outer lexical scope? Is the use of a mutable data type the only way? I'm trying to think of a case that would create semantic ambiguity when being able to modify a variable reference in an outer scope, but I cannot (which is proba

Re: Problem with Lexical Scope

2005-12-12 Thread [EMAIL PROTECTED]
Thanks for the example code. Definately provided a few different ways of doing the construction. Actually, the status variable was the only thing that mattered for the inner function. The first code post had a bug b/c I was first just trying to use reduce. However, I realized that the boolean red

How does Scons compare to distutils?

2005-12-12 Thread [EMAIL PROTECTED]
How does Scons compare to distutils? Should I ignore it or move to it? Chris -- http://mail.python.org/mailman/listinfo/python-list

Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread [EMAIL PROTECTED]
I'm interested in knowing which Python web framework is most like Ruby on Rails. I've heard of Subway and Django. Are there other Rails clones in Python land I don't know about? Which one has largest community/buzz about it? Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: hp-ux crash: threading within a c++ module.

2005-12-13 Thread [EMAIL PROTECTED]
I finally figured this threading problem out. S simple. The thread stack size needed to be increasedthe default thread stack size on hp-ux is insufficient. I suggest that change be added to the default Python build process ... or a note added to the README under the HP-UX section at leas

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

2005-12-13 Thread [EMAIL PROTECTED]
Gene Thanks for your kind email. I am a newbie web developer that just was hoping *any* framework was bubbling to surface to standout amongst all the rest. I don't know /why/ Rails is getting buzz. I've just heard some good things about it but don't want to switch to Ruby. My main goal is to su

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

2005-12-13 Thread [EMAIL PROTECTED]
Django might be the answer. -- http://mail.python.org/mailman/listinfo/python-list

writing a Mail Server

2005-12-13 Thread [EMAIL PROTECTED]
Hello, I have to implement a mail server type program for a project using python. I have already implemented smtp and pop3 protocol to send and retrieve mail at the client side. I used an existing mail server account to test the code. Now, I need to write the functionality of the mail server end. M

Python C/API - *arg,**kwds variable argumnents

2005-12-14 Thread [EMAIL PROTECTED]
I am writing a C extension with python 2.3.5 and need constructs similar to python func(*args, **kwds) What's a neat way to do that? I found pyrex has a __Pyx_GetStarArgs - is there something I'm missing from the regular C/API maybe using one of the PyArg_Parse.. calls ? Thanks, M. -- http://

Re: how can i change the default python?

2005-12-14 Thread [EMAIL PROTECTED]
Thanks for the hint Xavier. I made the default interpreter ipython. # rm /usr/bin/python # ln -s /usr/bin/python2.4-ipython /usr/bin/python ipython is better i think .. and another question; When i type "sudo aptitude install python-jabber" for example, it brings the python2.3-jabber package. Bu

Re: Python C/API - *arg,**kwds variable argumnents

2005-12-14 Thread [EMAIL PROTECTED]
what pyrex generates - M. Raymond L. Buvel wrote: > [EMAIL PROTECTED] wrote: > > I am writing a C extension with python 2.3.5 and need constructs > > similar to python > >func(*args, **kwds) > > What's a neat way to do that? > > I found pyrex has a __Pyx_

Re: Python C/API - *arg,**kwds variable argumnents

2005-12-14 Thread [EMAIL PROTECTED]
essentially I already use PyArg_ParseTupleAndKeywords, but that seems to emulate fixed arg list definitions like - func (x,y,t=0,u=1) -- http://mail.python.org/mailman/listinfo/python-list

Re: Visual Python, really "Visual"?

2005-12-14 Thread [EMAIL PROTECTED]
Short comment. Just want to point out a tool that I have developed. http://farpy.holev.com Give it a try. It's purpose is to serve as a GUI editor for Python and to other languages in the near future. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C/API - *arg,**kwds variable argumnents

2005-12-14 Thread [EMAIL PROTECTED]
thanks, I get it now. -- http://mail.python.org/mailman/listinfo/python-list

Re: Robotics and parallel ports

2005-12-15 Thread [EMAIL PROTECTED]
Isaac T Alston wrote: > Heiko Wundram wrote: > > Maybe it's what you're looking for. > > Thanks for that. I've never actually built a robot or anything like that > before, so I'm welcome to any advice I can get! I've heard programming via > USB is hard, so that's why I'm using the parallel port (s

Re: Problem with Lexical Scope

2005-12-15 Thread [EMAIL PROTECTED]
Well, the the comparison operations are just a special case really.I don't know about the obfuscation contest. I've attempted to make an extensible library. def lt(*fields): return collect(fields, lambda x, y: x < y) def gt(*fields): return collect(fields, lambda x, y: x > y) def gte(*fi

Re: SVG rendering with Python

2005-12-16 Thread [EMAIL PROTECTED]
Matplotlib also has an SVG renderer. Just save the file with an SVG extension or choose "SVG" as your default backend in the rc file http://matplotlib.sf.net/matplotlibrc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with Lexical Scope

2005-12-16 Thread [EMAIL PROTECTED]
>Sorry about "obfuscation contest," I just balked at the reduce code, which >seemed >like premature overgeneralization ;-) It's a personal preference, but the only thing I consider premature is optimization, not generalization. I prefer to try and capture any concept I can as its own abstracted p

Re: Problem with Lexical Scope

2005-12-16 Thread [EMAIL PROTECTED]
>>def lt(*fields): >>return collect(fields, lambda x, y: x < y) >>def gt(*fields): >>return collect(fields, lambda x, y: x > y) >>def gte(*fields): >>""" gte(field, ...) -> rule >>""" >>return collect(fields, lambda x, y: x >= y) >>etc... >DRY ? ;-) Do you mean by the doc s

Re: Problem with Lexical Scope

2005-12-17 Thread [EMAIL PROTECTED]
>Note that NotImplemented is not the same as NotImplementedError -- and I >wasn't suggesting >raising an exception, just returning a distinguishable "True" value, so that >a test suite (which I think you said the above was from) can test that the >"when" >guard logic is working vs just passing ba

Re: Problem with Lexical Scope

2005-12-17 Thread [EMAIL PROTECTED]
>>from functional import curry >I'm not familiar with that module, but I wrote a byte-code-munging curry >as a decorator that actually modified the decorated function to eliminate >parameter(s) from the signature and preset the parameter values inside the >code. >I mention this because pure-pytho

Re: Wingide is a beautiful application

2005-12-18 Thread [EMAIL PROTECTED]
Claudio Grondi wrote: > The only thing what makes a difference to me is, that Wing 'understands' > Python code what results in features not available elsewhere (e.g. go to > definition). This is something that pretty much any reasonable programming editor will get you. Vim and emacs both do it.

php to python dynamic dispatch example

2005-12-18 Thread [EMAIL PROTECTED]
I am posting code for calling almost any python function from php, because it seems generally useful. Please feel free to suggest improvements or tell me this has already been done better somewhere else, etc. My limited searching turned up nothing. I work in a heterogeneous environment with php

attach a pdf file to an email

2005-12-18 Thread [EMAIL PROTECTED]
Hi, I am writing a simple program that sends emails with attachments. I could use "MIMEImage" for .png and then attach it to an "MIMEMultipart" object. But I couldn't or don't know how to attachment a .pdf or something else to my emails. I'm new to python, could somebody help me about that? Tha

Re: Columns and Rows in Excel

2005-12-19 Thread [EMAIL PROTECTED]
In Python you probaly best follow a recipe like this. 1 Save the file in Excel as a csv file. 2.Study the reader object of Python's csv module : http://docs.python.org/lib/module-csv.html 3. Read a row for row in in a list, split it on comma, count the elements, the maximum of all these is the num

getopt and options with multiple arguments

2005-12-19 Thread [EMAIL PROTECTED]
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 above case, there isn't even an option string before the *, but e

Re: attach a pdf file to an email

2005-12-19 Thread [EMAIL PROTECTED]
Thanks I think I should use MIMEBase for any file. -- http://mail.python.org/mailman/listinfo/python-list

Re: attach a pdf file to an email

2005-12-19 Thread [EMAIL PROTECTED]
also the code are useful thanks again -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing pins to the RS232

2005-12-19 Thread [EMAIL PROTECTED]
For those looking, I've already used IC's that convert RS232 to TTL, look up MAX233. It drops 12 to 5, essentially converting RS232 to TTL and vice versa. PyParallel is definitely the way I'll go, however, this project will be on hold for me for my priorities have been shifted. Thanks again for

Existing FTP server code?

2005-12-19 Thread [EMAIL PROTECTED]
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 I can work on. The reason I choose FTP is because it is well known/sup

putenv

2005-12-19 Thread [EMAIL PROTECTED]
Is there a trick to getting putenv/getenv to work? I have csh script that calls a bunch of python programs and I'd like to use env variables as kind of a global variable that I can pass around to the pythong scripts. Thanks, Dave -- http://mail.python.org/mailman/listinfo/python-list

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

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 (

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

How to check if a string "is" an int?

2005-12-21 Thread [EMAIL PROTECTED]
How do I check if a string contains (can be converted to) an int? I want to do one thing if I am parsing and integer, and another if not. /David -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check if a string "is" an int?

2005-12-21 Thread [EMAIL PROTECTED]
It's not homework in my case, I don't know about the others :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Wingide is a beautiful application

2005-12-21 Thread [EMAIL PROTECTED]
Tony Nelson wrote: > OK, I can tell that this is Python code, not VI script stuff. I'll need > to see how your vimrc sets this up. vim has a Python interpreter embedded in it (assuming it's a reasonably complete build--it's possible to leave the interpreter, or even parts of the vim scripting stu

Re: Guido at Google

2005-12-21 Thread [EMAIL PROTECTED]
Nicola Musatti wrote: > > By the way, I hear that you've become collegues also with Matt Austern, > formerly of Apple, and Danny Thorpe, formerly of Borland. I guess we > mere mortals don't stand a chance of being hired, but if the trend > continues there are going to be a lot of very interesting p

Re: Wingide is a beautiful application

2005-12-21 Thread [EMAIL PROTECTED]
Tony Nelson wrote: > So, you bind check_current_block() to the Enter key? Yeah. The binding's not quite just "check_current_block()" because you need a bit of magic to keep autoindent working. I'll post it with my conf files next week, essentially use = with an empty vim function wrapper around

Re: Qtdesigner and python

2005-12-27 Thread [EMAIL PROTECTED]
u can use`pyuic` for this .. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as a Server vs Running Under Apache

2005-12-28 Thread [EMAIL PROTECTED]
Matt Helm wrote: > I am starting the design phase of a large project (ERP) where the > backend will mostly be Python (or Ruby) providing web services. > > In this type of usage, is there any benenfit to running under Apache > as opposed to a pure Python solution using Medusa, TwistedMatrix, or > th

python for with double test

2005-12-30 Thread [EMAIL PROTECTED]
hi all the is a way for doing a for with double test: example for i in range(0,10) and f==1: thanx everyone -- http://mail.python.org/mailman/listinfo/python-list

Re: py-cocoa?

2005-12-31 Thread [EMAIL PROTECTED]
PyObjC ( http://pyobjc.sourceforge.net ) is what you are looking for. -- http://mail.python.org/mailman/listinfo/python-list

Re: Vector math library

2005-12-31 Thread [EMAIL PROTECTED]
And then more! I started out using cgtypes from the cgkit. Lots of other graphics goodies in there also: http://cgkit.sourceforge.net/doc/cgtypes.html In the end I ended up rolling my own to better understand the whole thing. -- http://mail.python.org/mailman/listinfo/python-list

Numeric RandomArray seed problem

2006-01-01 Thread [EMAIL PROTECTED]
Hello, I tried calling RandomArray.seed() by calling RandomArray.get_seed() I get the seed number (x,y). My problem is that x is always 113611 any advice? Thanks pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: how to scrape url out of href

2006-01-01 Thread [EMAIL PROTECTED]
mike's code worked like a charm. i have one more question. i have an href which looks like this: http://www.cnn.com";> i thought i would use this code to get the href out but it fails, gives me a keyerror: for incident in row('td', {'class':'all'}): n = incident.f

Re: scrape url out of brackets?

2006-01-01 Thread [EMAIL PROTECTED]
so here is the syntax folks!!! for anchor in soup.fetch('a', {'target': '_blank'}): print anchor['href'] [EMAIL PROTECTED] wrote: > so you recommend using some sort of for statement with the html parser > where i tell it to only parse stuff

Re: How can Python write BBcode modules?

2006-01-02 Thread [EMAIL PROTECTED]
if you don't need really goof perfomances, you ca use regular expression... but in fact, string processing would be really better ! -- http://mail.python.org/mailman/listinfo/python-list

Groupkit and python

2006-01-02 Thread [EMAIL PROTECTED]
Hi, I've built an app using this great software called groupkit (http://www.groupkit.org/) based on tcl/tk language, now I'd like to test python possibilities for groupware. Anyone knows about this, I have made a google search; crossing groupkit and python, but I haven´t found any project except t

Re: Productivity and Quality of IDE

2006-01-02 Thread [EMAIL PROTECTED]
Daniel J. Rubin wrote: > I say it entirely depends on what your programming. For instance, if > creating a GUI, there is no question that a well developed high quality > IDE is a huge help -- from the point of view of stub generation and code > completion, as well as the GUI designer. Most non-ID

Re: how to scrape url out of href

2006-01-02 Thread [EMAIL PROTECTED]
hey ken thanks for writing. when i try that i get told KeyError: 'href' -- http://mail.python.org/mailman/listinfo/python-list

Re: how to scrape url out of href

2006-01-02 Thread [EMAIL PROTECTED]
actuall the full error is this: File "/home/felafela/BeautifulSoup.py", line 301, in __getitem__ return self._getAttrMap()[key] KeyError: 'href' -- http://mail.python.org/mailman/listinfo/python-list

SOAPpy and http authentication

2006-01-03 Thread [EMAIL PROTECTED]
> > -- > Har du et kjøleskap, har du en TV > så har du alt du trenger for å leve > > -Jokke & Valentinerne Lutz Horn wrote: > On 2005-08-02, Odd-R. <[EMAIL PROTECTED]> wrote: > > from SOAPpy import WSDL > > from SOAPpy import URLopener > > url= &#x

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-03 Thread [EMAIL PROTECTED]
> Apart from wishful thinking of course. That's always the major component > in any reasoning about the afterlife. Life is a process, not a thing -- > when a clock runs down and stops ticking, there is no essence of ticking > that keeps going, the gears just stop. When I stop walking, there is no >

Re: Try Python update

2006-01-03 Thread [EMAIL PROTECTED]
Very nice :) I found this online Ruby tutorial: http://tryruby.hobix.com/ I think it would be cool to have something similar for Python. Want to go further and make a nice tutorial to accompany this :) wy -- http://mail.python.org/mailman/listinfo/python-list

Re: Try Python update

2006-01-04 Thread [EMAIL PROTECTED]
> I think that the code constructor (types.CodeType) doesn't take > co_freevars or co_cellvars as an arg, so I can't directly create a new > code object from the attribute of the old one with co_freevars and > co_cellvars. Yay for hidden documentation: "code(argcount, nlocals, stacksize, flags, c

Are there anybody using python as the script engine for ASP?

2006-01-04 Thread [EMAIL PROTECTED]
Hi everyone, I'm planning using python with asp, and wonder if some people do use python/asp in real life projects. (I'm going to) cheers, === kychan -- http://mail.python.org/mailman/listinfo/python-list

Re: Numeric RandomArray seed problem

2006-01-05 Thread [EMAIL PROTECTED]
Hello Tim, If I created a matrix with a randomArray the first elements in the matrix (row index 0 and col index 0) will change very small. Actually this leads me to check the seed, and found that seed don't change anything since I check in an hour duration. I found that it changes very slow though

Quickest way to make py script Web accessible

2006-01-05 Thread [EMAIL PROTECTED]
What is the quickiest and easiest way to make a py script run on a Web server? I have access to an Apache Web server running on Linux. I'm often asked to run some of my scripts on behalf of others. My hope is to make a simple Web-based interface where people could run the scripts themselves whenev

Re: Quickest way to make py script Web accessible

2006-01-05 Thread [EMAIL PROTECTED]
I apologize for my inital ambiguity. Say I have a .py script that gets email addresses from a database and then sends messages to customers (this is not spam, these guys _want_ to get the emails). Historically, IT has executed the script when someone in Marketing makes a request. I want to make it

Re: Quickest way to make py script Web accessible

2006-01-05 Thread [EMAIL PROTECTED]
This works well! Thanks for the advice. The docs for it should include something about adding content_type = 'text\plain' otherwise, the 'testing' section of the tutorial is broken It should look like this: from mod_python import apache def handler(req): req.content_type = 'text/plain' req

<    7   8   9   10   11   12   13   14   15   16   >