Potential Python 3.3.2 pyvenv bug on Windows

2013-06-15 Thread peter
port finds it instead of the system's pydoc module. On Linux, the pyvenv pydoc script doesn't have an extension - so import finds the system's pydoc module. I believe the Windows pyvenv pydoc.py script should be renamed to pydocs.py. Has anyone else hit this issue? Peter -

Re: Potential Python 3.3.2 pyvenv bug on Windows

2013-06-15 Thread peter
Agreed. I did submit a bug report. If the core developers fix this, I suspect they will do so in a manner that does not break existing docs. However, my workaround (rename the pyvenv created scripts\pydoc.py file) should suffice for those who need the problem solved now. Take care, Peter

help with explaining how to split a list of tuples into parts

2013-07-12 Thread peter
pointed to some documentation which might help clarify what I need to do. Also if there is anything else that could be improved on with the code happy to be contacted off list. Thanks, Peter. -- http://mail.python.org/mailman/listinfo/python-list

Re: help with explaining how to split a list of tuples into parts

2013-07-13 Thread peter
On Saturday, 13 July 2013 17:28:50 UTC+10, Peter Otten wrote: > > Every time when you have to look up something you should think 'dict', and I > > expect that pretty that will happen automatically. > > Also, to split a tuple into its items you can "unpack&

Re: help with explaining how to split a list of tuples into parts

2013-07-13 Thread peter
On Saturday, 13 July 2013 18:11:18 UTC+10, Steven D'Aprano wrote: > On Fri, 12 Jul 2013 23:43:55 -0700, peter wrote: > > > > I am new to Python and wondering if there is a better python way to do > > A Python bash script? What does that mean? Python and bash are

Re: Python Interview Questions

2012-07-09 Thread Peter
One of my favourite questions when interviewing - and it was 100% reliable :-) - "what are your hobbies?" If the answer included programming then they were hired, if not, then they went to the "B" list. In my experience, anybody who is really interested in programming will have it as a hobby (

Re: Which Version of Python?

2012-09-11 Thread Peter
If your desire is to "learn" Python then I would stick to 2.7 My reasoning would be that there are still a significant number of packages that have not been ported to 3.x (and may never be ported). Not having looked at the changes in 3.x (so don't flame me! :-)), it would seem that anything yo

Re: Confused compare function :)

2012-12-06 Thread peter
On 12/06/2012 08:47 AM, Steven D'Aprano wrote: On Thu, 06 Dec 2012 09:49:26 +0100, Bruno Dupuis wrote: The point is Exceptions are made for error handling, not for normal workflow. That's certainly not the case in Python. Using exceptions for flow control is a standard part of the language. I

Re: Confused compare function :)

2012-12-06 Thread peter
On 12/06/2012 10:58 AM, Chris Angelico wrote: On Fri, Dec 7, 2012 at 12:33 AM, Thomas Rachel wrote: Am 06.12.2012 09:49 schrieb Bruno Dupuis: The point is Exceptions are made for error handling, not for normal workflow. I hate when i read that for example: try: do_stuff(mydic

Re: Problem with __str__ method and character encoding

2012-12-07 Thread peter
On 12/07/2012 11:17 AM, gialloporpora wrote: Risposta al messaggio di gialloporpora : This is the code in my test.py: Sorry, I have wrongly pasted the code: class msgmarker(object): def __init__(self, msgid, msgstr, index, encoding="utf-8"): self._encoding =encoding self

Re: forking and avoiding zombies!

2012-12-10 Thread peter
On 12/10/2012 12:42 PM, andrea crotti wrote: So I implemented a simple decorator to run a function in a forked process, as below. It works well but the problem is that the childs end up as zombies on one machine, while strangely I can't reproduce the same on mine.. I know that this is not the p

Re: forking and avoiding zombies!

2012-12-11 Thread peter
On 12/11/2012 08:47 AM, andrea crotti wrote: Yes I wanted to avoid to do something too complex, anyway I'll just comment it well and add a link to the original code.. But this is now failing to me: def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): # Perform first fo

Re: forking and avoiding zombies!

2012-12-11 Thread peter
On 12/11/2012 10:25 AM, andrea crotti wrote: Ah sure that makes sense! But actually why do I need to move away from the current directory of the parent process? In my case it's actually useful to be in the same directory, so maybe I can skip that part, or otherwise I need another chdir after.. Y

Re: forking and avoiding zombies!

2012-12-11 Thread peter
On 12/11/2012 10:57 AM, andrea crotti wrote: where in [] I have the PID of the process. In this suggested way I should use some other files as standard output and error, but for that I already have the logging module that logs in the right place.. It's not realy neccesary do use the stderr and st

samba 4 release

2012-12-12 Thread peter
Hellou. Samba4 first release, with python interface for the internals api, and a implementation of the DC in python :). Viva la python -- http://mail.python.org/mailman/listinfo/python-list

Re: samba 4 release

2012-12-12 Thread peter
On 12/12/2012 02:38 PM, peter wrote: Hellou. Samba4 first release, with python interface for the internals api, and a implementation of the DC in python :). Viva la python I forgot to put the link of the good news https://www.samba.org/samba/history/samba-4.0.0.html -- http

Re: Command Line Progress Bar

2012-12-26 Thread peter
On 12/26/2012 03:17 AM, Kevin Anthony wrote: Hello, I'm writing a file processing script(Linux), and i would like to have a progress bar. But i would also like to be able to print messages. Is there a simple way of doing this without implementing something like ncurses? -- Thanks Kevin Ant

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread peter
On 12/27/2012 05:01 PM, mogul wrote: 'Aloha! I'm new to python, got 10-20 years perl and C experience, all gained on unix alike machines hacking happily in vi, and later on in vim. Now it's python, and currently mainly on my kubuntu desktop. Do I really need a real IDE, as the windows guys ar

Re: PyWart (Terminolgy): "Class"

2013-01-14 Thread Peter
Real mature lot of responses here guys - shows how much you have grown up. Reading this thread looked more like observing a bunch of 3rd grader - somebody offers an opinion and all you can do is ridicule it? Real mature - certainly gives Python a good name having followers like this... But then

Re: Sending a broadcast message using raw sockets

2013-01-22 Thread peter
Yes, raw sockets need admin privileges, I knew that. The app I'm writing runs as root so that's not a problem. It runs during the %pre script stage of a kickstart controlled install. On Tuesday, January 22, 2013 1:58:07 PM UTC-8, Rob Williscroft wrote: > Try > > s = socket.socket( socket

Re: pySerial question, setting certain serial parameters [newbie]

2012-02-07 Thread Peter
On Feb 4, 11:47 pm, Jean Dupont wrote: > I need to set the following options I found in a Perl-script in Python for > serial communication with a device (a voltmeter): > > $port->handshake("none"); > $port->rts_active(0); > $port->dtr_active(1); > > I have thus far the following  statements but I

help with subclassing problem

2012-04-02 Thread Peter
_init__(self, year, month, day) and get the same error message. What am I doing wrong here? Thanks for any help, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Are there any instrumentation widgets for wxpython or tkinter?

2012-05-17 Thread Peter
Or wxPython is another good alternative. Download the demo and have a look at the widgets people have already used/created. I think there are some good choices for instrumentation (from memory). -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Peter
though I am on my first wxPython GUI, I am extremely happy that I made the switch - I am already using basic wxPython widgets that were just not available under TkInter/ttk, creating a much more intuitive interface (IMO :-)) for my users. Best of luck in your choices, Peter -- http://mail.pyt

Tix Combobox

2011-06-08 Thread peter
e box. Is this correct? If so is there any other Tkinter based solution, or do I need to learn a new GUI? I'm using Python 2.6.1 under WindowsXP Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait for a keypress before continuing?

2011-08-17 Thread peter
eting (wouldn't be the first time!) Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait for a keypress before continuing?

2011-08-18 Thread peter
On Aug 17, 3:16 pm, Hans Mulder wrote: > On 17/08/11 10:03:00, peter wrote: > > > Is there an equivalent to msvcrt for Linux users?  I haven't found > > one, and have resorted to some very clumsy code which turns off > > keyboard excho then reads stdin. Seems such an

ttk styles

2011-03-13 Thread Peter
Toolbar.TCheckbutton \ -relief flat style map Toolbar.TCheckbutton -relief { disabled flat selected sunken pressed sunken active raised Hopefully somebody else in this group has "done" this and can post their "solution"? Thanks Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: ttk styles

2011-03-17 Thread Peter
No responses? Nobody with knowledge of modifying styles etc? On Mar 14, 2:08 pm, Peter wrote: > Hi I'm struggling to get a good understanding of styles as used in > ttk. I have read the tutorial section on using styles but haven't been > able to solve this problem. >

Re: ttk styles

2011-03-17 Thread Peter
g everything purely ttk - modifying the style to change the background of the Frame statements would have made it an even better example! I will repost the answer if I can work it out using this example code - thanks again! :-) Peter On Mar 18, 9:14 am, pyt...@bdurham.com wrote: > Peter, &g

Re: value of pi and 22/7

2011-03-18 Thread peter
On Mar 17, 5:22 pm, Kee Nethery wrote: > My favorite approximation is: 355/113  (visualize 113355 split into two 113 > 355 and then do the division). The first 6 decimal places are the same. > > 3.141592920353982 = 355/113 > vs > 3.1415926535897931 > > Kee Nethery Or (more for fun than any pract

Re: ttk styles

2011-03-20 Thread Peter
Here is what I came up with - hopefully I have understood the process correctly and therefore that the comments are correct :-) I am not sure I have the color of the indicator when it is (de)pressed correct, but to my eyes the color 'snow' looks like the same color used with a Tkinter Checkbutton

Re: What is "self"?

2005-09-23 Thread Peter
he benefit here. > Me ither. I am no english professor, but isn't the word "i" usualy pointed at something you will, have, can, or can't do in english? "me" or "self" or "this" or "my" or "cls" or "inst" are refering to just the object, nothing more, nothing less (except for "my" which is like referring to "something i own") and are much more human-comprehendable. IMHO. >-- >Terry Hancock ( hancock at anansispaceworks.com ) >Anansi Spaceworks http://www.anansispaceworks.com > > > Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing a date

2005-09-23 Thread Peter
e you could do something like # -- tm = time.localtime(time.time() + ((60 * 60) * 24)) print strftime("%Y-%m-%d", tm) # - Which gets the date of tommarow. HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to decompile an exe file compiled by py2exe?

2005-09-24 Thread Peter
>Bytecode files extracted should be decompilable to something resembling >>original python code by a python decompiler (quick Googling finds >>"decompyle": http://www.crazy-compilers.com/). >>-- >>http://mail.python.org/mailman/listinfo/python-list >> >> >> > > > >-- >Best Regards, >Leo Jay > > HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Struggling with basics

2005-09-25 Thread Peter
ng sorted, but >they are only being sorted AFTER the 0 of the initial array creation. > >I'm pretty sure it's to do with comparing a string against an integer >but can't for the life of me see where to force the comparrison to check >against two integers. > > > Humm. This is a harder problem. I will copy this text into JEdit to highlight the text and see if i cannot find the problem. >Apologies for going over old ground and if I'm not understanding, I'm >getting there honest ;) > > > HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Struggling with basics

2005-09-25 Thread Peter
Peter wrote: >Jason wrote: > > > >>A week ago I posted a simple little hi-score routine that I was using to >>learn Python. >> >>I've only just managed to examine the code, and the responses that >>people gave, and I'm now seriously s

Re: Struggling with basics

2005-09-25 Thread Peter
;not: > > print "%s - %s" % (name,score) > >The % operator binds more tightly than the comma, so you need to put >parentheses around the argument to % (as in the last line above). > > Well said. :) - Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Struggling with basics

2005-09-25 Thread Peter
Peter wrote: > Peter wrote: > >> Jason wrote: >> >> >> >>> A week ago I posted a simple little hi-score routine that I was >>> using to learn Python. >>> >>> I've only just managed to examine the code, and the responses th

Re: backreferences

2005-09-28 Thread Peter
n). \g gets the value of a named backreference (but only in the replacement). Example: re.sub(r"""<(?PH[1-5]) style="(.*)">(?P.*)""", r"""\g | <\1 style="\2">\3<\1>""", """abc""" ) HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Help

2005-10-01 Thread Peter
u want it to work before you create an instance, then you can do that with class foo: @classmethod def bar(self): print "Hello, World!" or the older (but exactly the same): class foo: def bar(self): print "Hello, World!" bar = classmethod(bar) >thanks in advance, > >-Ivan > > > HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you pronounce wxpython

2005-10-10 Thread Peter
I always pronounced it double-you-ex-python. I am almost positive this is the way it is pronounced. Although the wxPyWiki seems to be pronounced wix-pee-wi-kee (as it says on the front page) so maybe it is pronounced wix-Python... you never know... HTH, Peter Alex wrote: >My native langu

Re: mod_python

2005-10-11 Thread Peter
pache >> >>def handler(req): >> req.content_type = 'text/plain' >> req.send_http_header() >> req.write('mptest.py\n') >> return apache.OK >> >>Is this code enough for testing? >> >> >> > >i believe so. > >also check this: >"Getting mod_python Working" ><http://www.dscpl.com.au/articles/modpython-001.html> > > > HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: my array subset method could be improved?

2005-10-14 Thread Peter
73, 5)))" I tend to like "array(i for i in (-1, 2, -4, 5, 55, 9, -73, 5) if i < 0)" better though. (And its even shorter). HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: difference after remove

2005-10-24 Thread Peter
--- ## Example 3 # With line-continuation: >>> print """Hello, \ ... World!""" Hello, World! # Without line-continuation: >>> print """Hello, ... World!""" Hello, World! # - ## Example 4 # With line-continuation: >>> [1,\ ... 2,\ ... 3] [1, 2, 3] # Without line-continuation: >>> [1, ... 2, ... 3] [1, 2, 3] >>> / End examples HTH, Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to avoid "f.close" (no parens) bug?

2005-11-13 Thread Peter
If you are trying to close a file with f.close without parenthasies, then i _realy_ hope that this did not work, as f.close is nothing but a class method and should be treated like one except when called. You may want to check out the Python tutorial at python.org http://docs.python.org/tut/t

Re: Why is "if fileitem.file:" (almost) never false?

2005-11-17 Thread Peter
hat the user used to upload the file or '' (maybe None) when the FieldStorage object was not created for a File upload. The getfirst call returns the data of the file, but you need to access the FieldStorage object directly forthe filename (as you did). HTH Peter mark wrote: > How d

JPEG decoder not available in PIL

2005-12-06 Thread Peter
fully. Then I copied the PIL library from the installation directory where it was built to the Python site-packages location. And then everything worked. For some reason it was not enough to do python setup.py install but this is probably an artifact of previous failures. Hope this helps som

Curses on Windows

2005-02-06 Thread Peter
er." any ideas why I can't access it - or any alternative URL's, or indeed any other suggestions at all! Grateful for any reply. The email address is the one I registered under Google, and is now defunct! Peter -- http://mail.python.org/mailman/listinfo/python-list

relative import packages/modules workaround

2005-07-11 Thread peter
gards Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: relative import packages/modules workaround

2005-07-12 Thread peter
hmm, it seems to be less trivial than you mentioned... hopefully this will be introduced fast in python -- http://mail.python.org/mailman/listinfo/python-list

distutils package_dir newbie

2005-08-03 Thread peter
': 'project_dev'} also package_dir = {'project_dev':'project_user'} both without any success. (relatively unintuitive option this is) Can anybody give the correct way to achieve a directory-renaming when creating an installer? kind regards Peter keywords:

Re: distutils package_dir newbie

2005-08-03 Thread peter
ou have an idea what could have happened here? kind regards Peter ps. complete error running sdist warning: sdist: missing required meta-data: url warning: sdist: missing meta-data: either (author and author_email) or (maintain er and maintainer_email) must be supplied warning: sdist: ma

Re: distutils package_dir newbie

2005-08-03 Thread peter
hello Robert I've tried your setup.py file and now it seems to work... I've made the following fault in the setup: I did use: setup(..., packages = ['project_dev'], ...) instead of the correct one: setup(..., packages = ['project_user'], ...) you have been

Sequential XML parsing with xml.sax

2005-08-23 Thread peter
Hi hi. I'm trying to do sequential decompression of a bzipped XML file and feed it to a SAX parser with the following code. remotefh = urllib.urlopen('file:///home/peter/catalog.rdf.bz2') decompressor = bz2.BZ2Decompressor() handler = CatalogueDocumentHandler(sys.stdout) chunks

Re: Sequential XML parsing with xml.sax

2005-08-23 Thread peter
Hi. Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > The API reference isn't clear on whether parseString can only handle > > discrete bits of valid XML > > the documentation says that "parse" expects an XML document, > and that "parseString" is the same thing, but parses from a buffer. OK,

adding new functionality to a function non-intrusively!

2005-02-16 Thread peter
to fA. Essentially this gives a new function fA which can call the old function fA thanks a lot for reading so far Peter ps. following idea does not work! # fA = old fA, already defined def tempFunc(*args): # do something with fA return fA = tempFunc # gives infinite loop, recursive mails #

renaming 'references' to functions can give recursive problems

2005-02-16 Thread peter
Hello all, Recently I've started to refactor my code ...(I'm using python 2.3.4) I tried to add extra functionality to old functions non-intrusively. When I used a construct, which involves renaming functions etc... I came across some recursive problems. (a basic construct can be found under the

Re: adding new functionality to a function non-intrusively!

2005-02-16 Thread peter
Hello I indeed also rely on your idea. My problem however is: is has to be non-intrusively in both ways. In your example, it would indeed not break the old code which relies on myfunction but my problems is: I also do not want to change the code of the 'before' myfunction. so my problem in fact

Re: adding new functionality to a function non-intrusively!

2005-02-16 Thread peter
thx a lot for the information on decorators this will be very usefull... (sounds like a little step towards aspect orientated programming,:) ) Because I use libraries which rely on boost-python I can not jump into python 2.4 but I understand the main idea and can also use it in python 2.3 (it w

Re: renaming 'references' to functions can give recursive problems

2005-02-16 Thread peter
see the topic: adding new functionality to a function non-intrusively! and decorators if you want to add functionality to a function! -- http://mail.python.org/mailman/listinfo/python-list

Re: renaming 'references' to functions can give recursive problems

2005-02-16 Thread peter
newFA(input): return fA(input) fA = newFA gives an infinite recursive loop? kind regards Peter Antoon Pardon wrote: > Op 2005-02-16, peter schreef <[EMAIL PROTECTED]>: > > Hello all, > > > > Recently I've started to refactor my code ...(I'm using p

Re: renaming 'references' to functions can give recursive problems

2005-02-16 Thread peter
brain reset and understood thx a lot for all your answers Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: adding new functionality to a function non-intrusively!

2005-02-16 Thread peter
indeed it does, so basically everything works except my original solution: def myfunction(a,b): return a+b def _myfunction(a,b): return myfunction(a,b) myfunction = _myfunction oh well, it was enough to puzzle my tiny brain -- http://mail.python.org/mailman/listinfo/python-list

Re: Text To Speech with pyTTS

2005-03-03 Thread Peter
I released a new version of the Windows installer for Python 2.3 that includes the missing _TTSFast.pyd file. Peter Hansen wrote: > Mike P. wrote: > > I was wondering if anyone has had any luck with the python text to speech > > (pyTTS) module available on Sourceforge: > > h

How to remove packages - wxPython

2004-12-11 Thread Peter
Linux kernel 2.6.9 Slackware 10 Python version 2.3.4 wxPython version 2.4.2.4 I compiled and installed wxPython. There is no uninstall script that I can find for the py components. The library component has a make uninstall. What is the proper way to uninstall packages? I searched everywhere, bu

Re: How to remove packages - wxPython

2004-12-11 Thread Peter
Peter Hansen wrote: > Peter wrote: >> Linux kernel 2.6.9 >> Slackware 10 >> Python version 2.3.4 >> wxPython version 2.4.2.4 >> >> I compiled and installed wxPython. >> >> There is no uninstall script that I can find for the py compon

uninstalling python27 killed vim (actual issue was more complicated and involves Mercurial)

2014-01-28 Thread Peter
opefully this information is useful to other Python, Vim, and Mercurial users. Peter Santoro -- https://mail.python.org/mailman/listinfo/python-list

Re: Python GUI?

2013-09-12 Thread Peter
I stuck with Tkinter combined with PMW for a very long time, but the lack of extra widgets finally drove me to look elsewhere. I tried PyQT but didn't have a good experience. I can't remember details, but things just seemed to have little "gotchas" - which the mailing list were very helpful wit

use of subprocess module inside generator

2015-05-13 Thread Peter
stdout, *, opath=None): if opath is None: for line in stdout.splitlines(): yield line.strip() else: with open(opath) as f: for line in f: yield line.strip() Thank you in advance for your assistance. Peter Santoro -- https://mail.pyth

use of subprocess module inside generator

2015-05-13 Thread Peter
with open(opath) as f: for line in f: yield line.strip() Peter -- https://mail.python.org/mailman/listinfo/python-list

Re: python string, best way to concat

2014-08-28 Thread peter
ce penalty was infinitesimal, so I was just adding complexity for the sake of the abstract concept of a more 'pythonic' style. Obviously this isn't going to change, but for concatenating short strings a and b is there any practical reason to avoid a+b? Peter -- https://mail.python.org/mailman/listinfo/python-list

Reading screen width of a Tkinter widget.

2011-10-13 Thread peter
y option with a specific width instruction. But this is a bit less flexible than my original method. Is there any Tkinter command which will return the actual dimensions of a widget which has had the grid sticky option applied? Peter -- http://mail.python.org/mailman/listinfo/python-list

Is there anyway to selectively inherit/import a class/module?

2012-01-03 Thread Peter
nal program, rename the new class file and have two complete copies of the program but that is not ideal :-) Thanks Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Book authoring

2012-01-03 Thread Peter
On Jan 4, 9:34 am, wesley chun wrote: > fwiw, i've given a related talk a couple of times on this subject, the > most recent of which was at EuroPython this > summer:http://ep2011.europython.eu/conference/talks/writing-books-using-pyth... > > the content includes a couple of the tools mentioned i

Re: Is there anyway to selectively inherit/import a class/module?

2012-01-03 Thread Peter
On Jan 4, 12:06 pm, Steven D'Aprano wrote: > On Tue, 03 Jan 2012 14:21:36 -0800, Peter wrote: > > I have a program that talks to a device via a serial interface. > > Structurally it looks like this: > > > Program A -> module B -> Serial > > I don't u

can a subclass method determine if called by superclass?

2012-01-04 Thread Peter
an alternative inheritance approach while waiting an answer, but the answer to the question interested me (even if I do a redesign and come up with a more "elegant" approach to the problem). Thanks Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: can a subclass method determine if called by superclass?

2012-01-04 Thread Peter
On Jan 5, 10:09 am, Ian Kelly wrote: > > Well, you could get the previous stack level using > traceback.extract_stack() and check the filename.  But it sounds like > what you actually have are two different methods -- one that is used > by the superclass, and one that only the subclass knows abou

Re: help me get excited about python 3

2012-01-06 Thread peter
I'm sure Python 3 is wonderful, but I make heavy use of the Python Imaging Library, which as I understand it has not been adapted to Python 3. There may be alternatives, but as I have a large amount of working code using PIL I am reluctant to drop it just yet. Peter -- http://mail.pytho

Error in Python documentation

2006-01-21 Thread Peter
I found a minor error in the Python documentation for 2.4 which I thought I would report. But after a while I gave up. I wonder if this sort of reporting which is less than a bug could be made easier? The error was that the index entry to 'print statement' sent me to http://www.python.org/doc/2.4.2

Re: Error in Python documentation

2006-01-21 Thread Peter
entation, please report the bug at the Python Bug Tracker at SourceForge. So you need to add a bug to the Python bug tracker -- at least so it seems. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: How to use pdb?

2006-07-21 Thread peter
I haven't tried to use pdb myself, but this looks fairly helpful ... http://www.ferg.org/papers/debugging_in_python.html good luck Peter -- http://mail.python.org/mailman/listinfo/python-list

find, replace and save string in ascii file

2006-08-23 Thread peter
Hello all, I'm looking for an advice. Example (one block in ascii file): $ NAME='ALFA' CODE='x' $ There are many similar blocks in the file with different NAMEs and different CODEs. What I'm looking for is a script that searchs through whole file a

Re: find, replace and save string in ascii file

2006-08-23 Thread peter
;t know how to do it. How to replace a string in the middle of the file and than save this file. Thanks a lot. Amit Khemka wrote: > On 23 Aug 2006 05:48:37 -0700, peter <[EMAIL PROTECTED]> wrote: > > Hello all, > > > > I'm lookin

Tkinter check box behaviour - Windows / Linux discrepancy

2006-11-09 Thread peter
I've isolated the problem in the code below, which shows a single checkbox and a label to describe its state. It works ok under Linux, but in Windows it is always one click behind. Any ideas? I am using Linux: Fedora Core 3, Python 2.3.4 Windows: Windows NT, Python 2.

Re: Tkinter check box behaviour - Windows / Linux discrepancy

2006-11-10 Thread peter
Thank you for those suggestions I've tried it on Windows and it seems fine (with the minor change to command=self.chkTest_click). I'm currently at work, with no access to Linux, so can't test it there until this evening. Muchas gracias! -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter check box behaviour - Windows / Linux discrepancy

2006-11-10 Thread peter
Thank you for those suggestions I've tried it on Windows and it seems fine (with the minor change to command=self.chkTest_click). I'm currently at work, with no access to Linux, so can't test it there until this evening. Muchas gracias! -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL problem after installation

2006-06-12 Thread peter
from this forum) Good luck Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Detecting key presses

2006-06-19 Thread peter
ER': if k>=97 and k<=122: k=k-32 if case=='LOWER': if k>=65 and k<=90: k=k+32 # Done return k A bit clumsy, I know (for example it needs a a double press to recognise the escape key), and I'

tkMessagebox.askyesno always returns False

2006-06-21 Thread peter
I have a weird problem in some code I am writing. The user selects a number of files from a list and then can select an option which will rename the selected files. Before the process starts, a yes/no dialog box pops up just to confirm. Most of the time this works fine, but occasionally it seem

Re: tkMessagebox.askyesno always returns False

2006-06-22 Thread peter
It's a moderately large application, and so impractical to post it all. I'll have a go at isolating circumstances where this fault occurs then post the preceeding code - but not before this evening (London time) when I might have some free time. Peter -- http://mail.python.org/mailma

Re: tkMessagebox.askyesno always returns False

2006-06-22 Thread peter
I've managed to narrow down the circimstances in which the error occurs. The application is a file manager (not terribly original,I know, but my main purpose is to gain experience in using Tkinter). It displays the contents of a directory in a list box, and then applies the function (in this cas

Debugging python with c++ extensions under windows with eclipse CDT

2005-05-12 Thread peter
n I am not aware of? thx a lot for reading so far Peter In the following section I explain in detail what I've already tried. It can easily be skipped. Ok, an overview of the things I've already done: first, to use mingw with the python distribution, I've first followed htt

Re: reference counting and file objects

2005-05-24 Thread Peter
normally (i.e. through return), it is > as you say. > > Regards, > Martin Does the idiom: lines = file("myfile","r").readlines() have any better guarantee of being closed automatically? Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and (n)curses

2007-06-19 Thread peter
ge. Yes, I know the argument that it's up to me to contribute such a module. But I'm afraid my knowledge and skill are way below the threshold needed for such work. Which is why I need it as an addition to the core language! Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL cutting off letters

2007-06-19 Thread peter
;t remember for sure but may be there is the same problem > horizontally. > -- > Pierre I've had this problem horizontally, and solved it by the high tech method of adding a leading and trailing space!!! Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: DFW Pythoneers Meeting THIS Saturday

2007-06-20 Thread peter
Just a tad arrogant, don't you think, to put a notice of some local event on an international forum without saying where it is? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and (n)curses

2007-06-20 Thread peter
> > For me, introducing similar commands in Python would be by far the biggest > > single improvement that could be made to the language. > If it should be done, it should be done as a compatible subset of > curses, IMHO. It has such a long history as the standard "GUI toolkit" But curses does

Re: DFW Pythoneers Meeting THIS Saturday

2007-06-20 Thread peter
> It says right in the subject line! DFW. If you don't know what DFW > means, then it's probably not your local area. Precisely -- http://mail.python.org/mailman/listinfo/python-list

Re: DFW Pythoneers Meeting THIS Saturday

2007-06-21 Thread peter
OK. Not my intention to start a flame war, but as DFW did not mean a thing to me (other than being my late father in law's initials) I was a bit peeved about the assumption that everybody would understand it. I think posts which are essentially local should make this clear to all in the title. I

  1   2   3   4   5   6   7   8   9   10   >