Re: Python 2.7.2 on Win7 and IDLE (Try it)
On 11/18/2011 6:44 PM, Steven D'Aprano wrote: On Fri, 18 Nov 2011 10:06:47 -0800, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same IDLE oddity that I've described. That is, if you right-click on a py file, do you see a choice for the IDLE editor? Terry Reedy has already said that his installation works fine. "I installed 3.3.2 on a new Win 7 machine and Edit with IDLE works fine." 64 bit python and 64 bit win 7 If you have installed the regular, 32-bit version of Python on a 64-bit version of Windows, chances are good that there will be registry problems stopping things from working correctly. See Stephen Hansen's post. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: Python 2.7.2 on Win7 and IDLE (Try it)
On 11/19/2011 12:03 AM, W. eWatson wrote: I meant 3.2.2, not 3.3.2, sorry for typo. * Python 3.2.2 Windows x86 MSI Installer (Windows binary -- does not include source) this is 32 bit. Note that your c: has /program files for 64 bit programs and /program files(x86) for 32 bit programs. I know, a bit confusing. * Python 3.2.2 Windows X86-64 MSI Installer (Windows AMD64 / Intel 64 / X86-64 binary [1] -- does not include source) this is 64 bit. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: Python 2.7.2 on Win7 and IDLE (Try it)
Works fine for me from msi install on Windows 8 x64 Dev Preview On Sat, Nov 19, 2011 at 5:06 AM, W. eWatson wrote: > Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop > the same way under Win 7. > > One thing I think no one has offered is whether their installation of 2.7.2 > has the same IDLE oddity that I've described. That is, if you right-click > on a py file, do you see a choice for the IDLE editor? > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Python 2.7.2 on Win7 and IDLE (Try it)
On 11/19/2011 2:39 AM, Terry Reedy wrote: On 11/19/2011 12:03 AM, W. eWatson wrote: I meant 3.2.2, not 3.3.2, sorry for typo. * Python 3.2.2 Windows x86 MSI Installer (Windows binary -- does not include source) this is 32 bit. Note that your c: has /program files for 64 bit programs and /program files(x86) for 32 bit programs. I know, a bit confusing. * Python 3.2.2 Windows X86-64 MSI Installer (Windows AMD64 / Intel 64 / X86-64 binary [1] -- does not include source) this is 64 bit. Yes. Did I miss something? -- http://mail.python.org/mailman/listinfo/python-list
Re: Python 2.7.2 on Win7 and IDLE (Try it)
On 11/19/2011 2:34 AM, Terry Reedy wrote: On 11/18/2011 6:44 PM, Steven D'Aprano wrote: On Fri, 18 Nov 2011 10:06:47 -0800, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same IDLE oddity that I've described. That is, if you right-click on a py file, do you see a choice for the IDLE editor? Terry Reedy has already said that his installation works fine. "I installed 3.3.2 on a new Win 7 machine and Edit with IDLE works fine." 64 bit python and 64 bit win 7 If you have installed the regular, 32-bit version of Python on a 64-bit version of Windows, chances are good that there will be registry problems stopping things from working correctly. See Stephen Hansen's post. Yes, see the other fork started by MRAB I tried it. Same old problem. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python 2.7.2 on Win7 and IDLE (Try it)
On 11/19/2011 5:51 AM, Alec Taylor wrote: Works fine for me from msi install on Windows 8 x64 Dev Preview On Sat, Nov 19, 2011 at 5:06 AM, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same IDLE oddity that I've described. That is, if you right-click on a py file, do you see a choice for the IDLE editor? -- http://mail.python.org/mailman/listinfo/python-list 3.2.2, and not 2.7.2. The course of the thread was changed at the MRAB post. What do you mean by it works fine? My criterion is that it puts IDLE as a choice for editor on the menu produced with a right-click on a py file. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python 2.7.2 on Win7 and IDLE (Try it)
On 11/19/2011 5:51 AM, Alec Taylor wrote: Works fine for me from msi install on Windows 8 x64 Dev Preview On Sat, Nov 19, 2011 at 5:06 AM, W. eWatson wrote: Undoubtedly some of you have seen my post Both Python 2.5.2 and 2.7.2 flop the same way under Win 7. One thing I think no one has offered is whether their installation of 2.7.2 has the same IDLE oddity that I've described. That is, if you right-click on a py file, do you see a choice for the IDLE editor? -- http://mail.python.org/mailman/listinfo/python-list Are you suggesting the mail list might be a better place to pursue this? Or is it from some one else? -- http://mail.python.org/mailman/listinfo/python-list
Re: xml.dom.minidom question
nivashno writes: > I always thought that xml was very precisely split up into nodes, > childnodes, etc, no matter what the whitespace between them was. But > apparently not, or am I missing something? The whitespace in your example becomes part of a data element. -- http://mail.python.org/mailman/listinfo/python-list
Re: Got some problems when using logging Filter
On Nov 17, 9:06 am, sword wrote: > On Nov 16, 10:50 pm, Peter Otten <[email protected]> wrote: > > > > > > > > > > > sword wrote: > > > Thanks for your reply. I tried to edit the source a bit, now the > > > main.py looks like this: > > > #main.py > > > importlogging > > > fromloggingimport Filter > > > import a > > > import b > > > >logging.basicConfig(level=logging.DEBUG) > > > root =logging.getLogger() > > > root.addFilter(Filter("GoneWithTheWind")) #so I suppose no log msg > > > would pass this filter > > > > logger =logging.getLogger("main") > > > logger.debug("main process") > > > a.print_log() > > > b.print_log() > > > > > > > And It still prints out all the log msg. :( > > > Here's a little demo to explore how filtering works: > > > $ cat demo.py > > importlogging > > class Filter(logging.Filter): > > def filter(self, record): > > print "applying filter", self.name > > return True > > >logging.basicConfig() > > > loggers = [logging.getLogger(path) for path in ["", "a", "a.b"]] > > for logger in loggers: > > logger.addFilter(Filter("filter@" + logger.name)) > > > [handler] =logging.getLogger().handlers > > handler.addFilter(Filter("filter@handler")) > > > for logger in loggers: > > logger.critical("whatever") > > $ python demo.py > > applying filter filter@root > > applying filter filter@handler > > CRITICAL:root:whatever > > applying filter filter@a > > applying filter filter@handler > > CRITICAL:a:whatever > > applying filter [email protected] > > applying filter filter@handler > > CRITICAL:a.b:whatever > > $ > > > As you can infer from the output only the filter(s) of the original logger > > and of the handler(s) are applied. > > Thanks, so if I want to see my own log out of all logs produced by > different module in the project, I should addFilter to each > corresponding logger. I thought I could add Filter in root and filter > out only the interested info from it before. Or you can add a filter to the handler (but then you can't use basicConfig() to configure it - you need to do it explicitly). Regards, Vinay Sajip -- http://mail.python.org/mailman/listinfo/python-list
[ANN] Oktest.py 0.11.0 released - a new-style testing library
I released Oktest.py 0.11.0.
http://pypi.python.org/pypi/Oktest/
http://packages.python.org/Oktest/
Oktest.py is a new-style testing library for Python.
::
from oktest import ok, NG
ok (x) > 0 # same as assertTrue(x > 0)
ok (s) == 'foo'# same as assertEqual(s, 'foo')
ok (s) != 'foo'# same as assertNotEqual(s, 'foo')
ok (f).raises(ValueError) # same as assertRaises(ValueError, f)
ok (u'foo').is_a(unicode) # same as assertTrue(isinstance(u'foo', unicode))
NG (u'foo').is_a(int) # same as assertTrue(not isinstance(u'foo', int))
ok ('A.txt').is_file() # same as assertTrue(os.path.isfile('A.txt'))
NG ('A.txt').is_dir() # same as assertTrue(not os.path.isdir('A.txt'))
See
http://packages.python.org/Oktest/
for details.
Changes and Enhancements
* [change] 'spec()' is now NOT obsoleted.
* [change] 'spec()' is now available as function decorator.
ex::
class FooTest(unittest.TestCase):
def test_method1(self)
@spec("1+1 should be 2")
def _():
ok (1+1) == 2
@spec("1-1 should be 0")
def _():
ok (1-1) == 0
* [enhance] New assertions: not_file(), not_dir() and not_exist().
ex::
ok (".").not_file() # same as NG (".").is_file()
ok (__file__).not_dir() # same as NG (__file__).is_dir()
ok ("foobar").not_exist() # same as NG ("foobar").exists()
* [enhance] New assertion: not_match().
ex::
ok ("SOS").not_match(r"\d+") # same as NG ("SOS").matches(r"\d+")
* [enhance] Global provider/releaser functions can take 'self' argument.
ex::
def provide_logname(self):
self._LOGNAME = os.getenv('LOGNAME')
os.environ['LOGNAME'] = "Haruhi"
return os.environ['LOGNAME']
def release_logname(self, value):
os.environ['LOGNAME'] = self._LOGNAME
* [change] Change not to ignore test classes which name starts with '_'.
* [change] (internal) Move some utility functions to 'util' module.
* [change] (internal) Move '_Context' and '_RunnableContext' classes
into 'util' module.
* [change] (internal) Move 'Color' class into 'util' module
* [change] (internal) Remove 'OUT' variable in 'Reporter' class
* [change] (internal) Move 'TARGET_PATTERN' variable to 'config'
* [bugfix] Fix to clear ImportError after trying to import unittest2
--
regards,
makoto
--
http://mail.python.org/mailman/listinfo/python-list
Announcing Mii (My) Chat
Hello I wish to inform the list of a Python Application I am writing entitled Mii Chat. What is Mii Chat you ask? It is an IP to IP or IP to Multiple IP text/voice/video chat client written in Python Currently the GUI is written in PyQT and could use a complete overhaul (in progress) There are a few bugs: Like I couldn't figure out the Threading for the Video so I am using QTimer. and the Audio could be improved. But overall it works as expected! I am happy about it cause I am not the best programmer. I have never been to school for Comp Science Programming or any university/college for that matter. I am self taught and consider myself a hobbyist programmer. It would be great if some one could suggest a library for TCP Nat Traversal. As well I am open to any and all suggestions! I appreciate any feedback *cheers Andrew Evans Here is the link http://code.google.com/p/mii-chat/ -- http://mail.python.org/mailman/listinfo/python-list
Re: xml.dom.minidom question
On Sat, 19 Nov 2011 15:32:18 -0600, nivashno wrote: > I always thought that xml was very precisely split up into nodes, > childnodes, etc, no matter what the whitespace between them was. But > apparently not, or am I missing something? XML allows mixed content (an element's children can be a mixture of text and elements). Formats such as XHTML wouldn't be possible otherwise. A validating parser will know from the schema whether an element can contain mixed content, and can use this knowledge to elide whitespace-only text nodes within elements which don't have mixed content (however, that doesn't meant that it will, or even that it should; some applications may prefer to retain the whitespace in order to preserve formatting). A non-validating parser (which doesn't use a schema) doesn't know whether an element contains mixed content, so it has to retain all text nodes in case they're significant. The Python standard library doesn't include a validating XML parser. xmlproc seems to be the preferred validating parser. That has a separate handle_ignorable_data() method for reporting whitespace-only text nodes within non-mixed-content elements; the handle_data() method is only called for "significant" text. -- http://mail.python.org/mailman/listinfo/python-list
