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 the user showing up

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 alan.ga...@btinternet.com 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

[Tutor] cannot get a label message to display immediately

2015-08-14 Thread Bill Allen
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] cannot get a label message to display immediately

2015-08-14 Thread Bill Allen
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 to get out there to the user root.after(1000, process_part) #the long running data process Thanks again! Bill

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 alan.ga...@btinternet.com wrote: On 18/04/15 04:16, Bill Allen wrote

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 for the excellent explanations! The distinction between a reference

Re: [Tutor] lists, name semantics

2015-04-18 Thread Bill Allen
On Apr 18, 2015 4:11 PM, boB Stepp robertvst...@gmail.com wrote: On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen walle...@gmail.com wrote: On Apr 18, 2015 7:50 AM, Peter Otten __pete...@web.de wrote: Bill Allen wrote: Everyone that responded, Thanks very much for the excellent

[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 opposed to the other? Thanks, Bill

[Tutor] cx_Oracle and Pyinstaller

2014-12-10 Thread Bill Allen
= (ADDRESS = (PROTOCOL = TCP)(HOST = FQDN or IP)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = Oracle service name) ) ) -- --Bill Allen ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

[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

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. It will do most

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

2011-07-25 Thread Bill Allen
: 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 m...@timgolden.me.uk 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

[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 -

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 m...@timgolden.me.uk 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 user'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

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 st...@pearwood.info 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 simple renaming they seem

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 bgai...@gmail.com 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

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

2011-04-14 Thread Bill Allen
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 unsubscribe

Re: [Tutor] Python on TV

2011-04-14 Thread Bill Allen
On Thu, Apr 14, 2011 at 15:33, Luke Paireepinart rabidpoob...@gmail.comwrote: 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

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

2011-03-17 Thread Bill Allen
...@btinternet.com wrote: Bill Allen walle...@gmail.com wrote 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? curses. Take a look

[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

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 http://www.python.org http://www.catb.org/%7Eesr/faqs/hacker-howto.htmlTarleton Area Amateur Radio Clubhttp://taarc.rebelwolf.com 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 ewe...@u.washington.edu 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 pyshell#0, line 1, in

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 walle...@gmail.com wrote: I know

Re: [Tutor] python module to search a website

2011-02-26 Thread Bill Allen
n Sat, Feb 26, 2011 at 21:11, vineeth vineethrak...@gmail.com 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

Re: [Tutor] accessing another system's environment

2011-02-25 Thread Bill Allen
...@btinternet.com wrote: Bill Allen walle...@gmail.com wrote I have times when it is useful for me to check the environment of a user system on our lan remotely while trouble shooting and issue with them. Now, this is quite easy to do while I am using a windows system via the computer management

Re: [Tutor] accessing another system's environment

2011-02-25 Thread Bill Allen
On Fri, Feb 25, 2011 at 21:33, Steve Willoughby st...@alchemy.com 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.

Re: [Tutor] accessing another system's environment

2011-02-25 Thread Bill Allen
On Fri, Feb 25, 2011 at 22:39, Steve Willoughby st...@alchemy.com 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

Re: [Tutor] accessing another system's environment

2011-02-24 Thread Bill Allen
, Alan Gauld alan.ga...@btinternet.com wrote: Bill Allen walle...@gmail.com 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. Environments are user

[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

[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

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 amon...@columbus.rr.comwrote: I'll freely admit that I do not come from an OOP programming background, so designing classes is not my

Re: [Tutor] creating classes while coding

2011-02-20 Thread Bill Allen
On Sun, Feb 20, 2011 at 19:59, Alan Gauld alan.ga...@btinternet.com wrote: Bill Allen walle...@gmail.com 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 functions

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

[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 printing to LPT

2011-02-12 Thread Bill Allen
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 alan.ga...@btinternet.com wrote: Bill Allen walle...@gmail.com 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 alan.ga...@btinternet.com wrote: to print some plain text to a dot matrix printer that the printer can handle with its own internal fonts

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. beachkid...@gmail.com wrote: On 02/12/2011 10:14 AM, Bill Allen wrote: Is is possible

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

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

[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

[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] 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 st...@pearwood.info wrote: Bill Allen wrote: Ok, I have definately verified this to myself. The following works perfectly and is a little easier

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 waynejwer...@gmail.com wrote: On Tue, Jan 25, 2011 at 1:42 AM, Alan Gauld alan.ga...@btinternet.comwrote: Bill Allen

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 hacker0...@hotmail.com wrote: can I have some good ideas for simple

[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

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

2011-01-24 Thread Bill Allen
, Jan 24, 2011 at 23:56, Bill Allen walle...@gmail.com 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

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

2011-01-24 Thread Bill Allen
: 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 walle...@gmail.com wrote: By the way, my guess as to why this is working for me the way it does

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: I am not understanding

[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 the

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 m...@timgolden.me.uk 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

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

2011-01-14 Thread Bill Allen
(hello world) hello world x = input(how many?) how many?5 x 5 On Thu, Jan 13, 2011 at 9:31 PM, Corey Richardson kb1...@aim.com wrote: On 01/13/2011 10:29 PM, Bill Allen wrote: That is correct about the difference between Python 2 and Python 3 syntax. However, I am surprised that with 2.7.1

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.

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

2011-01-13 Thread Bill Allen
(hello world) hello world x = input(how many?) how many?5 x 5 On Thu, Jan 13, 2011 at 9:31 PM, Corey Richardson kb1...@aim.com wrote: On 01/13/2011 10:29 PM, Bill Allen wrote: That is correct about the difference between Python 2 and Python 3 syntax. However, I am surprised that with 2.7.1

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

2011-01-13 Thread Bill Allen
will using input to get an integer. Cheers, Vern On Thu, Jan 13, 2011 at 11:18 PM, Bill Allen walle...@gmail.com wrote: I will agree that it seems odd, but here is a sample run from my system. I promise I am not pulling anyone's leg! :-)) wallenpb@Ubuntu-D810:~$ python Python 2.6.5

Re: [Tutor] Sorting a List

2011-01-12 Thread Bill Allen
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_list[0]) --Bill Allen On Wed, Jan 12, 2011 at 6:56 PM, Corey Richardson kb1

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 st...@pearwood.infowrote: Bill Allen wrote: Anyone know how to get WConio.putch() to properly put out a box drawing character

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 alan.ga...@btinternet.comwrote: Modulok modu...@gmail.com wrote For more complex stuff, (think blue screens with little

Re: [Tutor] Writing to the terminal?

2010-12-13 Thread Bill Allen
»¼½_¿ÄÅÆÇ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 walle...@gmail.com wrote: Alan, Oh wow! I

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 waynejwer...@gmail.comwrote:

[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 j...@jedsmith.org wrote: On Sun, Oct 10, 2010 at 9:31 PM, Jorge Biquez jbiq...@icsmx.com 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

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:

[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] a logic problem in an if statement

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

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 flebber.c...@gmail.comwrote: 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

Re: [Tutor] generating formatted output

2010-09-26 Thread Bill Allen
On Sun, Sep 26, 2010 at 4:21 PM, Hugo Arts hugo.yo...@gmail.com wrote: On Sun, Sep 26, 2010 at 10:16 PM, Rance Hall ran...@gmail.com 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

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 st...@pearwood.infowrote: 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 clicks in bottom half

Re: [Tutor] plotting pixels

2010-09-19 Thread Bill Allen
On Sun, Sep 19, 2010 at 2:40 AM, Lie Ryan lie.1...@gmail.com 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

Re: [Tutor] plotting pixels

2010-09-18 Thread Bill Allen
On Fri, Sep 17, 2010 at 3:38 AM, Alan Gauld alan.ga...@btinternet.comwrote: 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.

Re: [Tutor] plotting pixels

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

Re: [Tutor] plotting pixels

2010-09-18 Thread Bill Allen
On Sat, Sep 18, 2010 at 1:18 PM, Ken Oliver ksterl...@mindspring.comwrote: On Fri, Sep 17, 2010 at 3:38 AM, Alan Gauld alan.ga...@btinternet.comwrote: 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

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 9:26 PM, Bill Allen walle...@gmail.com 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. The Pil

[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] plotting pixels

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

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 smokefl...@gmail.com 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] 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

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

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 sql statement as

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 is a trick in V2.7 to make it

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. from

[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

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

2010-09-04 Thread Bill Allen
into the itertools module and see what goodies are to be found there. -Bill On Sat, Sep 4, 2010 at 2:07 PM, Dave Angel da...@ieee.org 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: for x in some_stuff

[Tutor] question about import statement

2010-08-26 Thread Bill Allen
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 options: http://mail.python.org/mailman

Re: [Tutor] question about import statement

2010-08-26 Thread Bill Allen
On Thu, Aug 26, 2010 at 7:44 PM, Corey Richardson kb1...@aim.com 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 example of a very simple hello world

Re: [Tutor] question about import statement

2010-08-26 Thread Bill Allen
On Thu, Aug 26, 2010 at 7:44 PM, Corey Richardson kb1...@aim.com 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 example of a very simple hello

Re: [Tutor] box drawing characters

2010-08-23 Thread Bill Allen
On Wed, Aug 18, 2010 at 2:13 PM, Bill Allen walle...@gmail.com wrote: Ewald Horn ewaldh...@gmail.com wrote in message news:aanlktinmkzyxbd0t7rldyexhbanw1tnfzac5z2gee...@mail.gmail.com... Hi Bill, have you given UniCurses a spin? See http://pyunicurses.sourceforge.net/ for more

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 Hey

Re: [Tutor] Windows Power Shell

2010-08-21 Thread Bill Allen
On Sat, Aug 21, 2010 at 12:21 PM, Bill Allen walle...@gmail.com 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 DOS level scripts. In fact, it is a plausible replacement for VB for most administrative

[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 that

Re: [Tutor] inserting variables into a docstring

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

Re: [Tutor] box drawing characters

2010-08-18 Thread Bill Allen
On Wed, Aug 18, 2010 at 3:15 AM, Alan Gauld alan.ga...@btinternet.comwrote: Bill Allen walle...@gmail.com 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 that use box drawing

Re: [Tutor] box drawing characters

2010-08-18 Thread Bill Allen
On Wed, Aug 18, 2010 at 12:36 PM, Alan Gauld alan.ga...@btinternet.comwrote: Looks interesting, a new one for me, thanks for posting. Alan G. Ewald Horn ewaldh...@gmail.com wrote in message news:aanlktinmkzyxbd0t7rldyexhbanw1tnfzac5z2gee...@mail.gmail.com... Hi Bill, have you given

Re: [Tutor] box drawing characters

2010-08-17 Thread Bill Allen
On Tue, Aug 17, 2010 at 10:00 AM, bob gailer bgai...@gmail.com 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

Re: [Tutor] my Python learning exercise

2010-08-16 Thread Bill Allen
On Mon, Aug 16, 2010 at 9:25 AM, Luke Paireepinart rabidpoob...@gmail.comwrote: Anyone who finds this interesting may also want to look into http://inventwithpython.com/ , I hear it's a good book but I haven't personally worked through it. Very interesting, looks good! Thanks, Bill

[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

Re: [Tutor] Tutor Digest, Vol 78, Issue 68

2010-08-14 Thread Bill Allen
On Sat, Aug 14, 2010 at 4:29 AM, Stephen Farthing squir...@gmail.comwrote: Thanks for all the helpI am working my way through Snake wrangling for kids as a start. I downloaded Netbeans and installed the plug in as Idle will not load on my 64 bit Windows 7. And I have WXPython 2.8 plus the

  1   2   >