On Dec 10, 2:25 pm, eric <[EMAIL PROTECTED]> wrote:
> On Dec 10, 9:16 pm, JD <[EMAIL PROTECTED]> wrote:
>
>
>
> > I got a iterated function like this:
>
> > def iterSomething(list):
> > has_something = False
> >
problem is how can I read this final_out outside of the function.
I tried the global statement, it seems not work. Any idea?
JD
--
http://mail.python.org/mailman/listinfo/python-list
It could be a very good "homework assignmet".
This is for a real application.
each item in the list represent two terminals of a resistor. All the
resistors in the list are shorted, I need to figure out how many
independent nets are there.
JD
On Oct 17, 4:16 pm, Paul McGuire <[EM
Thanks,
This one really works.
JD
On Oct 17, 3:17 pm, [EMAIL PROTECTED] wrote:
> JD, you probably need the algorithm for connected components of an
> undirected graph.
>
> For example you can do that with my graph
> lib:http://sourceforge.net/projects/pynetwork/
>
> from g
'c', 'u'], \
['b', 'p'],\
['e', 'd']]
The result is
set(['a', 'p', 'b', 'g']), set(['e', 'c', 'u', 'd']), set(['k', 'e',
'd
Hi,
Thanks for the help,
but the result is not quite right:
[['a', 'b', 'g'], ['c', 'd', 'u'], ['b', 'p'], ['e', 'f', 'k']]
the ['b', 'p'] is not merged.
7;]]
Each item in the list need to be merged.
For example, 'a', 'b' will be merged, 'c', 'd' will be merged.
Also if the node in the list share the same name, all these nodes need
be merged.
For example, ['a', 'b'], ['a', '
Greetings:
My cookiejar contains the cookie that I need however when I do
cj.save(file) it does not actually save out to the cookies.lwj Does
anyone have any clue what would keep this from saving? It CREATED my
cookies.lwj file so I know it's not permissions.
cookies.lwp:
#LWP-Cookies-2.0
tes
Apologies for essentially talking to myself out loud!
I've switched back to pygresql. I think a lot of my problems were
caused by not having installed postgresql-server-dev-8.2 which
contains a lot of header files etc. I'm sure this was part of the
problem with the psycopg modules aswell.
postgre
Btw apologies for naming the post 'pygresql'! That was the module I
was attempting to use before.
--
http://mail.python.org/mailman/listinfo/python-list
Hi there.
I'm trying to use python with postgresql. I decided to use psycopg to
interact with the postgresql server. When installing psycopg it
appeared that I needed mxDateTime. So I decided to install the mxbase
package.
I received the following error message (the interesting bit seems to
be a
Thanks very much for all the answers.
JD
On Oct 3, 6:24 pm, Dan Stromberg <[EMAIL PROTECTED]> wrote:
> You don't necessarily need thesubprocessmodule to do this, though you
> could use it.
>
> I've done this sort of thing in the past with fork and exec.
>
> To
machine A, B, C should be in parallel, however, for
each machine, jobs should run one after another.
How can I do it with the subprocess?
Thanks,
JD
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> Jd wrote:
>> Hi
>>I have a multi-threaded application. For certain operations to the
>> server, I would like to explicitly set timeout so that I get correct
>> status from the call and not timed out exception.
>>Does anyone know ho
rom within the thread)
Or is there anyway to notify the object when the thread for which it
set the local storage is going away ?
This looks to me a bit like design shortcoming. or I have missed
something completely.
Thanks
/Jd
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I have a multi-threaded application. For certain operations to the
server, I would like to explicitly set timeout so that I get correct
status from the call and not timed out exception.
Does anyone know how to go about doing it ?
/Jd
--
http://mail.python.org/mailman/listinfo/python
PyThread_acquire_lock()
1 thread in _poll from _socketmodule.so.
Any ideas what might be going on. (Isnt PyThread_acquire_lock()
trying to get the global interpreter lock ?)
Any help.. pointers are welcome.
Thanks
/Jd
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for the suggestion, I am thinking implement a database system
for that.
JD
On Aug 2, 12:11 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> JD wrote:
> > Hi,
>
> > What I am trying to do is to run a subprocess on another machine using
> > subprocess.Popen, thi
Thanks for answering,
No, the data was writing into the file when the subprocess was
runing.
For example, every second it will write something into the file.
I tried to run another python program aside and it sucessfully read
the file when the subprocess was runing.
JD
On Aug 2, 11:00 am
subprocess was
runing.
The problem is I could not get anything untill the subprocess
finished.
I also tried to run another python programm when the subprocess is
runing, I could get what I want.
Does anyone know why? Thanks!
JD
--
http://mail.python.org/mailman/listinfo/python-list
Wow, thanks for all the great responses!
Here's my summary:
- demoronizer (from John Walker) is designed to solve some very
particular problems that could be considered bugs. However, it
doesn't remove the unnecessary html generated by Word.
http://www.fourmilab.ch/webtools/demoroniser/
- The
I am looking for python code (working or sample code) that can take an
html document created by Microsoft Word and clean it up (if you've
never had to look at a Word-generated html document, consider yourself
lucky ;-) Alternatively, if you know of a non-python solution, I'd
like to hear about it.
I'm looking for sample code to generate an RSS feed. I can annotate
my html code with comments/tags to mark the articles, all I need is an
"engine" to process the pages and generate the rss file. If I was a
python wiz I'm sure I could do this quickly but as a newbie, an assist
here would certainl
I'd like to create a program that takes files with "jsp-like" markup
and processes the embedded code (which would be python) to produce the
output file. There would be two kinds of sections in the markup file:
python code to be evaluated, and python code that returns a value that
would be inserted
Hello,
I try to remove a dictionary key-pair (remove an entry),
but I'm unsuccessful. Does anyone know how to achieve this?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I have implemented a COM object in Python and I would like
to be able to change the script without stopping and
restarting the application that's using the COM object. Is
there a way to do this? (I can change the program that
calls the COM object if needed.)
Thanks...
-- jeff
--
http://mail.p
On 2005-11-11, Larry Bates <[EMAIL PROTECTED]> wrote:
> This is something I wrote that might help.
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207
>
The solutions become better and better.
Thanks.
> -Larry Bates
>
> JD wrote:
>> Hello,
>&g
On 2005-11-11, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> "JD" <[EMAIL PROTECTED]> wrote:
>
>> When reading a large datafile, I want to print a '.' to show the
>> progress. This fails, I get the series of '.'s after the data has been
>
Hello,
When reading a large datafile, I want to print a '.' to show the
progress. This fails, I get the series of '.'s after the data has been
read. Is there a trick to fix this?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
29 matches
Mail list logo