Re: [Tutor] Which Designer
Sent from my Verizon Wireless BlackBerry -Original Message- From: Sharon Date: Sun, 25 Apr 2010 14:34:56 To: Tutor Python Subject: [Tutor] Which Designer Hi, I am a newbie to python but would like to use a designer for simplicity. Which would be the easiest to use: WxGlade Qt 4 Designer Glade Interface Designer (Gtk) At this point in time I would be looking at the simplest for a newbie until my programming skills in Python improve. Appreciate a few opinions on this. Regards Sharon ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Importing sub modules
You could just use from os import path and use it like path.xxx I don't know know if it saves on overhead or not. In any event, you shouldn't be worrying about something like overhead until after your base prorgram is written. Generally if all I use is path, for example, I use from import. If not I just import the enchilada Sent from my Verizon Wireless BlackBerry -Original Message- From: "Prasad, Ramit" Sender: tutor-bounces+eire1130=gmail@python.org Date: Thu, 31 Mar 2011 17:11:50 To: 'Emile van Sebille'; 'tutor@python.org' Subject: Re: [Tutor] Importing sub modules The joins are really just random calls. I was just curious if importing os.path could avoid any reading/overhead that might occur by importing os. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -Original Message- From: tutor-bounces+ramit.prasad=jpmchase@python.org [mailto:tutor-bounces+ramit.prasad=jpmchase@python.org] On Behalf Of Emile van Sebille Sent: Thursday, March 31, 2011 3:17 PM To: tutor@python.org Subject: Re: [Tutor] Importing sub modules On 3/31/2011 11:07 AM Prasad, Ramit said... > Hi everyone, > I was wondering if there is a difference in > >>>> import os >>>> os.path.join(string1,string2) > AND >>>> import os.path >>>> os.path.join(string1,string2) > > A quick test shows they're the same: ActivePython 2.6.6.15 (ActiveState Software Inc.) based on Python 2.6.6 (r266:84292, Aug 24 2010, 16:01:11) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os as os1 >>> import os.path >>> os1.path is os.path True >>> Although I'm not sure what to make of the joins What are you trying to do? Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates. This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to European legal entities. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Looking for feedback on improving my code.
Pretty cool how that site makes code formating wotk on my bb. The big thing I've noticed is, and I'm a total newbie btw, mind cap conventions. Use camel case and upper case and whatnot for class definitions. I think its a wothwhile habit to pick up. I keep thinking you're instantiating a class when you just calling a func. Instead of going string equals string plus cloud, you can go string plusequals cloud. I would toss the entire thing in a class. And make the funcs methods of your class. Sent from my Verizon Wireless BlackBerry -Original Message- From: Glen Clark Sender: tutor-bounces+eire1130=gmail@python.org Date: Tue, 17 May 2011 21:45:35 To: tutor@python.org Subject: [Tutor] Looking for feedback on improving my code. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Help with making emacs work with python syntax checking?
I second this. I have a second harddrive with Mint on it. Ithought it might be fun to learn emacs. On windows I've been using eclipse for like 6 to 12 months or however long ago I started. I tried emacs for about two seconds and was like, uh no thanks. Downloaded and set up eclipse and I'm still happy. Other than it took too long to set up in mint Bonus is I can use it django as well. Sent from my Verizon Wireless BlackBerry -Original Message- From: "Alan Gauld" Sender: tutor-bounces+eire1130=gmail@python.org Date: Mon, 4 Jul 2011 23:59:48 To: Subject: Re: [Tutor] Help with making emacs work with python syntax checking? "Tidal Espeon" wrote >I need help with installing this setup on my emacs: Why do you want this? Are you already an emacs user? If so then fine, go ahead. But if you do not already use emacs, lerarning it will be a big effort. emacs is a big, powerful tool and once you know it you can use it for almost everything. But its not something you can learn to use quickly. > The problem is that I have no clue how to > access any .emacs file or .emacs.d Which strongly suggests you are not n emacs regular. If you were you would be editing .emacs regularly! > the IDLE just doesn't cut it for me. There are lots of other development enmvirobnments around. If you are a typical GUI user, which it sounds as if you are, then a tool liker Eclipse, (or maybe Blackadder or .Wing or SPE) might be more appropriate. They are powerful but GUI oriented rather than command oriented. Frankly if you are not already an emacs user, or unless you want to make emacs you standard environment in the future and will spend the time changing your computing habits to suit emacs, I'd give up and find a more GUI friendly tool set! And I say that as someone who is an emacs (and vim) user! emacs is a powerful tool and a great programmer's environment, but it's not for the faint hearted. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] newbie needs pypy setup tips
I think, but not 100 percent, that pypy has a list. You might get better traction there if you don't get a good *nswer here. Although I have a couple questions. Have you profiled in python to look for hotspots? Have you tried writting portions in c? What kind of model is it, out of curiousity. Sent from my Verizon Wireless BlackBerry -Original Message- From: Tom Roche Sender: tutor-bounces+eire1130=gmail@python.org Date: Sat, 30 Jul 2011 17:49:02 To: Reply-To: tutor@python.org, Tom Roche Subject: [Tutor] newbie needs pypy setup tips I need advice about configuring pypy to run other python code. Why I ask: I'm running a model implemented in python. Unfortunately a run on "straight" python 2.6.x or 2.7.x requires - 130 min on my ubuntu laptop (on which working would be more convenient) - 55 min on a better build machine on which I currently have access However I have read that this model runs 5x faster under pypy, so I wanna get me that, but I'm finding the pypy docs pretty inscrutable. Nevertheless, I have managed to do me@it:~$ uname -rv > 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 me@it:~$ which pypy > /usr/local/bin/pypy me@it:~$ ls -al $(which pypy) > lrwxrwxrwx 1 root root 37 2011-07-30 16:06 /usr/local/bin/pypy -> > /opt/pypy-c-jit-1.5.0-alpha0/bin/pypy me@it:~$ pypy --version > Python 2.7.1 (b590cf6de419, Apr 30 2011, 02:00:34) > [PyPy 1.5.0-alpha0 with GCC 4.4.3] However, when I try to *really* run the @#$%^&! thing, it spews: me@it:~$ pypy > debug: WARNING: library path not found, using compiled-in sys.path and > sys.prefix will be unset > 'import site' failed > Python 2.7.1 (b590cf6de419, Apr 30 2011, 02:00:34) > [PyPy 1.5.0-alpha0 with GCC 4.4.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > debug: OperationError: > debug: operror-type: ImportError > debug: operror-value: No module named _pypy_interact What do I need to do to fix its library path? TIA, Tom Roche ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] How do I learn python for web development
There are several books om django. This is what you are looking for Sent from my Verizon Wireless BlackBerry -Original Message- From: "abdulhakim haliru" Sender: tutor-bounces+eire1130=gmail@python.org Date: Sun, 31 Jul 2011 20:22:30 To: Reply-To: abdulhakim.hal...@leproghrammeen.com Subject: [Tutor] How do I learn python for web development Hi guys, I am really interested in switching from PHP to python but there don't appear to be a book for such. Can anyone advice me please. Abdulhakim. Sent from my BlackBerry wireless device from MTN -Original Message- From: tutor-requ...@python.org Sender: tutor-bounces+abdulhakim.haliru=leproghrammeen@python.org Date: Sun, 31 Jul 2011 07:01:56 To: Reply-To: tutor@python.org Subject: Tutor Digest, Vol 89, Issue 92 Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/tutor or, via email, send a message with subject or body 'help' to tutor-requ...@python.org You can reach the person managing the list at tutor-ow...@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Tutor digest..." Today's Topics: 1. Re: How to make tkMessage function to have duration (Steven D'Aprano) 2. Re: How to make tkMessage function to have duration (Emeka) 3. newbie needs pypy setup tips (Tom Roche) 4. Re: newbie needs pypy setup tips (eire1...@gmail.com) 5. Re: Mainloop conflict (Christopher King) 6. Re: Mainloop conflict (Stefan Behnel) -- Message: 1 Date: Sat, 30 Jul 2011 21:25:27 +1000 From: Steven D'Aprano To: tutor@python.org Subject: Re: [Tutor] How to make tkMessage function to have duration Message-ID: <4e33ea27.50...@pearwood.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Emeka wrote: > Hello All, > > Say I have the below(code), I would want the message to last say 30 > seconds and afterwards disappear. I won't want the user to be the one to > enable it to disappear. > > Basically, what I want is to be able to show the user some message , and > after some seconds, the message goes away I *hate* it when applications do that. Just as I'm trying to read the message, take a screen shot, or whatever, the message disappears. I think that's one of the worst things you can do in an application. If the message isn't important enough to require it to stay visible until the user explicitly closes it, then it shouldn't go into a dialog in the first place. -- Steven -- Message: 2 Date: Sat, 30 Jul 2011 16:27:21 +0100 From: Emeka To: "Steven D'Aprano" Cc: tutor@python.org Subject: Re: [Tutor] How to make tkMessage function to have duration Message-ID: Content-Type: text/plain; charset="iso-8859-1" Steven,, Thanks! Emeka On Sat, Jul 30, 2011 at 12:25 PM, Steven D'Aprano wrote: > Emeka wrote: > >> Hello All, >> >> Say I have the below(code), I would want the message to last say 30 >> seconds and afterwards disappear. I won't want the user to be the one to >> enable it to disappear. >> >> Basically, what I want is to be able to show the user some message , and >> after some seconds, the message goes away >> > > I *hate* it when applications do that. Just as I'm trying to read the > message, take a screen shot, or whatever, the message disappears. I think > that's one of the worst things you can do in an application. > > If the message isn't important enough to require it to stay visible until > the user explicitly closes it, then it shouldn't go into a dialog in the > first place. > > > > -- > Steven > __**_ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor> > -- *Satajanus Nig. Ltd * -- next part -- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/tutor/attachments/20110730/c3697f06/attachment-0001.html> -- Message: 3 Date: Sat, 30 Jul 2011 17:49:02 -0400 From: Tom Roche To: tutor@python.org, Subject: [Tutor] newbie needs pypy setup tips Message-ID: <877h6zfnht@pobox.com> Content-Type: text/plain; charset=us-ascii I need advice about configuring pypy to run other python code. Why I ask: I'm running a model implemented in python. Unfortunately a run on "straight" python 2.6.x or 2.7.x requires - 130 min on my ubuntu laptop
Re: [Tutor] Accessing Specific Dictionary items
I'm not sure I'm following. Could you give an example of expected input and expected output? Sent from my Verizon Wireless BlackBerry -Original Message- From: Mike Nickey Sender: tutor-bounces+eire1130=gmail@python.org Date: Mon, 1 Aug 2011 15:05:30 To: Subject: [Tutor] Accessing Specific Dictionary items Hi all, I'm trying to access and use specific items within a dictionary that is returned but am having issues in doing so. [{'city': 'Sunnyvale', 'region_name': 'CA', 'area_code': 408, 'metro_code': 'Santa Clara, CA', 'country_name': 'United States'}] How can I populate a list of many different returns so that I have a list that contains all the cities and in line with the item that is referenced. The first step is to populate the list unsorted as it needs to be in correlation to the item that it came from. Thanks for your help. -- ~MEN ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Accessing Specific Dictionary items
Dictionaries are objects and you access their attributes through keys. So, let's say I had a dict: d = {'city':'plattsburgh'} I would thus access the attribute by doing this d['city'] You can store that value to a variable Or you can append to a list directly. l = [] for d in yourdict: l.append(d['city']) Sent from my Verizon Wireless BlackBerry -Original Message----- From: Mike Nickey Sender: tutor-bounces+eire1130=gmail@python.org Date: Mon, 1 Aug 2011 15:26:32 To: ian douglas Cc: Subject: Re: [Tutor] Accessing Specific Dictionary items The input being used is through pygeoip. Using this I am pulling the data by IP and from what I am reading this populates as a dictionary. Here is some of the output that I can show currently [{'city': 'Buena Park', 'region_name': 'CA', 'area_code': 714}, {'city': 'Wallingford', 'region_name': 'CT', 'area_code': 203}, {'city': 'Schenectady', 'region_name': 'NY', 'area_code': 518}, {'city': 'Athens', 'region_name': '35'}] I'd like to have an output similar to this: 'Buena Park', 'Wallingford', 'Schenectady','Athens' pulled by the "city" keys that are used in the returns. I think the easiest way to approach this would be simply to use the .append and populate a list but I don't know how to pull an item by key value from the dictionary returns. I hope this helps clear some confusion and thanks in advance. On Mon, Aug 1, 2011 at 15:14, ian douglas wrote: > On 08/01/2011 03:05 PM, Mike Nickey wrote: >> >> Hi all, >> >> I'm trying to access and use specific items within a dictionary that >> is returned but am having issues in doing so. >> [{'city': 'Sunnyvale', 'region_name': 'CA', 'area_code': 408, >> 'metro_code': 'Santa Clara, CA', 'country_name': 'United States'}] >> >> How can I populate a list of many different returns so that I have a >> list that contains all the cities and in line with the item that is >> referenced. >> >> The first step is to populate the list unsorted as it needs to be in >> correlation to the item that it came from. >> Thanks for your help. >> > > > Could you give us examples of what you want the list to look like? It will > help us direct you to an answer. > -- ~MEN ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] password loop
The while condition is never true when you enter the correct password. So the while loop is evaluated False and is never triggered. What you should do, as a general rule of troubleshooting, is to use print statements. So print the two outcomes and print the boolean evaluation I'm assuming when it is false that it prints 'try again' infinitely. Sent from my Verizon Wireless BlackBerry -Original Message- From: ADRIAN KELLY Sender: tutor-bounces+eire1130=gmail@python.org Date: Fri, 23 Sep 2011 22:56:46 To: Subject: [Tutor] password loop ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] arrary stastic
I don't understand what you want Mayybe give expected output as well Sent from my Verizon Wireless BlackBerry -Original Message- From: lina Sender: tutor-bounces+eire1130=gmail@python.org Date: Tue, 4 Oct 2011 19:44:02 To: tutor Subject: [Tutor] arrary stastic ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Physics Engine
I think python- ogre has a physics engine? Its 3d though Sent from my Verizon Wireless BlackBerry -Original Message- From: Christopher King Sender: tutor-bounces+eire1130=gmail@python.org Date: Tue, 22 Nov 2011 19:22:27 To: python mail list Subject: [Tutor] Physics Engine ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Fw: Splitting a Tuple in Python 2.7
Meant to send to group Sent from my Verizon Wireless BlackBerry -Original Message- From: eire1...@gmail.com Date: Tue, 6 Dec 2011 02:48:00 To: Greg Nielsen Reply-To: eire1...@gmail.com Subject: Re: [Tutor] Splitting a Tuple in Python 2.7 s =(1,2) x = s[0] Printing x above will print the digit 1. You cando the same for the second index as well Sent from my Verizon Wireless BlackBerry -Original Message- From: Greg Nielsen Sender: tutor-bounces+eire1130=gmail@python.org Date: Mon, 5 Dec 2011 21:31:33 To: Subject: [Tutor] Splitting a Tuple in Python 2.7 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] want to chat with someone - phone, skype, or email
On the python site there is a tutorial called, something like, a non-programers guide to python. That is how I started to learn. I then bought somw beginer books. I then thought of some problems I wanted to solve and like eighteen months later I'm still working on those problems, but along the way I've learned a lot Sorry, I won't skype with you as fun as that sounds =) Also I'm replying on my bb so I can't scroll to the bottom. Sent from my Verizon Wireless BlackBerry -Original Message- From: Tamar Osher Sender: tutor-bounces+eire1130=gmail@python.org Date: Mon, 2 Jan 2012 14:20:23 To: Subject: [Tutor] want to chat with someone - phone, skype, or email ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Fw: Namespace question
Sent from my Verizon Wireless BlackBerry -Original Message- From: eire1...@gmail.com Date: Fri, 20 Jan 2012 23:26:05 To: Tino Dai Reply-To: eire1...@gmail.com Subject: Re: [Tutor] Namespace question Is there any reason you broke up settings? My understanding is each app gets its own settings file, but then I don't have a project with more than one app residing in it. Multiple apps is the only reason I can see to break it up. I think you should try this same question on django-users (I follow that list as well) At any rate, have you tried from settings import settings like emile suggested, your worries notwithstanding? Sent from my Verizon Wireless BlackBerry -Original Message- From: Tino Dai Sender: tutor-bounces+eire1130=gmail@python.org Date: Fri, 20 Jan 2012 13:34:23 To: *tutor python Cc: Subject: [Tutor] Namespace question ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] how I overcame the problem "I cannot run Python programs"
That's the nature of things I'm afraid. I do about half of my development on windows. My recomendation, download eclipse and install pydev. IDE choice is always a touchy subject but for windows, this should be your choice. I have notepad++ as well. Its great. But eclipse is better, especially for learning. I can't describe how much it helped me. Sent from my Verizon Wireless BlackBerry -Original Message- From: Tamar Osher Sender: tutor-bounces+eire1130=gmail@python.org Date: Thu, 15 Mar 2012 17:12:37 To: Tutor@Python.org Subject: [Tutor] how I overcame the problem "I cannot run Python programs" ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Translating R Code to Python-- reading in csv files, writing out to csv files
I confese I haven't read your entire email, but have you looked at pyR? I believe it is a wrapper for python, giiving you access to r. Sent from my Verizon Wireless BlackBerry -Original Message- From: Benjamin G Sender: tutor-bounces+eire1130=gmail@python.org Date: Sat, 19 May 2012 13:46:42 To: Subject: [Tutor] Translating R Code to Python-- reading in csv files, writing out to csv files ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor