Tim Roberts wrote:
bob gailer wrote:

Please omit the space before ( in code. I find that very distracting. Example:

print result.Properties_ ("sValue").Value # current

print result.Properties_("sValue").Value # preferred, and how most code I've seen looks.

Do you understand that this is strictly a personal preference? Some people like it, some people don't. You are certainly allowed to "prefer" one over the other, but it's a bit much to ask someone else to change their coding style to match yours, unless you are a paying client. ;)

I agree. Please consider that all of the code examples I've seen in the official Python documentation have no space before the (. Most newcomers to Python who goes thru the tutorial will learn that way of coding. I imagine it would be confusing for them to later see code with the space. Same true for Python cookbook. Follow Tim's link to Windows Registry Functions <http://msdn.microsoft.com/en-us/library/ms724875%28VS.85%29.aspx>. MS's examples. Ditto. I'm aiming for consistency, and minimal confusion for many.

You said "you can drop them straight onto an interpreter window and run them"

It would be quite nice if the Python for Windows Interactive Window also worked that way. Unfortunately copying your examples and pasting there does NOT work, and that has always been a pain in the butt for me.

I'd also like to see a section on Python for Windows customization. I have looked at the (I forget the name of) file that defines keystrokes and other goodies, but have no clue as to how to modify or extend it. I asked years ago for guidance and got none.

I would love to be able to hack Python for Window for a variety of reasons, so would also like some guidance rather than just "go read the source".

I think that each of these items is specifically talking about the Pythonwin editor here. Is that correct?

True.

I've never had problems cutting and pasting code, although I tend to use gvim and a command line instead. What issues do you see?

I copy 2 lines from an example:

import win32api
import win32con

I paste them into the PythonWin Interactive window following the >>>. This is what I get:

>>> import win32api
import win32con|

Where | is the blinking cursor.

Neither line has been executed!

There is no >>>

Whereas pasting the same into the Python interpreter gives:

>>> import win32api
>>> import win32con
>>>

and both lines have executed.

--
Bob Gailer
919-636-4239 Chapel Hill, NC

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to