Re: [Tutor] cannot get a label message to display immediately

2015-08-15 Thread Bill Allen
> > > On Sat, Aug 15, 2015 Bill Allen wrote: > > Yes, I see. I will start working on reorganizing the code with that in > mind. One other thing that I have found that is quite interesting is that > with my current code the use of after() works as expect with the message to

Re: [Tutor] cannot get a label message to display immediately

2015-08-15 Thread Bill Allen
On Sat, Aug 15, 2015 at 2:21 AM, Alan Gauld wrote: That works for getting the message printed but it still leaves > > the problem that your UI locks up during the long process. > If its only for a couple of seconds it might be a mild hiccup > but if your processing took, say 5s or longer, the user

Re: [Tutor] cannot get a label message to display immediately

2015-08-14 Thread Bill Allen
y case, as simple as this: def processing(*args): #my initial button click calls this ''' display messages in the information message_frame while the data is processed ''' info.set('PROCESSING, PLEASE WAIT...') #the label message I was wanting

[Tutor] cannot get a label message to display immediately

2015-08-14 Thread Bill Allen
y to go on this. Thanks, --Bill Allen ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] lists, name semantics

2015-04-18 Thread Bill Allen
On Apr 18, 2015 4:11 PM, "boB Stepp" wrote: > > On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote: > > On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote: > > > >> Bill Allen wrote: > >> > >> > Everyone tha

Re: [Tutor] lists, name semantics

2015-04-18 Thread Bill Allen
print(b) will print the original copy of a which b now references which is [1, ["x", "y"], 3] On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote: > Bill Allen wrote: > > > Everyone that responded, > > > > Thanks very much fo

Re: [Tutor] lists, name semantics

2015-04-18 Thread Bill Allen
Everyone that responded, Thanks very much for the excellent explanations! The distinction between a reference to an object and a seperate copy of the object is quite clear now. --Bill On Apr 18, 2015 1:44 AM, "Alan Gauld" wrote: > On 18/04/15 04:16, Bill Allen wrote: > >

[Tutor] lists, name semantics

2015-04-17 Thread Bill Allen
If I have a list defined as my_list = ['a','b','c'], what is the is differnce between refering to it as my_list or my_list[:]? These seem equivalent to me. Is that the case? Is there any nuance I am missing here? Situations where one form should be used as oppos

[Tutor] cx_Oracle and Pyinstaller

2014-12-10 Thread Bill Allen
Configuration File = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = <1521>)) ) (CONNECT_DATA = (SERVICE_NAME = ) ) ) -- --Bill Allen ___ Tutor maillist - Tutor@python.org To unsu

Re: [Tutor] question on self

2012-03-13 Thread Bill Allen
This little thread on the usage of self references when calling class instance methods and attributes was excellent, one of the best I have seen. Thanks, Bill Allen Sent from my iPhone On Mar 12, 2012, at 3:56, Alan Gauld wrote: > On 12/03/12 02:02, Michael Lewis wrote: > >> I

[Tutor] list comprehension efficiency

2012-02-18 Thread Bill Allen
Generally speaking, are list comprehensions more efficient that the equivalent for loop with interior conditionals for a given task? Do they compile down to the same Python byte code? Thanks, Bill Allen ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Setting Up Emacs

2011-10-30 Thread Bill Allen
> > On 30/10/11 13:23, Rinu Boney wrote: > > >I am New To Python. > > > > > >I Would Like To Setup Emacs As A Python IDE. > > >I Don't Know Anything About Emacs! > > > > As others have also mentioned, try IDLE. It comes packaged with Python for Windows and is easily available for Python on Linux.

Re: [Tutor] [python-win32] Good Book

2011-07-25 Thread Bill Allen
gn, two editions of this book for Python and Java: http://homepage.mac.com/s_lott/books/oodesign.html#book-oodesign --Bill Allen ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Alternate credentials

2011-05-04 Thread Bill Allen
On May 4, 2011, at 0:57, Tim Golden wrote: > On 04/05/2011 00:18, Alan Gauld wrote: >> Since its more a Windows question than a Python one I suggest you try a >> Windows forum. comp.python.windows might be worth a try? Or even the >> ctypes group? >> >> While we do have some Windows users here

Re: [Tutor] Alternate credentials

2011-05-03 Thread Bill Allen
I am running on MS Windows XP & Server 2003. Sent from my iPhone On May 3, 2011, at 12:02, Tim Golden wrote: > On 03/05/2011 5:35 PM, Bill Allen wrote: >> I am needing to run a Python networked application with a specific >> set of credentials, Windows AD, rather than the

[Tutor] Alternate credentials

2011-05-03 Thread Bill Allen
I am needing to run a Python networked application with a specific set of credentials, Windows AD, rather than the user's own so that the app can access the needed CIFS shares. Where should I start? --Bill Sent from my iPhone ___ Tutor maillist - T

Re: [Tutor] os.rename vs. shutil.move

2011-04-16 Thread Bill Allen
Ok, thanks. --Bill On Sat, Apr 16, 2011 at 18:15, Steven D'Aprano wrote: > Bill Allen wrote: > >> What are the particular advantages or disadvantages concerning using >> either >> os.rename or shutil.move to rename a file. I have tried both and for >> s

[Tutor] os.rename vs. shutil.move

2011-04-16 Thread Bill Allen
What are the particular advantages or disadvantages concerning using either os.rename or shutil.move to rename a file. I have tried both and for simple renaming they seem equivalent. Thanks, Bill Allen ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Python on TV

2011-04-14 Thread Bill Allen
On Thu, Apr 14, 2011 at 15:33, Luke Paireepinart wrote: > I don't see how a content provider preventing you from accessing content > internationally that they probably don't have international distribution > rights to as censorship. It's not like your ISP is blocking your access. > > Seriously, I

Re: [Tutor] how to develop a python exe file in windows using python3.1

2011-04-14 Thread Bill Allen
lone or if installing the interpreter is more appropriate. I have found that not every program is best served by being converted to stand-alone. http://cx-freeze.sourceforge.net/ Good Luck, Bill Allen ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Python on TV

2011-04-14 Thread Bill Allen
Same here. I did not realize I was living in an internet censored country here in Texas! On Mon, Apr 11, 2011 at 16:04, bob gailer wrote: > On 4/11/2011 4:20 PM, Alan Gauld wrote: > >> I've just watched the Channel 5 programme "The Gadget Show" >> where the presenters set a new Guinness worl

Re: [Tutor] Linux library for getch() and kbhit()?

2011-03-17 Thread Bill Allen
Alan, Ah ha, ungetch(), that is what I was needing. I had be trying to simulate kbhit() with getch() and keep being left with unhandled data in the buffer. I had resorted to a trash=raw_input() to clear it. Many thanks, Bill On Thu, Mar 17, 2011 at 04:01, Alan Gauld wrote: > >

[Tutor] Linux library for getch() and kbhit()?

2011-03-16 Thread Bill Allen
I have found that for the Windows build of Python the msvcrt library provides getch() and kbhit() functions. Is there a library available for the Linux Python build that provides the same or similar functions? I have found lots of recipes out there to do these, but have not yet found a canned l

Re: [Tutor] Resources

2011-03-12 Thread Bill Allen
These are quite good, The Building Skills Books, these are online. http://homepage.mac.com/s_lott/books/index.html Tarleton Area Amateur Radio Club On Fri, Mar 11, 2011 at 20:19, s s

Re: [Tutor] numpy import failure

2011-02-27 Thread Bill Allen
On Sat, Feb 26, 2011 at 22:45, Ezra Kahn wrote: > I am a total newb, learning to ween myself off of Matlab. I am working off > of EPD6.1, and I cannot get numpy to import. Python keeps sending me back > this: > > Traceback (most recent call last): > File "", line 1, in >import numpy > Imp

Re: [Tutor] python module to search a website

2011-02-26 Thread Bill Allen
n Sat, Feb 26, 2011 at 21:11, vineeth wrote: > Hello all, > > I am looking forward for a python module to search a website and extract > the url. > > For example I found a module for Amazon with the name "amazonproduct", the > api does the job of extracting the data based on the query it even par

Re: [Tutor] accessing another system's environment

2011-02-26 Thread Bill Allen
library resources for that for Python, so I think I am on my way. It is just a matter of finding the right win32 api calls to do what I am wanting to do. Thanks again everyone, this was a great help to me. -Bill On Wed, Feb 23, 2011 at 21:53, Bill Allen wrote: > > I know that I c

Re: [Tutor] accessing another system's environment

2011-02-25 Thread Bill Allen
On Fri, Feb 25, 2011 at 22:39, Steve Willoughby wrote: > > One question you need to figure out is how interactive you want this to be, > or how automated. That will drive the implementation of what comes after. > As will the list of available options at your site for securely allowing a > remot

Re: [Tutor] accessing another system's environment

2011-02-25 Thread Bill Allen
On Fri, Feb 25, 2011 at 21:33, Steve Willoughby wrote: > On 25-Feb-11 19:27, Steve Willoughby wrote: > > > Or are you saying you want to, from a remote Unix system, reach out to a > Windows system and see that Windows system's system environment variables? Yes, that's it exactly.:-) I admi

Re: [Tutor] accessing another system's environment

2011-02-25 Thread Bill Allen
I apologize for not have been clear previously. What I am trying to access are the Windows system environment variables. The same ones that are listed out if you type the set command at a command prompt in Windows. --Bill On Fri, Feb 25, 2011 at 03:11, Alan Gauld wrote: > >

Re: [Tutor] accessing another system's environment

2011-02-24 Thread Bill Allen
, Alan Gauld wrote: > "Bill Allen" wrote > > > I know that I can use the following to get a listing of the environment of >> my own system. How can I do similar for another system on my network. >> This is for administrative purposes. >> > > Environme

[Tutor] accessing another system's environment

2011-02-23 Thread Bill Allen
I know that I can use the following to get a listing of the environment of my own system. How can I do similar for another system on my network. This is for administrative purposes. >>> import os >>> for param in os.environ.keys(): print(param, os.environ[param]) --Bill

Re: [Tutor] creating classes while coding

2011-02-20 Thread Bill Allen
On Sun, Feb 20, 2011 at 19:59, Alan Gauld wrote: > > "Bill Allen" wrote > > > However, I do wonder a bit about the practice I have seen of some >> Python programmers to implement relatively short bits of code, that would >> be >> quite simple using

Re: [Tutor] creating classes while coding

2011-02-20 Thread Bill Allen
That raises my next question. Under what sort of programming circumstances does it make sense? --Bill On Sun, Feb 20, 2011 at 19:01, R. Alan Monroe wrote: > > I'll freely admit that I do not come from an OOP programming > > background, so designing classes is not my first impulse when

[Tutor] creating classes while coding

2011-02-20 Thread Bill Allen
I know that Python not only supports OOP, but is fundamentally OOP in its design. Just in using the language and standard library, that much becomes obvious. However, I do wonder a bit about the practice I have seen of some Python programmers to implement relatively short bits of code, that wou

Re: [Tutor] remote code execution

2011-02-15 Thread Bill Allen
If SAMBA is available on the Linux server, create a share and put your source files there. Then, map that CIFS share on you Windows workstation and work on the files on the share with you local IDE. Run the code via a ssh or telnet connection session back to the Linux server. Editing and runnin

Re: [Tutor] Python printing to LPT

2011-02-12 Thread Bill Allen
As a followup, I have done some more searching and found some terrific information on this subject of Python printing on the Windows platform. The following link shows variations using some modules from the pywin32 package. http://timgolden.me.uk/python/win32_how_do_i/print.html --Bill On

Re: [Tutor] Python printing to LPT

2011-02-12 Thread Bill Allen
Ken, Thanks for the great info on doing this on a Linux platform. I am sure I will be trying this with Linux sometime and I'll refer back to this. --Bill On Sat, Feb 12, 2011 at 18:33, Ken G. wrote: > On 02/12/2011 10:14 AM, Bill Allen wrote: > >> >>

Re: [Tutor] Python printing to LPT

2011-02-12 Thread Bill Allen
Allan, Ok, that encourages me to try it both ways and see which works out better. Thanks, --Bill On Sat, Feb 12, 2011 at 15:34, ALAN GAULD wrote: > > to print some plain text to a dot matrix printer that the printer can > handle > > with its own internal fonts without need for any ki

Re: [Tutor] Python printing to LPT

2011-02-12 Thread Bill Allen
metallic parts. I am guessing there may be a 3rd party module that allows for what I am doing, but have not yet identified it. As always, I am very open to any suggestions and appreciative of the help. --Bill On Sat, Feb 12, 2011 at 13:06, Alan Gauld wrote: > > "Bill Allen" wr

[Tutor] Python printing to LPT

2011-02-12 Thread Bill Allen
Is is possible to print directly to an LPT port printer from Python? --Bill ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python packaging systems

2011-02-10 Thread Bill Allen
My main aim in packaging is simplicity of distribution to many workstations at work. Hiding the source is not an issue. I have successfully used cx_freeze. I did find that in some cases I have had to manually copy some files from my Python system, usually a 3rd party import, into the distributi

[Tutor] python packaging systems

2011-02-09 Thread Bill Allen
I have found there are a few systems available to package Python programs as standalone programs for distribution. Do the folks here have any recommendation or comment on any of these? Thanks, --Bill ___ Tutor maillist - Tutor@python.org To unsubscri

[Tutor] byte array conversion question

2011-02-02 Thread Bill Allen
I have found that there are a couple of ways to convert a byte array to a string in Python. Is there any advantage or disadvantage to either method? my_bytes = b'this is a test' str(my_bytes,'utf-8') yields 'this is a test' my_bytes.decode('utf-8';) yeilds 'this is a test' --Bill

Re: [Tutor] ideas for a simple program

2011-01-25 Thread Bill Allen
For a simple programming project that probably has just enough complexity to be interesting, google for Conway's Game of Life. You'll find an algorithm to use. --Bill On Tue, Jan 25, 2011 at 11:25, walter weston wrote: > > can I have some good ideas for simple programs, I have come to rea

Re: [Tutor] Not understanding a bit of code behavior

2011-01-25 Thread Bill Allen
That's exactly right! Never heard it called that before, but that is basically what happened. I appreciate the help. --Bill On Tue, Jan 25, 2011 at 06:38, Wayne Werner wrote: > On Tue, Jan 25, 2011 at 1:42 AM, Alan Gauld wrote: > >> >> "Bill Allen"

Re: [Tutor] Not understanding a bit of code behavior

2011-01-25 Thread Bill Allen
Steven, Thanks! That is quite helpful to know the nuts and bolts of how that works. --Bill On Tue, Jan 25, 2011 at 07:45, Steven D'Aprano wrote: > Bill Allen wrote: > >> Ok, I have definately verified this to myself. The following works >> perfectly and is a litt

Re: [Tutor] Not understanding a bit of code behavior

2011-01-24 Thread Bill Allen
part=>\']"') BOM_List.append(xstring) for bom_item in BOM_List: if bom_item not in part_list: part_list.append(bom_item) pass_num += 1 return(part_list) On Tue, Jan 25, 2011 at 00:05, Bill Allen wrote:

Re: [Tutor] Not understanding a bit of code behavior

2011-01-24 Thread Bill Allen
, Jan 24, 2011 at 23:56, Bill Allen wrote: > This is a bit embarrassing, but I have crafted a bit of code that does > EXACTLY what I what, but I am now a bit baffled as to precisely why. I have > written a function to do a bit of webscraping by following links for a > project at work.

[Tutor] Not understanding a bit of code behavior

2011-01-24 Thread Bill Allen
This is a bit embarrassing, but I have crafted a bit of code that does EXACTLY what I what, but I am now a bit baffled as to precisely why. I have written a function to do a bit of webscraping by following links for a project at work. If I leave the code as is, it behaves like it is recursively p

Re: [Tutor] not understanding a recursion example

2011-01-21 Thread Bill Allen
Peter, Thank you very much for the explanation. I understand this much better now. You are correct, the implementation you show is easier for me to understand. --Bill On Fri, Jan 21, 2011 at 03:43, Peter Otten <__pete...@web.de> wrote: > Bill Allen wrote: >

[Tutor] not understanding a recursion example

2011-01-20 Thread Bill Allen
I am not understanding the following code (I did not write it). It demonstrates walking a tree-like data structure using recursion. It does run and produces reasonable output. I particularly do not understand the "traverse.level" statements. Can anyone give me an idea how this is working and th

Re: [Tutor] Writing Python Script to read battery level

2011-01-17 Thread Bill Allen
Tim, Thanks for posting this. I have several uses for this WMI module at my work. --Bill On Mon, Jan 17, 2011 at 04:07, Tim Golden wrote: > On 17/01/2011 03:01, FT wrote: > >> Is there a way to read the battery level using Python? >> >> I am totally blind and want to write a script to

Re: [Tutor] errors in "Python Programming for the Absolute Beginner"??

2011-01-14 Thread Bill Allen
; or "license" for more information. >>> print("hello world") hello world >>> x = input("how many?") how many?5 >>> x 5 >>> On Thu, Jan 13, 2011 at 9:31 PM, Corey Richardson wrote: > On 01/13/2011 10:29 PM, Bill Allen wrote: >

Re: [Tutor] errors in "Python Programming for the Absolute Beginner"??

2011-01-13 Thread Bill Allen
>> x = input("Your name?") > Your name?Bill > >>> > > Cheers, > Vern > The two examples you show would work on any Python 2.x (or even 1.5) > system. The parens around the single string won't cause an error nor will > using input to get an inte

Re: [Tutor] errors in "Python Programming for the Absolute Beginner"??

2011-01-13 Thread Bill Allen
; or "license" for more information. >>> print("hello world") hello world >>> x = input("how many?") how many?5 >>> x 5 On Thu, Jan 13, 2011 at 9:31 PM, Corey Richardson wrote: > On 01/13/2011 10:29 PM, Bill Allen wrote: > > That is

Re: [Tutor] errors in "Python Programming for the Absolute Beginner"??

2011-01-13 Thread Bill Allen
That is correct about the difference between Python 2 and Python 3 syntax. However, I am surprised that with 2.7.1 these do not work. I have found that on my Ubuntu system with Python 2.6.5 these Python 3 syntax items do seem to work properly. I am assuming they were back ported or something. I

Re: [Tutor] Sorting a List

2011-01-12 Thread Bill Allen
for file in dir_list: count = count + 1 if count < 5: pass else: basename = os.path.basename(file) if basename.endswith('.png'): file_list = file_list + basename+'\n' os.remove("/localhost/html/pics/"+dir_li

Re: [Tutor] Writing to the terminal?

2010-12-14 Thread Bill Allen
Still looking on this one, but I will be sure to post back to the list if I find anything. Thanks, Bill Allen On Tue, Dec 14, 2010 at 5:23 AM, Steven D'Aprano wrote: > Bill Allen wrote: > >> Anyone know how to get WConio.putch() to properly put out a box drawing >> cha

Re: [Tutor] Writing to the terminal?

2010-12-13 Thread Bill Allen
§"cª«¬-r_°±²3'µ¶·,1º»¼½_¿ÄÅÆÇEÉEEDÑÖxOUUUÜY_ßàáâaäåæçèéêëìíîïdñòóôoö÷oùúûüy_ÿA However if at the cmd prompt, out side of Python, I give it an Alt-188 I get the correct ╝ Where am I going wrong? Thanks, Bill Allen On Mon, Dec 13, 2010 at 12:53 PM, Bill Allen wrote: > Al

Re: [Tutor] Writing to the terminal?

2010-12-13 Thread Bill Allen
Alan, Oh wow! I was not aware of the WConio module. That is exactly what I have been needing! Thanks, Bill Allen On Sun, Dec 12, 2010 at 6:49 PM, Alan Gauld wrote: > > "Modulok" wrote > > For more complex stuff, (think blue screens with little white boxes &g

Re: [Tutor] using a networked data file

2010-12-12 Thread Bill Allen
Wayne, Yes, you have characterized it pretty well. Additionally, it will be accessed typically by maybe a dozen individuals, typically only reading information from the database and infrequently writing to it. --Bill On Sun, Dec 12, 2010 at 7:36 AM, Wayne Werner wrote: > > > I think the large

Re: [Tutor] using a networked data file

2010-12-11 Thread Bill Allen
from what I have read here and other places. Just wanting to confirm that I have understood this correctly. Also, any other suggestions are welcome. Thanks, Bill Allen On Sat, Dec 11, 2010 at 6:32 AM, David Hutto wrote: > On Fri, Dec 10, 2010 at 10:23 PM, Bill Allen wrote: > >

[Tutor] using a networked data file

2010-12-10 Thread Bill Allen
to keep managed infrastructure down to a minimum so I am considering using sqlite instead. Since there is not a database service running to handle requests to the sqlite database, how can I allow for multiple people trying to use this database at the same time? Is this practical? Thanks, Bill

Re: [Tutor] Ide To use? Other extras to install?

2010-10-13 Thread Bill Allen
On Mon, Oct 11, 2010 at 8:53 AM, Jed Smith wrote: > On Sun, Oct 10, 2010 at 9:31 PM, Jorge Biquez wrote: > > > What would be the IDE you recommend me to install that would be almost > > transparent to be using in both platforms? > > > I personally best like the one that is most closely associate

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-04 Thread Bill Allen
On Mon, Oct 4, 2010 at 9:04 AM, Susana Iraiis Delgado Rodriguez < susana.delgad...@utzmg.edu.mx> wrote: > I'm developing a module to execute an external command. The module executes > the command, but in order to make my code useful I have to enter some sql > staments. This is my code: > Question

[Tutor] list comprehension, efficiency?

2010-09-27 Thread Bill Allen
I have seen list comprehensions used, but have not quite got the hang of it yet. So, I was writing a bit of code to do some work with file directories and decided to give it a try as follows: list_c = os.listdir("c:") #first code written in the way I usually would. dirs = [] for x in list_c:

Re: [Tutor] a logic problem in an if statement

2010-09-26 Thread Bill Allen
On Sun, Sep 26, 2010 at 5:12 PM, Steven D'Aprano wrote: > On Mon, 27 Sep 2010 06:01:35 am Bill Allen wrote: > > Now your decision logic becomes simple, and obvious. It documents > itself: > > if click_in_bottom_half1 and click_in_bottom_half2: >print "Both

Re: [Tutor] generating formatted output

2010-09-26 Thread Bill Allen
On Sun, Sep 26, 2010 at 4:21 PM, Hugo Arts wrote: > On Sun, Sep 26, 2010 at 10:16 PM, Rance Hall wrote: > > My app will be printing a series of documents that are the same each > > time the doc is printed with the exception of the variables. Sort of > > a MailMerge if you will. > > > > > > I wo

Re: [Tutor] Python And reading the Web - Javascript

2010-09-26 Thread Bill Allen
On Sat, Sep 25, 2010 at 4:29 AM, Sayth Renshaw wrote: > I want to read some data from the web it will be text and numeric i > was planning to export it to a database. I was thinking while I am > learning maybe something simple like Sqlite or MySQL. > > I then want to read back data to perform sort

Re: [Tutor] a logic problem in an if statement

2010-09-26 Thread Bill Allen
On Sun, Sep 26, 2010 at 3:12 PM, Marc Tompkins wrote: > On Sun, Sep 26, 2010 at 1:01 PM, Bill Allen wrote: > >> >> Any thoughts how I am going wrong here? >> >> Looks like you've got two different names for the first mouse click... > > mouse_pos1

[Tutor] a logic problem in an if statement

2010-09-26 Thread Bill Allen
Ok, I am have a problem with some logic in a piece of code I am working on. I have tinkered with it for hours and am stumped. Pretty sure I have lost sight of the forest for the trees... The purpose of this code is to take the coordinates on screen of the mouse at the time of two mouse clicks,

Re: [Tutor] plotting pixels

2010-09-19 Thread Bill Allen
On Sun, Sep 19, 2010 at 2:40 AM, Lie Ryan wrote: > > More slowly and takes huge amount of memory. A single Tk canvas object > takes at least 14 words (= 114 bytes in 64-bit OS = 56 bytes in 32-bit > OS) + the amount of data is needed to store the `kind of object`. That's > much larger than the id

Re: [Tutor] plotting pixels

2010-09-18 Thread Bill Allen
On Sat, Sep 18, 2010 at 9:26 PM, Bill Allen wrote: > > >> Digging a little deeper it seems the idiomatic way to do this in Python >> is to use PIL the Python Imaging Library to create a GIF or bitmap >> image and then insert that into Tkinters cancvas as an image object.

Re: [Tutor] plotting pixels

2010-09-18 Thread Bill Allen
> > Digging a little deeper it seems the idiomatic way to do this in Python > is to use PIL the Python Imaging Library to create a GIF or bitmap > image and then insert that into Tkinters cancvas as an image object. > > The Pil ImageDraw class has a point() ethod > > I've never tried this but it is

Re: [Tutor] plotting pixels

2010-09-18 Thread Bill Allen
On Sat, Sep 18, 2010 at 1:18 PM, Ken Oliver wrote: > > >> On Fri, Sep 17, 2010 at 3:38 AM, Alan Gauld wrote: >> >>> >>> For plotting pixels I would not use turtle graphics. >>> That would be a fairly complicated option I'd have thought. >>> A simple canvas would be easier. >>> >>> Alan G. >>> >>>

Re: [Tutor] plotting pixels

2010-09-18 Thread Bill Allen
On Sat, Sep 18, 2010 at 10:44 AM, Bill Allen wrote: > > > On Fri, Sep 17, 2010 at 3:38 AM, Alan Gauld wrote: > >> >> For plotting pixels I would not use turtle graphics. >> That would be a fairly complicated option I'd have thought. >> A simple canvas wou

Re: [Tutor] plotting pixels

2010-09-18 Thread Bill Allen
On Fri, Sep 17, 2010 at 3:38 AM, Alan Gauld wrote: > > For plotting pixels I would not use turtle graphics. > That would be a fairly complicated option I'd have thought. > A simple canvas would be easier. > > Alan G. > > Oh, I see! I did not realize that Tk had a canvas widget. That is nice. I

Re: [Tutor] plotting pixels

2010-09-16 Thread Bill Allen
On Thu, Sep 16, 2010 at 9:21 PM, James Mills wrote: > On Fri, Sep 17, 2010 at 12:13 PM, Bill Allen wrote: > > Is there a simple way to plot pixels in Python, without resorting to > turtle > > graphics? > > Give matplotlib a go. > > Alternatively you may want to tr

[Tutor] plotting pixels

2010-09-16 Thread Bill Allen
Is there a simple way to plot pixels in Python, without resorting to turtle graphics? --Bill ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to get both 2.6 scripts as well as 3.1 scripts to run at command line?

2010-09-15 Thread Bill Allen
On Wed, Sep 15, 2010 at 10:35 PM, David Hutto wrote: > print("a is", a) > or > from future import * > ___ > Other than the Python 3 style print function, what else is contained in the future module? --Bill _

Re: [Tutor] py-postgressql v1.0.1 question

2010-09-12 Thread Bill Allen
> >> Second question is more of a performance question: >> >> I don't suspect a "large" # of items in the to_do list, so I *think* >> that it would be better to just have one SQL statement and then loop >> through the results 10 times to get the first few records rather than >> having a seperate sq

Re: [Tutor] py-postgressql v1.0.1 question

2010-09-12 Thread Bill Allen
Rance, I was doing something similar, except I was querying an Oracle database, using the cx_Oracle module. I wanted the non-duplicated count of parts in my database that met certain criteria. All the output that met the criteria of the select statements is loaded into the cursor object. I then

Re: [Tutor] SOLVED: Re: Trapping HTTP Authentication Failure

2010-09-12 Thread Bill Allen
Just in case it is not a known issue or well documented, do take the time if you can to report it. Especially since you have got the symptom isolated and demonstrated that it is limited to a particular OS build. http://docs.python.org/bugs.html -Bill On Sat, Sep 11, 2010 at 1:44 PM, Michael P

Re: [Tutor] Simple Python Problem

2010-09-06 Thread Bill Allen
>Other than changing the input() to raw_input() for Python 2 compatibility, > > > And of course you can do that using > > input = raw_input > > > > the following statement could be added to the beginning of the program > > to allow your Python 2 program to use the Python 3 style print function. > >

Re: [Tutor] Simple Python Problem

2010-09-06 Thread Bill Allen
> > > Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] >> on win32 Type >> "copyright", "credits" or "license()" for more information. >> >>> RESTART > What is your name? Keith >> > > I think there

Re: [Tutor] iterating over less than a full list

2010-09-04 Thread Bill Allen
itertools module and see what goodies are to be found there. -Bill On Sat, Sep 4, 2010 at 2:07 PM, Dave Angel wrote: > > > Bill Allen wrote: > >> Say I have and iterable called some_stuff which is thousands of items in >> length and I am looping thru it as such: &

[Tutor] iterating over less than a full list

2010-09-04 Thread Bill Allen
Say I have and iterable called some_stuff which is thousands of items in length and I am looping thru it as such: for x in some_stuff etc... However, what if I want only to iterate through only the first ten items of some_stuff, for testing purposes. Is there a concise way of specifying tha

Re: [Tutor] question about import statement

2010-08-26 Thread Bill Allen
> > On Thu, Aug 26, 2010 at 7:44 PM, Corey Richardson wrote: > >> Why don't you try it out without the "from tkinter import ttk" statement, >> and see if it works? >> >> Bill Allen wrote: >> >>> I was experimenting with Tk today,

Re: [Tutor] question about import statement

2010-08-26 Thread Bill Allen
On Thu, Aug 26, 2010 at 7:44 PM, Corey Richardson wrote: > Why don't you try it out without the "from tkinter import ttk" statement, > and see if it works? > > Bill Allen wrote: > >> I was experimenting with Tk today, just trying it out. I found this >

[Tutor] question about import statement

2010-08-26 Thread Bill Allen
t I don't understand is why it is necessary to run that import statement twice. Shouldn't import * bring everything in from tkinter? Just wondering, Bill Allen ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription o

Re: [Tutor] box drawing characters

2010-08-23 Thread Bill Allen
On Wed, Aug 18, 2010 at 2:13 PM, Bill Allen wrote: > > "Ewald Horn" wrote in message >> news:aanlktinmkzyxbd0t7rldyexhbanw1tnfzac5z2gee...@mail.gmail.com... >> >> Hi Bill, >>> >>> have you given UniCurses a spin? >>> >

Re: [Tutor] inserting variables into a docstring

2010-08-21 Thread Bill Allen
On Sat, Aug 21, 2010 at 11:27 PM, Hugo Arts wrote: > > The variable is inserted just fine for me, though there's some > problems with the tag, because you shouldn't surround GET > variables with quotation marks, e.g. you should do this: > > http://example.com/?ecn=423434 > NOT this: > http://exa

[Tutor] inserting variables into a docstring

2010-08-21 Thread Bill Allen
I am trying to build an HTML body text for an email using a docstring with variables inserted a certain points. It all works just fine, except that the first instance of the variable "pecn" in the HTML link does not get inserted into the text. The second instance of "pecn" gets inserted ok into t

Re: [Tutor] Windows Power Shell

2010-08-21 Thread Bill Allen
te something back to the group that I actual know about! ;-D Bill On Sat, Aug 21, 2010 at 12:21 PM, Bill Allen wrote: > Alan, > > I have used WPS 1.0 for some time at work to script software installs, > etc. It is very powerful and gives full .NET visibility to "

Re: [Tutor] Windows Power Shell

2010-08-21 Thread Bill Allen
Alan, I have used WPS 1.0 for some time at work to script software installs, etc. It is very powerful and gives full .NET visibility to "DOS" level scripts. In fact, it is a plausible replacement for VB for most administrative scripting work in the Windows environment. Some good resources: The He

Re: [Tutor] box drawing characters

2010-08-18 Thread Bill Allen
On Wed, Aug 18, 2010 at 12:36 PM, Alan Gauld wrote: > Looks interesting, a new one for me, thanks for posting. > > Alan G. > > "Ewald Horn" wrote in message > news:aanlktinmkzyxbd0t7rldyexhbanw1tnfzac5z2gee...@mail.gmail.com... > > Hi Bill, >> >> have you given UniCurses a spin? >> >> See http:/

Re: [Tutor] box drawing characters

2010-08-18 Thread Bill Allen
On Wed, Aug 18, 2010 at 3:15 AM, Alan Gauld wrote: > > "Bill Allen" wrote > >> I want to be able to create some user interfaces, similar to what you see >>> >> in console based programs like Midnight Commander or other TUI type >> programs >&

Re: [Tutor] box drawing characters

2010-08-17 Thread Bill Allen
On Tue, Aug 17, 2010 at 10:00 AM, bob gailer wrote: > On 8/17/2010 12:30 AM, Bill Allen wrote: > >> I am looking for some guidance about how to best utilize box drawing >> characters(using unicode?) in as portable a way as possible in Python. Any >> good guides out there

[Tutor] box drawing characters

2010-08-16 Thread Bill Allen
I am looking for some guidance about how to best utilize box drawing characters(using unicode?) in as portable a way as possible in Python. Any good guides out there for this? Thanks, Bill ___ Tutor maillist - Tutor@python.org To unsubscribe or change

  1   2   >