Re: Python-list Digest, Vol 232, Issue 1

2023-01-01 Thread Christman, Roger Graydon
lem will never arise. So, I am very happy with this Python language decision -- it allows for the most efficient means to modify a list in place and also very much reduce the danger of aliasing bugs. Roger Christman Pennsylvania State University From: Pytho

Re: memoization (original Subject lost because mailer lost the whole thread)

2022-09-19 Thread Christman, Roger Graydon
time to linear time). And the process is straightforward enough that you could even define a decorator that could be applied to any function you choose. I don't have an example handy just because I never took the time to write one. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: New assignmens ...

2021-10-27 Thread Christman, Roger Graydon
inside of a test condition, if its usage makes the code less clear. I interpret the PEP has using the walrus to define a name for a particular value that would be both tested and reused, and not that it would be used to assign to a value that was not being tested (such as the a part of (a,b)). Or in short, I do not find your choice of use-case really lines up with the rationale given for walrus operator. You are free to disagree with me, but fortunately, we have one of those PEP authors participating in this list regularly if you want his opinion. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: New assignmens ...

2021-10-27 Thread Christman, Roger Graydon
just compelled to create tuple and lists in all of your use-cases, even when they serve no purpose. Roger Christman -- https://mail.python.org/mailman/listinfo/python-list

Re: New assignmens ...

2021-10-25 Thread Christman, Roger Graydon
se as described in its PEP just as it is, and I see no compelling reason to expand its use. It is there to reduce code size by eliminating a duplication of code, If the code you write using the walrus operator is longer or more complicated than the code would be without it, you are misusing it. R

Re: new feature in Python

2020-09-30 Thread Christman, Roger Graydon
e was this ".=" token somewhere earlier in the program statement. Besides, I could foresee a lot of programming errors when people would start to generalize this operation to do things like: list .= append(item) list .= sort() which would most certainly be incorrect. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Limiting parameters

2020-07-11 Thread Christman, Roger Graydon
or object. If you still end up with a large number of independent parameters, I would question the simplicity of your function's intent. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Poly more thick

2020-02-29 Thread Christman, Roger Graydon
Emending my own note from moments ago: def any_as_dict(*args, **kwargs): if len(args) == 0: my_dict = kwargs elif type(args[0]) == type(dict()): my_dict = args[0] else: my_dict = dict(args[0]) print(type(my_dict),my_dict) >>> any_as_dict(a=1,b=2) {'a': 1, 'b': 2} >>> any_as_dict({'a':1, 'b':2}

Re: Friday Finking: Poly more thick

2020-02-29 Thread Christman, Roger Graydon
x27;: 2} >>> any_as_dict([('a',1), ('b',2)]) {('a', 1): ('b', 2)} >>> any_as_dict({('a',1), ('b',2)}) {('b', 2): ('a', 1)} This seems to address your apparent definition of "key-value pairs&

Re: encapsulating a global variable (BlindAnagram)

2020-02-25 Thread Christman, Roger Graydon
e dictionary in the first place. Is it practical to have the entire dictionary statically defined? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Loop with Else Clause

2019-02-05 Thread Christman, Roger Graydon
tle tangent of mine doesn't seem to apply to your situation at all, and I don't there is a 'single' language element in any programming language I can think of that does what you ask -- so stick with the cleaner: if (__): # loop; else: #don't loop Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE Default Working Directory

2018-11-13 Thread Christman, Roger Graydon
half the students away in the very first class, just trying to configure their development environment. If that's impossible, then I guess I'll have to fire a note off to the university tech support requesting them to play with that "Start In" option through %AppData%, or whatever it was. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE Default Working Directory

2018-11-12 Thread Christman, Roger Graydon
eryk sun responded: On 11/12/18, Christman, Roger Graydon wrote: > > I looked in IDLE's own configuration menu, and didn't see anything there -- > and I fear that I might have to fight some Windows settings somewhere else > instead. I th

IDLE Default Working Directory

2018-11-12 Thread Christman, Roger Graydon
't see anything there -- and I fear that I might have to fight some Windows settings somewhere else instead. I think this is Windows 10. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: What is not working with my "map" usage?

2018-09-22 Thread ROGER GRAYDON CHRISTMAN
t to. The * and ** prefixes really should be avoided as much as possible,unless you know exactly what you are getting out of them. Roger ChristmanPennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Stock quote AP

2018-03-12 Thread ROGER GRAYDON CHRISTMAN
dictionary. You would just need to get a dictionary Reader from the csv module, import urllib.request import io, csv file = urllib.request.urlopen(site + filename) data = io.TextIOWrapper(file, newline="", encoding="utf-8") reader = csv.DictReader(data) for row in reade

Re: RFC: Proposal: Deterministic Object Destruction

2018-02-28 Thread ROGER GRAYDON CHRISTMAN
ting at all. So if you have a program that can get by leaving unused memory allocated, and can still terminate the program before all the memory is claimed, your reference count system is far less efficient than relying on a garbage collector that happens to not get activated before your program ends. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Learning

2017-12-16 Thread ROGER GRAYDON CHRISTMAN
On Sat, Dec 16, 2017, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sat, Dec 16, 2017 at 11:41 PM, Marko Rauhamaa wrote: >> r...@zedat.fu-berlin.de (Stefan Ram): >> As a start, one should learn: >> >> 1.) how to install Python >> (if not already installed) >> >> 2.) how to st

Re: Python Learning

2017-12-16 Thread ROGER GRAYDON CHRISTMAN
#include? >From my experience, both as instructor and student, with introductory programming courses with half a dozen different first languages to use for those courses, I think C++ is one of the worst choices! (In my humble opinion, of course) Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python homework

2017-12-13 Thread ROGER GRAYDON CHRISTMAN
t of the responses I see did attempt to work within the perceived constraints regarding what language tools the student was expected to use. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 171, Issue 7

2017-12-06 Thread ROGER GRAYDON CHRISTMAN
choosing implementations that require 5, 10, or 20 times as much code as necessary. The increase in program size would have a multiplicative effect on writing time and debugging time and would have an adverse affect on a course grade, product delivery date, customer satisfaction, and job security. So learn how to find the efficient solutions now while you still have instructors around to help you. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 171, Issue 7

2017-12-06 Thread ROGER GRAYDON CHRISTMAN
I think I also came up with 4 as "the most frequent number". It is unclear ot me how you came up with 3.36 as the most common number, because I tried rolling a six-sided die myself several times, and somehow 3.36 didn't come up even once! On Wed, Dec 6, 2017, D'Arcy Cain wrote: > On 12/05/2017 0

Re: Python-list Digest, Vol 170, Issue 34

2017-11-27 Thread ROGER GRAYDON CHRISTMAN
ed statements that follow them. Roger Christman Pennsylvania State University On Mon, Nov 27, 2017 Cai Gengyang wrote: > >Message: 38 >Date: Mon, 27 Nov 2017 04:54:21 -0800 (PST) >From: Cai Gengyang >Subject: While, If, Count Statements >Message-ID: >Content-Type: text/pl

Re: Python-list Digest, Vol 170, Issue 34

2017-11-27 Thread ROGER GRAYDON CHRISTMAN
indented statements that follow them. Roger Christman Pennsylvania State University On Mon, Nov 27, 2017 Cai Gengyang wrote: > >Message: 38 >Date: Mon, 27 Nov 2017 04:54:21 -0800 (PST) >From: Cai Gengyang >Subject: While, If, Count Statements >Message-ID: >Content-Type: text/pl

Re: Problem in defining multidimensional array matrix and regression

2017-11-19 Thread ROGER GRAYDON CHRISTMAN
S your V's. I'm thinking that is the first place you should look. You could either modify your data file (with a nice global replace/change) or you could give a different value to one of the default parameters to the functions you use to open the file. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Shoulid constants be introduced to Python?

2017-11-16 Thread ROGER GRAYDON CHRISTMAN
1]. Python allows these loopholes in with the expectation that the programmer should know better. I think the same thing would be true with constants. If you need this crutch to protect yourself from accidentally clobbering constants, then do better. If you only need it to for documentation purposes, just tweak the documentation. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Ideas about how software should behave

2017-11-09 Thread ROGER GRAYDON CHRISTMAN
any of the posters here appear commonly enough to place the spirit of a particular post in the context of their general presentation style. Roger Christman Pennsylvania State University On Thu, Nov 9, 2017, Gregory Ewing wrote:But ideas are not software -- they don't actively *do* anything,

Re: replacing 'else' with 'then' in 'for' and 'try'

2017-11-06 Thread ROGER GRAYDON CHRISTMAN
ters in itertools) And I see that simply removing 'break' from my vocabulary, this whole 'else on a loop' issue completely dissolves. So thank you for, even unintentionally, helping me to feel good about living inside my ivory tower! Roger Christman Pennsylvania State Unive

FW: Reading a remove csv file

2017-11-02 Thread ROGER GRAYDON CHRISTMAN
now a variable in my program's memory (all of the data), instead of streamlike. I suppose I did read somewhere about setting a stream option. Roger Christman Pennsylvania State University Forwarded Message Just a quick question on how best to read a

Reading a remove csv file

2017-11-02 Thread ROGER GRAYDON CHRISTMAN
ut the utf-8 encoding, but although I find that as an option for a local file (with open()) I did not see that on my first glance at the two functions above. Is there an easy way to read a remove CSV file with utf-8 encoding without copying the whole file locally first? Roger Christman Pennsylv

Re: why it append one more letter after decode?

2017-10-30 Thread ROGER GRAYDON CHRISTMAN
ample with "\\" in one case, and r"\\" in the other case. These are not equal to each other, and naturally would not give equal results from your function. So that leads to the second possibility that you are not calling the function in the same way. In either case, you cannot blame the function for giving you different results if you give it different data. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Coding style in CPython implementation

2017-10-29 Thread ROGER GRAYDON CHRISTMAN
an Implicit" in the example cited. Roger Christman Pennsylvania State University On Sun, Oct 29, 2017, Setfan Ram wrote: > =?UTF-8?B?zqPPhM6tz4bOsc69zr/PgiDOo8+Jz4bPgc6/zr3Or86/z4U=?= writes: >>I guess the following parts from "Zen of Python" apply to this case: > >

Just a quick question about main()

2017-10-27 Thread ROGER GRAYDON CHRISTMAN
ot;main"? I guess I'm not stuck on that habit, since my programming experiences go way back to the old Fortran days Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Save non-pickleable variable?

2017-10-21 Thread ROGER GRAYDON CHRISTMAN
a Python data structure, it should also be pickleable. The "Json.org" web site should give you a place to download the modules you would need for each of the two languages. Hope this helps. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-13 Thread ROGER GRAYDON CHRISTMAN
r way. We don't need any annotations or attributes or whatnot if we have the perfectly normal function documentation. Or is that kind of habit no longer practiced in 'the real world'? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 169, Issue 23

2017-10-12 Thread ROGER GRAYDON CHRISTMAN
set a breakpoint at the very bottom of a function when debugging. Roger Christman Pennsylvania State University On Thu, Oct 12, 2017 12:26 AM, Steve D'Aprano wrote: > > >Message: 3 >Date: Thu, 12 Oct 2017 12:26:07 +1100 >From: Steve D'Aprano >To: python-list@python.org >

Re: Python-list Digest, Vol 169, Issue 23

2017-10-12 Thread ROGER GRAYDON CHRISTMAN
itself has one entry (the exception) and one exit. And, unlike goto's and set_jmp() is easiliy incorporated into other control structures depending on where you want to go after any recovery steps. The code that generated the exception, of course, seemingly has more than one exit, but exceptions are just that -- exceptions. I hope you don't start using counting loops up to 2**64 to visit a 100 element array and rely on IndexError to exit such a loop. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: how to replace multiple char from string and substitute new char

2017-10-12 Thread ROGER GRAYDON CHRISTMAN
t mind having wo function calls in that one line of code. If you want only one function call and you want to do even more substitutions than just those below, there is another handy functionin the string object that can do so very nicely. What did you try? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread ROGER GRAYDON CHRISTMAN
a language like that somewhere around this forum. But I like it anyway Roger Christman Pennsylvania State University On Wed, Oct 11, 2017 12:07 PM, Dennis Lee Bieber wrote: > On Wed, 11 Oct 2017 00:21:46 -0400, Bill >declaimed the following: > >>PL-I has already been taken. That

Re: Pedagogical style [was Re: The "loop and a half"]

2017-10-06 Thread ROGER GRAYDON CHRISTMAN
addition, and the rug gets pulled out from under them.There is no visible quantity of 1, 2, or 3 in those circles and diamonds; and probably no 1, 2, or 3 in the children's game either. How is it any surprise that they did not figure out the children's game as quickly? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Introducing the "for" loop

2017-10-06 Thread ROGER GRAYDON CHRISTMAN
ve an exercise to do a string translation, using an ugly 12-way if-else construct nested within a loop where a dictionary would very easily trim the if-else and str.translate() would eliminate the loop. (This is fresh in my mind because I plan to illustrate both their solution and mine in

Re: Python-list Digest, Vol 169, Issue 7

2017-10-05 Thread ROGER GRAYDON CHRISTMAN
e is a better way to access the elements of a list than counting down the subscripts. I still see a lot of instructors and programmers who newly migrate to Python that use counting a range() as their first choice in traversing a list. Teaching the for loop without using range, I believe, is t

Re: newb question about @property

2017-10-04 Thread ROGER GRAYDON CHRISTMAN
st): File "", line 1, in p.__slots__ = ['x','y','z'] AttributeError: 'any' object attribute '__slots__' is read-only Oh, and here's a little thing from the Python 3.6.2 Glossary: __slots__ A declaration inside a class that saves memory by pre-declaring space for instance attributes and eliminating instance dictionaries. Though popular, the technique is somewhat tricky to get right and is best reserved for rare cases where there are large numbers of instances in a memory-critical application. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-04 Thread ROGER GRAYDON CHRISTMAN
7;d rather keep my course content small and simple. Roger Christman Pennsylvania State University > > -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 169, Issue 5

2017-10-04 Thread ROGER GRAYDON CHRISTMAN
you're joking. So for the humour-impaired: THIS POST WAS A >JOKE. Okay? Good.) > > Gotta watch out for all those Islamic extremists. Somewhere along the line when I wasn't paying attention, they got us all using Arabic numerals. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: when is the filter test applied?

2017-10-03 Thread ROGER GRAYDON CHRISTMAN
, I would expect the filter to be a lazy application to the iterable you are filtering, so anything that removes from your iterable is going to cause you filter so skip something. That can also be fixed by copying the iterable first. Or alternatively, you can go more functional and instead create a new iterable set of data from the old, instead of mutating what you have. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Beginners and experts

2017-09-30 Thread ROGER GRAYDON CHRISTMAN
randomly perturb the code instead. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Aliasing [was Re: [Tutor] beginning to code]

2017-09-27 Thread ROGER GRAYDON CHRISTMAN
bout what happens when we do "b = c" in the non-Python languages and in Python. >From the ordering of the notes in this forum, I will just assume you did not get a chance to read it before this post I am responding to. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Aliasing [was Re: [Tutor] beginning to code]

2017-09-26 Thread ROGER GRAYDON CHRISTMAN
s to (assuming c has been assigned). But in C++, that statement would be completely invalid -- once you associate a reference to a reference variable, you cannot change the binding.This further emphasizes that the statement "int &b = a" is not an assignment statement, which means it is rather irrelevant to the semantics of assignment statements. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Call by binding [was re: [Tutor] beginning to code]

2017-09-25 Thread ROGER GRAYDON CHRISTMAN
d_to_self(x) # x is still 5 is 'arg' a value parameter or a reference parameter? Can you replicate this behavior in Pascal without any if statement, since, as you say, the semantics are wholly contained by those of Pascal (aside from the += operator itself not appearing in the Pascal la

Re: python console menu level looping

2017-09-25 Thread ROGER GRAYDON CHRISTMAN
ty data base would happen only once at program startup, after which it behaves just like an 'existing collection' with less data? As someone else pointed out, your tests along the lines of if how_to_insert == 'new collection': are error prone, just from typing errors.

Re: [Tutor] beginning to code

2017-09-23 Thread ROGER GRAYDON CHRISTMAN
On Fri, Sep 22, 2017 12:03 PM, Dennis Lee Bier wrote:> On Fri, 22 Sep 2017 23:30:34 +1000, Steve D'Aprano > declaimed the following: > >The exercise is to demonstrate pass by reference semantics. That requires > >demonstrating the same semantics as the Pascal swap procedure: > > > >procedure swa

Re: Even Older Man Yells at Whippersnappers

2017-09-19 Thread ROGER GRAYDON CHRISTMAN
n the student would write he was unable to actually compute that without a calculator. And yes, I deliberately designed the questions to have such easy numbers to work with. Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] beginning to code

2017-09-13 Thread ROGER GRAYDON CHRISTMAN
tenating strings and formatting data. Roger Christman -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple game board GUI framework

2017-09-11 Thread ROGER GRAYDON CHRISTMAN
object whose inventory included several rooms, so as the ship moved, so did everything on board. And there was no GUI required for it -- so no issues there. It's been a couple decades or so, but that interpreted object-oriented language LPC might still be out there somewhere.

Re: A question on modification of a list via a function invocation

2017-09-06 Thread ROGER GRAYDON CHRISTMAN
asing, of course, since most assignment operationscreate aliases. But at least it's nice to know that aliasing immutable valuesis harmless. Hence my unit on building recursive data structures entirelyout of tuples. Roger ChristmanPennsylvania Sate University -- https://mail.python.org/mailman/listinfo/python-list

Re: A question on modification of a list via a function invocation

2017-09-04 Thread ROGER GRAYDON CHRISTMAN
>Does a poor job AFAIAC of explaining the difference between foo and bar in foll def foo(x): x += 2 def bar(x): x.append(2) a=10 b=[10] foo(a) a >10 bar(b) b >[10, 2] Or with just one function: >>> def baz(x,y): x += y >>> a = 10 >>> b = [10] >>> baz(a

Re: Who are the "spacists"?

2017-03-18 Thread ROGER GRAYDON CHRISTMAN
Just a couple minor notes from my experience: 1) Some of the course management software I use doesn't like me typing tab characters. When I want to post sample code into a course page using this software, tabs are either ignored or does something really broken (like post an incomplete file). So,

Namespace for timeit

2016-10-14 Thread ROGER GRAYDON CHRISTMAN
size )', number=1, globals='test') That tells me the namespace isn't supposed to be a string test.__dict__ is just an empty dictionary so where do I find 'sorter', 'array', and 'size'? Roger Christman Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Linear Time Tree Traversal Generator

2016-09-21 Thread ROGER GRAYDON CHRISTMAN
port iteration, but then is no better than a dict in any way, except for maybe some rare operation like "identify the minimal value" Roger Christman instructor Pennsylvania State Universtiy -- https://mail.python.org/mailman/listinfo/python-list

Re: Linear Time Tree Traversal Generator

2016-09-20 Thread ROGER GRAYDON CHRISTMAN
On Tue, Sep 20, 2016 at 9:46 AM, ROGER GRAYDON CHRISTMAN <https://webmail.psu.edu/webmail/retrieve.cgi?mailbox=inbox&mid=CAO1D73Eho37guUZkM6Kk9Nu5WB43oN721G33XGNis0LhSu7xVQ%40mail%2egmail%2ecom&cmd=view&start_num=10800&limit=50&sort=0&display=4&headers=default&

Linear Time Tree Traversal Generator

2016-09-20 Thread ROGER GRAYDON CHRISTMAN
squeeze the 'yield node._value' in between them. Is there hope for a linear-time tree-traversal generator, or will I have just have to settle for an n-log-n generator or a linear time behavior with linear extra space? Roger Christman instructor Pennsylvania State University -- https:/

Re: Is duck-typing misnamed?

2016-08-27 Thread ROGER GRAYDON CHRISTMAN
ss. I think this is very much like me defining methods __iter__ and __next__ and voila, I've turned something into an iterator by witch -- er.. duck-typing! Perhaps she inherited her weight from her latent duckness. Thoughts? Roger Christman On Sat, Aug 27, 2016 06:27 PM, python-list@pyt

Is duck-typing misnamed?

2016-08-27 Thread ROGER GRAYDON CHRISTMAN
etc. I do grant that ultimately, the duck does come into play, since the witch weighs the same as a duck. Roger Christman Electrical Engineering and Computer Science Pennsylvania State University -- https://mail.python.org/mailman/listinfo/python-list

Re: Pipes

2015-08-10 Thread Roger Hunter
I agree that some of Python is simple but the description of subprocess is certainly not. I spent much of my working career using Fortran and TrueBasic on mainframes. I'd like programming to be more like holding a discussion to the computer in English instead of Sanscrit. Roger On Sun,

Re: INSTRUCTOR SOLUTIONS MANUAL

2013-03-22 Thread Roger Cox
Do you have the Instructor Solutions Manual for these two text books? Fundamentals of Fluid Mechanics, 5th Edtion, Munson, young, Okiishi Chemical Engineering Fluid Mechanics, 2nd Edition, Ron Darby Thanks. -- http://mail.python.org/mailman/listinfo/python-list

How To Use Python/GDAL to create a KML file from an Image?

2012-01-29 Thread Roger Zimmerman
ple Python scripts of how to do it somewhere? Any ideas appreciated! Cheers Roger Zimmerman -- http://mail.python.org/mailman/listinfo/python-list

Re: An ODBC interface for Python 3?

2011-07-02 Thread Roger Upole
omeone else has already figured out how to make this happen, > please let me know. Pywin32 has an odbc module that works with Python 3.2. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickling over a socket

2011-04-19 Thread Roger Alexander
Thanks everybody, got it working. I appreciate the help! Roger. -- http://mail.python.org/mailman/listinfo/python-list

Pickling over a socket

2011-04-19 Thread Roger Alexander
= read(1) File "/usr/local/lib/python2.7/socket.py", line 380, in read data = self._sock.recv(left) socket.error: [Errno 107] Transport endpoint is not connected I'm at a loss, can anyone provide any guidance? Thanks, Roger Alexander 1 import pickle 2 import socke

Is it possible to execute Python code from C++ without writing to a file?

2011-04-15 Thread Roger House
But it seems like it should be possible to do this without writing the Python code to a file. I tried PyRun_String, but I can't see how it can be used to return a tuple (the Py_file_input option always returns None). Any help will be greatly appreciated. Roger House Software Developer

Re: Displaying SVG in tkinter using cairo and rsvg

2011-02-16 Thread Arndt Roger Schneider
Martin P. Hellwig schrieb: On 02/16/11 09:04, Arndt Roger Schneider wrote: [snip] tkpath does not seem to come standard with Python's tk version when I looked into it a couple of years ago, but maybe it has now? tk canvas and tkpath share the same interface, the first tkpath was a p

Re: Displaying SVG in tkinter using cairo and rsvg

2011-02-16 Thread Arndt Roger Schneider
/pictures/overview.svg The svg on those page gets on-demand converted into flash, for the internet explorer. Is there anyting else You want to know about svg? -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with giant font sizes in tkinter

2011-02-11 Thread Arndt Roger Schneider
n: Get rid of bitmap fonts under X11. BTW the default fonts under Linux are: bitstream vera sans (for helvetica) bitstream vera (for times) and bitstream vera sans mono (for courier). In my opion those bitstream fonts are much better than the mentioned Adobe fonts. -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: [Code Challenge] WxPython versus Tkinter.

2011-01-23 Thread Arndt Roger Schneider
... -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Screen readers for Tkinter (was Re: Tkinter: The good, the bad, and the ugly!

2011-01-21 Thread Arndt Roger Schneider
ome derivitave there of. Do you have first hand experience with it under AQUA? I think Tk-aqua (also 8.6) should work out-of-the-box with brail-lines, text-to-speech and such; the older carbon built however wont... -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Arndt Roger Schneider
Adam Skutt schrieb: On Jan 18, 8:09 am, Arndt Roger Schneider wrote: Back to rantingrick 21st century toolkit/framwork: Let's have a look at the numbers: Worlwide pc market are 300 Million pcs per year, this number includes desktops(2/3) and servers(1/3). Your gui app is not releva

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Arndt Roger Schneider
rantingrick schrieb: On Jan 18, 12:25 pm, Arndt Roger Schneider wrote: rantingrick schrieb: On Jan 18, 7:09 am, Arndt Roger Schneider We DO need to consider the mobile market in this decision. Maybe it is time for us to actually get on the cutting edge of GUI's. Maybe we should he

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Arndt Roger Schneider
rantingrick schrieb: On Jan 18, 7:09 am, Arndt Roger Schneider wrote: Summary wxWidgets: wxWidgets is large scale C++ library from the 20th century, solemnly dedicated toward desktop computers. wxWidgets originates from a time before templates were used in C++ and thus duplicates many of

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Arndt Roger Schneider
Octavian Rasnita schrieb: From: "Arndt Roger Schneider" At least keep the disclaimer: >> Well, tosssing screenshots around doesn't prove wether >> a framwork/toolkit is good or not; >> It only displays the developers commitment to create >> a work of a

Re: Tkinter: The good, the bad, and the ugly!

2011-01-18 Thread Arndt Roger Schneider
duplicates many of today's C++ features. wxWidgets is not suitable for a modern type GUI ad thus clearly not the toolkit/framework of the 21st century. -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Python like lanugages

2011-01-17 Thread Arndt Roger Schneider
Tim Harig schrieb: [snip] This isn't such a tragedy Erlang as it is for other managed VMs because Erlang/BEAM makes powerful usage of its VM for fault tolerance mechanisms. I don't know of any other VM that allows software upgrades on a running system. styx, the distributed operating system i

Re: Tkinter: The good, the bad, and the ugly!

2010-12-30 Thread Arndt Roger Schneider
GUI and pyjamas existing side by side in mutual harmony for many years. pyjamas: Perhaps without javascript. -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: strange subprocess behavior when calling ps

2010-11-18 Thread Roger Davis
Hi JM, Thank you very much for your followup explanation! Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: strange subprocess behavior when calling ps

2010-11-17 Thread Roger Davis
Thanks for the clarification on exceptions, Chris! Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: strange subprocess behavior when calling ps

2010-11-17 Thread Roger Davis
On Nov 16, 11:19 pm, Ned Deily wrote: > Interesting.  It appears that OS X 10.6 takes into account the ... Thanks very much for your thorough explanation, Ned! I think I've got what I need now. Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: strange subprocess behavior when calling ps

2010-11-17 Thread Roger Davis
> Completely off topic but I think the try clause could be rewritten that way: > ... > Don't use bare except clause, you're masking syntax errors for instance, > which will be flagged as 'unexpected error in generation ...". > In a more general manner, if something unexpected happens it's better t

Re: strange subprocess behavior when calling ps

2010-11-16 Thread Roger Davis
Thanks, Ned! That really helps to explain what is going on. Now, just a couple more questions and I think I will know all I need to know. First, I *still* don't quite understand why this happens with my 2.6.6 interpreter but not my 2.6.1, and why another of the respondents to this thread (Chris) c

Re: strange subprocess behavior when calling ps

2010-11-16 Thread Roger Davis
ting code does not work I will investigate psutil further. Thanks! Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: strange subprocess behavior when calling ps

2010-11-16 Thread Roger Davis
Thanks, Chris, you're at least on the right track. I did upgrade from python.org and the python in my shell PATH is /Library/Frameworks/ Python.framework/Versions/2.6/bin/python: % python Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin /usr/bin/pytho

strange subprocess behavior when calling ps

2010-11-16 Thread Roger Davis
ng both commands directly in a Terminal window running tcsh. Can anyone explain this? Thanks! Roger Davis # code follows #!/usr/bin/python import sys import subprocess def main(): psargs= ["/bin/ps", "-e"] try: ps= subprocess.Pop

Re: IDLE debugger questions

2010-10-23 Thread Roger Davis
Thanks for that info, Ned, I can now get the sys.argv[] list I need, that's a big help! However, is there any other way to set a breakpoint in idle that will work on Mac OS X, maybe entering a manual command somewhere with a specified line number? Inability to set a breakpoint is an absolute showst

IDLE debugger questions

2010-10-22 Thread Roger Davis
), it only adds a line-break into the source code. Any suggestions? Thanks! Roger Davis -- http://mail.python.org/mailman/listinfo/python-list

Re: what happens to Popen()'s parent-side file descriptors?

2010-10-14 Thread Roger Davis
Many thanks to all who responded to my question! It's nice to know, as someone new to Python, that there are lots of well-informed people out there willing to help with such issues. Thanks, Mike, for your pipes suggestion, I will keep that in mind for future projects. Seebs, you are of course cor

what happens to Popen()'s parent-side file descriptors?

2010-10-13 Thread Roger Davis
Hi, I am new to this group, please forgive me if this is a repeat question. I am a new Python programmer but experienced in C/Unix. I am converting a shell script to Python which essentially loops infinitely, each pass through the loop running commands like set output = `cat this | grep that

Re: Customising Tk widgets

2010-09-21 Thread Arndt Roger Schneider
theming engine under windows xp and later, but also allows you to supplant this engine. The related ttk theme is called "classic". -roger -- http://mail.python.org/mailman/listinfo/python-list

I wander which is better? JSP or Python? And is there a place for JSP?

2010-06-27 Thread Roger
As I plan to study JSP, I find it extremly complicated and a part of J2EE. I did not attend to get the whole of J2EE. I hope anybody can describe the future of JSP. Is there a place for JSP? -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-13 Thread Arndt Roger Schneider
l. The mony part is definitly important. Tk is actually a good example for the working of money-politics (the absence thereof). -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-11 Thread Arndt Roger Schneider
tree hugelist tkTreeCtrl (mentioned above) ttk:treectrl tablelist tixtreecontrol Just scanning the docs of a module (that you know jack about) and then parroting off some baseless arguments are bound to bite you in the @ss! *egg on face* Please enjoy it. -roger -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-08 Thread Arndt Roger Schneider
Terry Reedy schrieb: On 6/7/2010 5:25 PM, Arndt Roger Schneider wrote: Terry Reedy schrieb: ... Hah, You are ill-informed. How about 'under-informed'? That I readily admit ;-) tkpath 0.3 contains a surface element, which renders vector graphics elements in an off-scree

  1   2   3   4   5   6   >