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
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
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
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
use eval.
eval will accept any string and treat the string as a code.
pujo
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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 "
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
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
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
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
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
Thank you. 'os.environ["PYTHONINSPECT"] = "1"' does the job.
Raghu.
--
http://mail.python.org/mailman/listinfo/python-list
How about doing "cygpath -w /home/user" and picking the drive letter?
Raghu.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
[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
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
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
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
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
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
-
-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
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
[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
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
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
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
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
please read the documentation for subprocess,
http://docs.python.org/lib/node230.html
--
http://mail.python.org/mailman/listinfo/python-list
see http://www.python.org/peps/pep-0008.html for naming conventions and
other style issues
--
http://mail.python.org/mailman/listinfo/python-list
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
os.getenv or os.envoron, see http://docs.python.org/lib/os-procinfo.html
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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):
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
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? Should I ignore
it or move to it?
Chris
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
Django might be the answer.
--
http://mail.python.org/mailman/listinfo/python-list
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
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://
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
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_
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
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
thanks, I get it now.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
>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
>>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
>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
>>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
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.
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
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
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
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
Thanks
I think I should use MIMEBase for any file.
--
http://mail.python.org/mailman/listinfo/python-list
also the code are useful thanks again
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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 (
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 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
It's not homework in my case, I don't know about the others :)
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
u can use`pyuic` for this ..
--
http://mail.python.org/mailman/listinfo/python-list
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
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
PyObjC ( http://pyobjc.sourceforge.net ) is what you are looking for.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
hey ken thanks for writing. when i try that i get told
KeyError: 'href'
--
http://mail.python.org/mailman/listinfo/python-list
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
>
> --
> 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=
> 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
>
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
> 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
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
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
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
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
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
1101 - 1200 of 4896 matches
Mail list logo