weage98 | 2 May 2000 22:52
Picon
Favicon

Tkinter & listbox (PR#311)

Full_Name: Joshua Weage
Version: 1.5.2
OS: HP-UX 10.20 & gcc
Submission from: hybrid-024-221-068-135.detroit.speedchoice.com (24.221.68.135)

This may actually be a bug with Tk, but I'm not absolutely sure.

When I place two listboxes in the same window, using selectmode="browse" on
each, a selection in the second listbox clears the first, and vice versa.

guido | 2 May 2000 23:08
Favicon

Re: Tkinter & listbox (PR#311)

> This may actually be a bug with Tk, but I'm not absolutely sure.
> 
> When I place two listboxes in the same window, using selectmode="browse" on
> each, a selection in the second listbox clears the first, and vice versa.

It's an obscure Tk feature.  Turn off the "exportselection" option for
both listboxes.

--Guido van Rossum (home page: http://www.python.org/~guido/)

guido | 3 May 2000 17:58
Favicon

Re: time.sleep() and threading (PR#307)

> python .../test/test_thread.py shows that time.sleep()
> does not relinquish the processor.
> As one thread goes to sleep, another thread ought
> to start processing.   That doesn't happen.
> 
> Python was configured with --with-thread
> and compiler flags -mt and -D_REENTRANT.
> See line from config.status: s% <at> CC <at> %cc -mt -D_REENTRANT%g
> 
> EXAMPLE:
> 
> hce* python test_thread.py
> creating task 1
> creating task 2
> creating task 3
> creating task 4
> creating task 5
> creating task 6
> creating task 7
> creating task 8
> creating task 9
> creating task 10
> waiting for all tasks to complete
> task 1 will run for 9.9 sec		# goes to sleep here...
> task 1 done				# 9.9 seconds later...
> task 5 will run for 4.1 sec		# This should have started when task 1 slept.
> task 5 done
> task 7 will run for 9.9 sec
> task 7 done
> task 4 will run for 9.2 sec
(Continue reading)

aliberi | 4 May 2000 15:08

SimpleHTTPServer hangs browser? (PR#312)

Full_Name: Armand Liberi
Version: 1.5.2
OS: LynxOS, Windows NT4SP6
Submission from: c196.acutronic.nauticom.net (209.195.177.196)

This reprot has also been sent to Sun.

Running SimpleHTTPServer on either LynxOS or Windows NT4SP6,

a.  Compile a java class named Test, such as:
----------------------------------------
import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class Test extends Applet {
	public void init() {

		Label label = new Label("Swing!");

		add(label, BorderLayout.CENTER);
	}
}
----------------------------------------
b.  Create an HTML file that uses the above class:
----------------------------------------
<HTML>
<HEAD>
<TITLE>JVM1.3 - Python SimpleHTTPServer Test</TITLE>
</HEAD>
(Continue reading)

guido | 4 May 2000 15:31
Favicon

Re: SimpleHTTPServer hangs browser? (PR#312)

I haven't run your example, but my guess is that the SimpleHTTPServer
class only handles one request at a time.  It'c conceivable that the
browser tries to send the request for the applet before it is done
with the main page.

You could try to create a threading or forking subclass of
SimpleHTTPServer, like so:

import SocketServer, SimpleHTTPServer, BaseHTTPServer

class MyServer(SocketServer.ForkingMixIn, BaseHTTPServer.HTTPServer):
    pass

and substitute that for BaseHTTPServer.HTTPServer.

--Guido van Rossum (home page: http://www.python.org/~guido/)

loewis | 4 May 2000 15:54
Picon
Favicon

dl.RTLD_GLOBAL missing (PR#313)

Full_Name: Martin v. Loewis
Version: 1.5.2
OS: Solaris
Submission from: pandora.informatik.hu-berlin.de (141.20.23.176)

The dl module does not support all flags to dlopen available on a specific
system; eg. dl.open("foo.so",dl.RTLD_GLOBAL) does not work.

On Solaris, the following constants are defined, in addition
RTLD_NOLOAD
RTLD_GLOBAL
RTLD_LOCAL
RTLD_PARENT
RTLD_GROUP
RTLD_WORLD
RTLD_NODELETE

cba | 4 May 2000 22:09
Picon

urllib case sensitivity to proxy settings (PR#314)

Full_Name: Craig Allen
Version: 1.5.2
OS: Windows NT 4.0 SP5
Submission from: h008019359a34.ne.mediaone.net (24.218.255.199)

For urllib, the _case_ of the protocol defined for the proxy
makes a difference:
  set http_proxy=http://http-proxy:6080/ - works!
  set http_proxy=HTTP://http_proxy:6080/ - does not work!

It says (in RFC 1738)

   Scheme names consist of a sequence of characters. The lower case
   letters "a"--"z", digits, and the characters plus ("+"), period
   ("."), and hyphen ("-") are allowed. For resiliency, programs
   interpreting URLs should treat upper case letters as equivalent to
   lower case in scheme names (e.g., allow "HTTP" as well as "http").

tdickenson | 5 May 2000 11:50

freeze with "-s service" and "-m" (PR#315)

Full_Name: Toby Dickenson
Version: 1.5.2
OS: Windows
Submission from: mailhost.oriongroup.co.uk (194.200.199.161)

There is a problem with combining two different options to freeze. Those options
are:

1. "-s service" indicating that the frozen program is a windows service. one
effect of this is that the myscript.py file on the freeze command line should be
available for import, not as __main__

2. "-m" indicating that extra modules are to be included in the freeze.

The relevant block of code is at line 335...
    # Add the main script as either __main__, or the actual module name.
    if python_entry_is_main:
        mf.run_script(scriptfile)
    else:
        if modargs:
            mf.import_hook(scriptfile)
        else:
            mf.load_file(scriptfile)

For a service, the outer 'else' block is entered.

If -m is not specified then the inner 'else' block is entered. mf.load_file
assumes its parameter is a filename (to be imported from), an everything is
happy.

(Continue reading)

Mark Hammond | 5 May 2000 15:19
Picon
Favicon
Gravatar

RE: freeze with "-s service" and "-m" (PR#315)

> I think this block of code was naively copy/pasted from the
> block above it

Quite likely!

> This block (starting line 335) should be replaced with

...

If you submit a patch to this effect (to the patches address), I would be
happy to bless it (and given that the service code is mine, I guess that
would be all that is needed...)

Thanks,

Mark.

mhammond | 5 May 2000 15:19
Picon
Favicon
Gravatar

RE: freeze with "-s service" and "-m" (PR#315)

> I think this block of code was naively copy/pasted from the
> block above it

Quite likely!

> This block (starting line 335) should be replaced with

...

If you submit a patch to this effect (to the patches address), I would be
happy to bless it (and given that the service code is mine, I guess that
would be all that is needed...)

Thanks,

Mark.


Gmane