Re: [Tutor] learn python to build payment processor

2018-07-12 Thread Leam Hall
On 07/11/2018 05:41 PM, Anil Duggirala wrote: You don;t tell us your experience level. Im not a complete newbie, I understand basic programming. Anil, if you are doing this for a class project, or as a way to learn Python, then I applaud you! It will take time and be difficult but you

Re: [Tutor] C++ or Python?

2018-07-03 Thread Leam Hall
Howard is right. You will produce actual code doing actual stuff much faster with Python than with C++. There are ways to resolve performance bottlenecks but most people don't actually hit those sorts of issues. Leam On 07/03/2018 01:06 PM, Howard B wrote: Greetings -- Faster to do

Re: [Tutor] Async TCP Server

2018-04-25 Thread Leam Hall
On 04/25/2018 05:14 PM, Simon Connah wrote: Hi, I've come up with an idea for a new protocol I want to implement in Python using 3.6 (or maybe 3.7 when that comes out), but I'm somewhat confused about how to do it in an async way. The way I understand it is that you have a loop that waits for

Re: [Tutor] XML Programs

2018-04-16 Thread leam hall
nfo(file, element) outfile.close() On Mon, Apr 16, 2018 at 9:07 AM, Glen <gle...@gmail.com> wrote: > I understand, I'd love to use something else but the save game files are in > XML so I have no choice :'( > > On 16 April 2018 at 13:54, leam hall <leamh...@gmail.com>

Re: [Tutor] XML Programs

2018-04-16 Thread leam hall
On Mon, Apr 16, 2018 at 7:10 AM, Glen wrote: > Hey guys, > > I'm writing a save-game editor for a game I play (just a project to learn). > But I am struggling on how to structure the code, how to store the xml data > in data structure etc, > > Can anyone recommend some source I

Re: [Tutor] pythonic

2018-04-02 Thread leam hall
On Mon, Apr 2, 2018 at 9:01 AM, David Rock wrote: > It’s just as (if not more) pythonic to use the standard libraries. It’s very > common in a professional environment to not have access to outside (i.e., > internet) resources. I wouldn’t venture into Pypi unless there’s

Re: [Tutor] Fwd: Need help with reading and cleaning CSV files for a class

2018-01-28 Thread leam hall
On Sun, Jan 28, 2018 at 8:36 AM, Geoff Hancock wrote: > Good day- > I'm in a difficult situation. > I have been asked to help teach students how to clean up a CSV file in > Python. > The job has fallen to me because the teacher of the course is out on > emergency leave and I

Re: [Tutor] IDLE

2017-12-30 Thread Leam Hall
On 12/30/2017 04:07 AM, Alan Gauld via Tutor wrote: Videos are good for getting a feel for things and understanding concepts but IMHO they are not good for details. This is how I learn coding languages. Watch a video series for a little bit and then find a written tutorial to work through.

Re: [Tutor] When do you know you're ready to start applying for jobs?

2017-12-12 Thread leam hall
On Tue, Dec 12, 2017 at 2:43 PM, Matthew Ngaha wrote: > Can I get a junior programming job without a CS degree? > When do you know you're ready to start applying for jobs? How can a > self learner ever know? > should I have applied for some jobs back in 2015 when I was still

Re: [Tutor] Standard module sqlite3 or APSW?

2017-09-09 Thread leam hall
On Sat, Sep 9, 2017 at 8:56 PM, boB Stepp wrote: > First, if I have not misinterpreted anything, the subject header is > perhaps better written as "pysqlite or APSW?" As far as I can tell > from reading the documentation at >

Re: [Tutor] How is database creation normally handled?

2017-09-09 Thread leam hall
On Sat, Sep 9, 2017 at 8:29 PM, boB Stepp wrote: > While reading about SQL, SQLite and the Python module sqlite3, it > appears that I could (1) have a program check for the existence of the > program's database, and if not found, create it, make the tables, > etc.; or,

Re: [Tutor] Python 3 for Beginners was: (Re: intro book for python)

2017-09-03 Thread Leam Hall
On 09/03/2017 10:06 AM, David Rock wrote: On Sep 3, 2017, at 08:55, Mats Wichmann <m...@wichmann.us> wrote: On 09/03/2017 04:02 AM, Leam Hall wrote: Anyone that uses python on Linux has to use Python 2. Every current distro I know of has a python 3 package, plus lots and lots of a

[Tutor] Python 3 for Beginners was: (Re: intro book for python)

2017-09-03 Thread Leam Hall
On 09/03/2017 12:10 AM, Mark Lawrence via Tutor wrote: On 01/09/17 18:51, Raghunadh wrote: Hello Derek, I would start with this book https://learnpythonthehardway.org Raghunadh I cannot recommend anything from the author of LPTHW after he had the audacity to write this

[Tutor] Free Python Class on Coursera

2017-06-13 Thread leam hall
Hey everyone, There's a free pair of Python classes on Coursera. I'm fixing to take the second one "https://www.coursera.org/learn/program-code; that starts 26 Jun. If you've been here for a while and learned the basics, now is a good time to up your skills. If you are new here the first of the

Re: [Tutor] (no subject)

2017-05-10 Thread leam hall
Oh...Spam with Curry! On Wed, May 10, 2017 at 8:18 PM, Alan Gauld via Tutor wrote: > On 11/05/17 01:02, Steven D'Aprano wrote: >> Looks like spam to me. A link to a mystery URL with no context, by >> somebody signing their email with a radically different name from the >> email

Re: [Tutor] understanding code testing

2017-04-15 Thread leam hall
For python specific I'd look at unittest: https://docs.python.org/3/library/unittest.html?highlight=test#module-unittest For testing in general then "Test Driven Development By Example" by Kent Beck. Examples are in Java but he explains the theory. I've been on a testing kick lately and am

Re: [Tutor] creating .json files

2017-04-13 Thread leam hall
On Thu, Apr 13, 2017 at 12:32 PM, Rafael Knuth wrote: > Is there a way to split these two into separate steps: > a) creating a .json file > b) manipulating it (a, r, w ...) > > Example: > > "import json > number_list = [1, 2, 3, 4, 5, 6, 7, 8, 9] > file_name =

[Tutor] Socket error in class, part the second

2017-03-10 Thread leam hall
y'all, Thanks for the explanations! Sorry for the delay in responding, it's been a rough year these past couple weeks. As noted, the fix was to put the "import socket" above the class declaration. What confuses me is that in the calling program I'm importing the class: from mysocket import

[Tutor] Socket error in class

2017-03-06 Thread leam hall
What am I missing? class mysocket(): import socket def __init__(self, sock=None); if sock is None: self.sock = socket.socket(socket.socket.AF_NET, socket.socket.SOCK_STREAM) else: self.sock = sock Error: NameError: global name "socket" is not defined.

Re: [Tutor] looping - beginner question

2017-03-02 Thread leam hall
On Thu, Mar 2, 2017 at 8:42 AM, Rafael Knuth wrote: > I wrote a program that is supposed to take orders from customers in a bar. > If the desired drink is available, the customer will be served. If > not, he will be informed that the drink is not available. This is what >

Re: [Tutor] Learning Objectives?

2017-03-01 Thread Leam Hall
On 02/28/17 05:24, M Hashmi wrote: Coding is an artthat helps you craft beautiful things in digital world. As beginner it's pretty natural to confuse about which learning curve can benefit you most in future. I see computer science as a science that calls upon our creative nature to

Re: [Tutor] Learning Objectives?

2017-02-28 Thread Leam Hall
On 02/27/17 20:12, Alan Gauld via Tutor wrote: On 27/02/17 14:57, leam hall wrote: I'm not aware of such a list, and I'm not sure it's of much value. Better to just learn what you need and use it. ... When I was coming up as a Linux guy I took the old SAGE guidelines and studied each "

Re: [Tutor] Learning Objectives?

2017-02-27 Thread leam hall
On Mon, Feb 27, 2017 at 9:28 AM, Alan Gauld via Tutor <tutor@python.org> wrote: > On 27/02/17 10:44, Leam Hall wrote: > > Is there a list of Python skill progression, like "Intermediates should > > know and Advanced should know ?" Trying to map out > &g

[Tutor] Learning Objectives?

2017-02-27 Thread Leam Hall
Is there a list of Python skill progression, like "Intermediates should know and Advanced should know ?" Trying to map out a well rounded study list. Thanks! Leam ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] Good approach regarding classes attributes

2014-09-09 Thread leam hall
On Tue, Sep 9, 2014 at 9:09 AM, Sydney Shall s.sh...@virginmedia.com wrote: And while I am writing, what does OP stand for in this list? Original Poster. So I understand. Won't answer the Python question since I'm a newbie here myself. -- Mind on a Mission

Re: [Tutor] Import from project's lib directory?

2014-08-29 Thread leam hall
On Thu, Aug 28, 2014 at 6:39 PM, Cameron Simpson c...@zip.com.au wrote: On 28Aug2014 22:36, Alan Gauld alan.ga...@btinternet.com wrote: On 28/08/14 19:03, leam hall wrote: python 2.4.3 on Red Hat Linux. I'm starting a project and want to break the scripts into input, output, and ddl. I'd

Re: [Tutor] Import from project's lib directory?

2014-08-29 Thread leam hall
On Fri, Aug 29, 2014 at 9:39 AM, diliup gabadamudalige dili...@gmail.com wrote: this is the easiest way to do this # one.py is in the \data\ directory # two.py is in the \data\img\ directory # three.py is in the \data\img\sc\ directory ## this program is in the learn_music dir ##

Re: [Tutor] Import from project's lib directory?

2014-08-29 Thread leam hall
Am I asking the wrong question? How do older apps with older versions of python (2.4.x) separate code into sub-directories? Do they? -- Mind on a Mission ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] Import from project's lib directory?

2014-08-29 Thread leam hall
On Fri, Aug 29, 2014 at 5:16 PM, Peter Otten __pete...@web.de wrote: leam hall wrote: Am I asking the wrong question? How do older apps with older versions of python (2.4.x) separate code into sub-directories? Do they? You have to ensure that the *parent* of alpha is in sys.path. Then you

[Tutor] Import from project's lib directory?

2014-08-28 Thread leam hall
python 2.4.3 on Red Hat Linux. I'm starting a project and want to break the scripts into input, output, and ddl. I'd like to have a lib library directory for local modules. The library directory would be at the same level as the others. How do I get the library modules? import

Re: [Tutor] Import from project's lib directory?

2014-08-28 Thread leam hall
On Thu, Aug 28, 2014 at 2:19 PM, Danny Yoo d...@hashcollision.org wrote: On Thu, Aug 28, 2014 at 11:03 AM, leam hall leamh...@gmail.com wrote: python 2.4.3 on Red Hat Linux. I'm starting a project and want to break the scripts into input, output, and ddl. I'd like to have a lib library

Re: [Tutor] Import from project's lib directory?

2014-08-28 Thread leam hall
On Thu, Aug 28, 2014 at 3:27 PM, Danny Yoo d...@hashcollision.org wrote: Fails on both Python 2.4 and 2.6 with either .lib or ..lib. ### code #!/usr/bin/env python from ..lib import mymodule In python/ddl, referencing ../lib/mymodule.py ./import_test.py Traceback (most recent

Re: [Tutor] Building Starships -- object of type 'int' has no len()

2014-08-15 Thread leam hall
On a totally side note, I'm watching this because I want to do my own starship stuff. Long time Traveller player. -- Mind on a Mission ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] Better way to check *nix remote file age?

2014-06-27 Thread leam hall
On Fri, Jun 27, 2014 at 7:41 AM, Stefan Behnel stefan...@behnel.de wrote: Raúl Cumplido, 27.06.2014 12:10: I would recommend you to migrate your Python version for a newer one where you can use fabric, paramiko or other ssh tools. It would be easier. +1 Even compiling it yourself

Re: [Tutor] Better way to check *nix remote file age?

2014-06-27 Thread Leam Hall
On 06/27/14 17:40, Walter Prins wrote: Hi, On 26 June 2014 18:01, leam hall leamh...@gmail.com wrote: On Thu, Jun 26, 2014 at 12:41 PM, Walter Prins wpr...@gmail.com wrote: On 26 June 2014 14:39, leam hall leamh...@gmail.com wrote: Python 2.4.3 Is there a better way to do this? I'd probably

Re: [Tutor] Better way to check *nix remote file age?

2014-06-27 Thread Leam Hall
On 06/27/14 06:10, Raúl Cumplido wrote: Hi, I would recommend also instead of doing an ls -l command doing something to retrieve only the information you need: /bin/ls -ls | awk '{print $7,$8,$9, $10}' Jun 27 10:36 my_file Then I would use timedelta instead where you can be more accurate

[Tutor] Better way to check *nix remote file age?

2014-06-26 Thread leam hall
Python 2.4.3 Writing a function that takes the string from ssh server ls -l /var/log/yum.log and tries to see if the file is more than a couple months old. The goal is to only run python on the local server and it will ssh into the remote server. Is there a better way to do this? Thanks! Leam

Re: [Tutor] Better way to check *nix remote file age?

2014-06-26 Thread leam hall
On Thu, Jun 26, 2014 at 12:41 PM, Walter Prins wpr...@gmail.com wrote: On 26 June 2014 14:39, leam hall leamh...@gmail.com wrote: Python 2.4.3 Writing a function that takes the string from ssh server ls -l /var/log/yum.log and tries to see if the file is more than a couple months old

Re: [Tutor] Real world experience

2014-05-12 Thread leam hall
On Mon, May 12, 2014 at 1:47 PM, Danny Yoo d...@hashcollision.org wrote: I have never known anyone that works in this industry. Just as a side comment: there are probably several folks on this mailing list whose job description would match working in industry. One big step is program for

Re: [Tutor] One on one tutor

2014-04-05 Thread Leam Hall
On 04/04/2014 07:49 PM, Keith Adu wrote: Hi my name is Keith, am a beginner with no experience in python or computer science. Am looking for someone to work with me one on one, I have many question that I need answered, my question are basic as of the moment because am starting, I don't want

[Tutor] System output into variable?

2014-04-03 Thread leam hall
I've been trying to so a simple run a command and put the output into a variable. Using Python 2.4 and 2.6 with no option to move. The go is to do something like this: my_var = ls -l my_file So far the best I've seen is: line = os.popen('ls -l my_file', stdout=subprocess.PIPE, shell=True) (out,

[Tutor] How to get file permissions (Python 2.4)?

2014-03-19 Thread leam hall
I can use os.chmod('/usr/local/somefile') to change permissions but I haven't been able to find a way to test for file modes. stat.S_IRWXU('/usr/bin/python') Traceback (most recent call last): File stdin, line 1, in ? TypeError: 'int' object is not callable What should I be looking for?

Re: [Tutor] Which computer operating system is best for Python

2014-02-06 Thread leam hall
On Thu, Feb 6, 2014 at 8:38 AM, Neil Cerutti ne...@norwich.edu wrote: Linux is a great OS for a child to learn computing and programming on, provided the parent knows it well enough to train the student on it. If not, it's just inviting needless headaches. Look at http://www.edubuntu.org/

Re: [Tutor] Best version for novice

2014-02-02 Thread Leam Hall
On 02/01/2014 03:35 PM, Alan Gauld wrote: On 01/02/14 18:41, Ian D wrote: Is it better to use python 3 as a newcomer who isn't really going to be writing any software as such just using it for learning? The more important question is which version does your preferred tutorial use? And are

[Tutor] subprocess.Popen help

2014-01-28 Thread leam hall
Python tutorial for 2.6 (using 2.4 -- don't ask), first code blurb under 17.1.1 http://docs.python.org/2.6/library/subprocess.html?highlight=subprocess#subprocess.Popen How would you make an ssh to another box put data back in p? The goal is to run a shell command on a remote box and work with

[Tutor] Global var not defined?

2013-08-27 Thread leam hall
Could use some help with this. Python 2.4.3 on RHEL 5.x. In the functions file that gets imported: def append_customer(line_list): global customers cust = line_list[0] // list with Customer info in [0] cust = clean_word(cust) // Trims white space if

Re: [Tutor] How much in a try block?

2013-08-23 Thread leam hall
Well, maybe I'm looking at the wrong construct. The script needs to open up one file that will be on the machine. It will open up other files given as command line arguments and open files to write to. It should fail gracefully if it cannot open the files to be read or written. The community that

[Tutor] How much in a try block?

2013-08-22 Thread leam hall
If I have a series of tasks that depend on X happening, should I put them all in the same try block or just put X in there and exit out if it fails? Thanks! Leam -- Mind on a Mission http://leamhall.blogspot.com/ ___ Tutor maillist -

Re: [Tutor] python tutoring

2013-08-20 Thread leam hall
Trent, You can do well with Alan's on-line pages ( http://www.freenetpages.co.uk/hp/alan.gauld/) and just ask questions here. The biggest thing is to pick a big enough but not too big project. Using Python as your first programming language will spoil you, though, it's a great language and covers

Re: [Tutor] [OT] Replies go to individuals, not the list?

2013-08-20 Thread leam hall
Replying to the human, vice the list, is about 99% never what I want. With a 1% margin of error. :) Leam On Tue, Aug 20, 2013 at 3:00 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: On Tue, Aug 20, 2013 at 8:53 PM, Alan Gauld alan.ga...@btinternet.com wrote: On 20/08/13 13:15,

Re: [Tutor] [OT] Replies go to individuals, not the list?

2013-08-20 Thread leam hall
The only question I have is what is compelling about being different than other lists? Far as I can tell, most reply to the list if you click reply. It's not something to get religious over; if I reply and don't have time to make sure it goes to those who might be interested, at least it will go

[Tutor] Coursera Python Course starts today

2013-08-19 Thread Leam Hall
Hey all, In case I'm not the absolute last person to know, the newest edition of the Coursera Learn to Program course started today. It is Python based, free, lasts 7 weeks, and pretty fun. I didn't get a certificate last time as life got in the way. Hope to succeed this time.

[Tutor] [OT] Replies go to individuals, not the list?

2013-08-19 Thread Leam Hall
All, Am I more confused than normal or if I click Reply should it go just to the sender instead of the list? Leam -- http://31challenge.net http://31challenge.net/insight ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] Simple Python SNMP ping?

2013-08-16 Thread leam hall
, Aug 16, 2013 at 12:06 AM, Chris Down ch...@chrisdown.name wrote: Hi Leam, On 2013-08-14 15:21, leam hall wrote: Is there a way to do a simple check in Python to see if a remote host is listening on SNMP port 161/UDP? Simple in this case could either mean technically simple (in which case

Re: [Tutor] Input into lists?

2013-08-16 Thread leam hall
Hey Dave, you're right. I worked through this with a for loop and set the contents of a dict's key as the input. Thanks! Leam On Thu, Aug 15, 2013 at 8:28 PM, Dave Angel da...@davea.name wrote: leam hall wrote: I'm trying to take input from a file (CSV spreadsheet) and use the first

[Tutor] Input into lists?

2013-08-15 Thread leam hall
I'm trying to take input from a file (CSV spreadsheet) and use the first line inputs (header) as the names of lists. So far I'm not successful. :) How do I take line_list[0], the result of line.split(',') and use it as the name of a list? Does that make sense? Thanks! Leam -- Mind on a

Re: [Tutor] Posting solutions to homeworky problems

2013-08-15 Thread leam hall
I've just started some of the Euler stuff. Most of the time I ask for pointers to the logic needed. I enjoy that much more as hopefully I learn something. Leam -- Mind on a Mission http://leamhall.blogspot.com/ ___ Tutor maillist - Tutor@python.org

[Tutor] Simple Python SNMP ping?

2013-08-15 Thread leam hall
Is there a way to do a simple check in Python to see if a remote host is listening on SNMP port 161/UDP? Thanks! Leam -- Mind on a Mission http://leamhall.blogspot.com/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

[Tutor] Fwd: Hello, and a newbie question

2013-04-16 Thread leam hall
Python 2.x if you're working on existing servers like RHEL. If you're having fun on a desktop, Python 3. Free on-line college level class just started: https://class.coursera.org/interactivepython-002/class/index BTW, PHP ROCKS! :P Leam -- Also a PHP programmer -- Mind on a Mission

Re: [Tutor] Starting a simple python project

2013-03-24 Thread Leam Hall
On 03/22/2013 05:02 AM, miguel.gua...@hushmail.com wrote: Greetings all! My name is Miguel Guasch, I'm a software tester who's trying to slowly get into automation, and eventually (in a couple of years) into development. Miguel, welcome! Depending on your skills, you might want to look up

Re: [Tutor] Python version 2.7 or 3.0

2013-03-12 Thread Leam Hall
On 03/12/2013 11:47 AM, Alan Gauld wrote: On 12/03/13 14:20, Mike Nickey wrote: I'm seeing on StackOverflow that 2.7 is the standard for those that have libraries that haven't been ported to 3.1.2 yet. Does this mean that 2.7 is dead or dying? Is this just a well managed marketing campaign?

[Tutor] SMTP('my.smtpserver.com') hangs

2013-03-09 Thread Leam Hall
Python 2.6.6 on CentOS 6 I'm in section 3.4.12 of Wesley Chun's Core Python Applications Programming. The POP3 stuff works but I can't seem to get the SMTP to connect, it just hangs and then times out. Running it in IDLE gets the same thing. Have also tried with the port # set, as well.

Re: [Tutor] Civil discourse from a newbie's perspective

2012-10-02 Thread leam hall
My own struggles to better communicate, and to have my message heard, supports the concerns raised here. The Python community is a very good one and we are only made better by treating people well. it is easy to go to other lists where I am a newbie and find top posting preferred and other

[Tutor] [Semi-OT] Yes or no on using a Graphical IDE?

2012-09-15 Thread leam hall
Hey all, not trying to contribute to the flames of one graphical IDE over another. I'm just trying to figure out if they are worth the learning curve? I have been doing most of my work in vi and the graphical IDE I'm supposed to use for a class keeps adding crap that I have to erase, and I have to

[Tutor] Help with class in class

2012-09-09 Thread leam hall
I'm in the O'Reilly Python 2 class, so pointers to learning would be better than just answers, please. My brain is a bit slow but needs to go forward. Line 16 calls line 31. Rather, it is supposed to. I'm trying to figure out why I get File ./ch8_project.py, line 31, in change_text_color

Re: [Tutor] Help with class in class

2012-09-09 Thread leam hall
Of course, showing the code might help... http://bpaste.net/show/44593/ Thanks! Leam On Sun, Sep 9, 2012 at 10:42 AM, leam hall leamh...@gmail.com wrote: I'm in the O'Reilly Python 2 class, so pointers to learning would be better than just answers, please. My brain is a bit slow but needs

Re: [Tutor] Help with class in class

2012-09-09 Thread leam hall
On Sun, Sep 9, 2012 at 12:12 PM, Peter Otten __pete...@web.de wrote: the above will no longer complain about a missing attribute. root = Tk() project = ch8_Project(master=root) project.mainloop() Another problem that caught my attention: self.green = Button(root, text=Green,

Re: [Tutor] Help with class in class

2012-09-09 Thread leam hall
self.blue = Button(root, text=Blue, command=self.change_text_color(blue)) self.blue.pack(side=LEFT) self.green = Button(root, text=Green, command=self.change_text_color(green)) self.green.pack(side=LEFT) To follow up, I've added a second button. Of course, it doesn't work, the

Re: [Tutor] help me decide

2012-09-04 Thread leam hall
Matthew, Program what is fun for you. I prefer PHP for web work but I'm learning Python for my day job. Python provides a wider range of abilities but PHP is more fun for me. If Python GUIs are fun, then do that. The more you enjoy the topic the more reason you will have to learn more and more. I

[Tutor] Getting name of Widget for event.widget?

2012-07-25 Thread Leam Hall
Note that this is for an on-line class so I'd appreciate pointers to what I need to read or think about more than the answer out right. Using Python 3 on Linux, is there a way to get the name of a widget instead of numeric representations in event.widget? What I tried were a few variations

Re: [Tutor] Where do I start developing from?

2012-07-20 Thread leam hall
Santosh, It is fun to try new activities. Maybe implement some of the PHP things you did in Python. I find myself making small games or tools for games when I want to try something out. You might also want to work with Eclipse and some of the IDE tools, as well as learn Unittesting and stuff

Re: [Tutor] While learning Py: To IDE or not to IDE?

2012-05-20 Thread Leam Hall
On 05/20/2012 06:19 PM, boB Stepp wrote: On Sun, May 20, 2012 at 4:44 PM, Brian van den Broek I am an emacist, myself. But some of my best friends are vimists. Will pray for your soul... But since you brought it up, I'll ask a somewhat more general question: Why do you prefer an editor

[Tutor] Multiple DBs per application?

2012-05-14 Thread leam hall
All, Just a general question. If you have an application with different data types where it might be better to use one database over another, are there issues with having multiple databases used by the application? Thanks! Leam -- Mind on a Mission http://leamhall.blogspot.com/

Re: [Tutor] Multiple DBs per application?

2012-05-14 Thread Leam Hall
On 05/14/2012 06:44 PM, Alan Gauld wrote: On 14/05/12 20:33, leam hall wrote: Just a general question. If you have an application with different data types where it might be better to use one database over another, are there issues with having multiple databases used by the application

Re: [Tutor] Is there space a between #! and /usr/bin/env python ?

2012-05-01 Thread Leam Hall
On 05/01/2012 08:02 PM, Santosh Kumar wrote: Its getting complicated now. Will it effect or not? Give me one word answer with one line description. Experiment -- Try it and see... ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Is there a way I can print the output of help(module)?

2012-04-27 Thread Leam Hall
On 04/27/2012 03:11 PM, Joel Goldstick wrote: Hey Steven, thanks. I guess I was a little lazy in my research. I just discovered pydocs before I read your response. Its great! This is great motivation to write concise and complete docstrings. Joel, I am constantly amazed by all the things

[Tutor] Problem Stripping

2012-03-30 Thread leam hall
Python 2.4.3 on Red Hat 5. Trying to use strip to remove characters but it doesn't seem to work like I thought. res = subprocess.Popen(['uname', '-a'], stdout=subprocess.PIPE) uname = res.stdout.read().strip() uname 'Linux myserver 2.6.18-274.el5PAE #1 SMP Fri Jul 8 17:59:09 EDT 2011 i686 i686

Re: [Tutor] 答复: Any book to study Python

2012-03-19 Thread Leam Hall
On 03/19/2012 09:36 PM, Yan, Xianming wrote: Hello Russel, Thanks for your recommendation and reply. ... Xianming, Wesley is a great help here as is Alan Gauld. One of the things I really like about the Python language is the experts who still help us new programmers. Leam

Re: [Tutor] dict vs several variables?

2012-02-18 Thread Leam Hall
On 02/18/2012 03:39 AM, Peter Otten wrote: Leam Hall wrote: On 02/17/2012 09:26 AM, Dave Angel wrote: There are two ways to think of a class. One is to hold various related data, and the other is to do operations on that data. If you just consider the first, then you could use a class like

[Tutor] dict vs several variables?

2012-02-17 Thread Leam Hall
I'm building a program that uses one of my own modules for a bunch of formula defs and another module for the tkinter GUI stuff. There are half a dozen input variables and about the same in calculated variables. Is it better/cleaner to just build a global dict and have everything go into it or

Re: [Tutor] dict vs several variables?

2012-02-17 Thread leam hall
! Leam On 2/17/12, Peter Otten __pete...@web.de wrote: Leam Hall wrote: I'm building a program that uses one of my own modules for a bunch of formula defs and another module for the tkinter GUI stuff. There are half a dozen input variables and about the same in calculated variables. Is it better

Re: [Tutor] dict vs several variables?

2012-02-17 Thread leam hall
On 2/17/12, Dave Angel d...@davea.name wrote: Real question is whether some (seldom all) of those variables are in fact part of a larger concept. If so, it makes sense to define a class for them, and pass around objects of that class. Notice it's not global, it's still passed as an

Re: [Tutor] dict vs several variables?

2012-02-17 Thread leam hall
On 2/17/12, Peter Otten __pete...@web.de wrote: leam hall wrote: and they may have to have their type set I have no idea what you mean by have their type set. Can you give an example? Peter, The variables input seem to be assumed to be strings and I need them to be an integer or a float

Re: [Tutor] dict vs several variables?

2012-02-17 Thread Leam Hall
On 02/17/2012 09:26 AM, Dave Angel wrote: There are two ways to think of a class. One is to hold various related data, and the other is to do operations on that data. If you just consider the first, then you could use a class like a dictionary whose keys are fixed (known at compile time). I

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread leam hall
I will have to agree with both Wes and Alan, they provide great resources. However, the issue you will face is three-fold. You need to: 1. Write lots of good code. 2. Write lots more good code. 3. Show a whole lot of good code you've written. If you want to program professionally I suggest

Re: [Tutor] Moving from snippits to large projects?

2012-01-09 Thread Leam Hall
Leam Hall wrote: Steve and Hugo Responded To which Leam Replies: Thanks! The O'Reilly class has twelve lessons, the first two are on unit testing. The rest of them will enforce tests be written for their projects. :) I'll look at Git and Sourceforge in the next couple days. In theory

Re: [Tutor] Moving from snippits to large projects?

2012-01-09 Thread leam hall
On 1/9/12, Mike G msg@gmail.com wrote: quote How does one go from small to medium, to large, as a coder? /quote You might look into contributing to an existing project. There is a new project, MediaLocker, a Python / wxPython app recently underway, started from a blog post. I believe

[Tutor] Moving from snippits to large projects?

2012-01-08 Thread Leam Hall
I'm taking the O'Reilly Python 2 course on-line, and enjoying it. Well, when Eclipse works, anyway. I'm still getting the hang of that. While my coding over the years has been small snippits in shell, PHP, and a little C, python, and perl, I've never made the transition from dozens of lines