[Tutor] Data Directory under site-packages

2010-11-10 Thread Greg Lindstrom
Hello, I'm writing my first module that I intend to put under our company's site-packages directory for everyone to use in their programs. The problem I'm having is that I want to place files in a data directory under the module directory (under site-packages) and I don't know how to set the

[Tutor] PyCon 2010 (Atlanta) Call For Tutorials

2009-09-17 Thread Greg Lindstrom
relating to Python is eligible. Tutorial teachers are paid $1,000.00 per class for their efforts. Interested (we hope so!)? More information is available at http://us.pycon.org/2010/tutorials/proposals/ or write us at pycon-tutori...@python.org. We look forward to hearing from YOU. Greg

[Tutor] PyCon 2010 - Call for Tutorials

2009-09-05 Thread Greg Lindstrom
proposal and blank template, are at http://us.pycon.org/2010/tutorials/proposals/. Questions? Email us at pycon-tutori...@python.org. Greg Lindstrom ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

[Tutor] PyCon 2009 - Call for tutorials nearing the end

2008-10-29 Thread Greg Lindstrom
in early December to give you time to prepare your class and PyCon will compensate instructors US$1,500 per tutorial. If you have any questions, please contact [EMAIL PROTECTED] Greg Lindstrom Tutorial Coordinator, PyCon 2009 (US) ___ Tutor maillist - Tutor

[Tutor] PyCon 2009 (US) - Call for Tutorials

2008-10-18 Thread Greg Lindstrom
will compensate instructors US$1,500 per tutorial. If you have any questions, please contact [EMAIL PROTECTED] Greg Lindstrom Tutorial Coordinator, PyCon 2009 (US) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] PyCon 2009 (US) - Call for Tutorials

2008-10-01 Thread Greg Lindstrom
will compensate instructors US$1,500 per tutorial. If you have any questions, please contact [EMAIL PROTECTED] Greg Lindstrom Tutorial Coordinator, PyCon 2009 (US) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] PyCon 2009 (US) - Call for Tutorials

2008-09-18 Thread Greg Lindstrom
to give you time to prepare your class. PyCon will compensate instructors US$1,500 per tutorial. If you have any questions, please contact [EMAIL PROTECTED] Greg Lindstrom Tutorial Coordinator, PyCon 2009 ___ Tutor maillist - Tutor@python.org http

[Tutor] Pinging a service

2008-06-12 Thread Greg Lindstrom
Hello, I would like to write a routine to monitor services running on a remote box. My initial thought is to ping the remote box to monitor latency and then execute a query on the remote machine to monitor the database. What I would like is to gather data points and graph the delay to see if

[Tutor] cx_Oracle help

2008-02-05 Thread Greg Lindstrom
Hello, I'm trying to help out a friend and am stumped. Can you help me out? Thanks, --greg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I will briefly explain the problem I am facing. I am using Oracle 9.2, Python 2.5 and I installed cx_Oracle- 4.3.1-win32-9i-py25

[Tutor] PyCon 2008 Tutorial Sessions

2008-02-03 Thread Greg Lindstrom
Registration for PyCon 2008 is now open. Held in Chicago March 14-16 with Tutorial Thursday on March 13 and sprints afterwards, it is expected that nearly 800 Python enthusiasts will attend at least part of the conference. It is totally run by volunteers and is affordable for just about anyone.

[Tutor] Tutorials at PyCon 2008 (US)

2008-01-07 Thread Greg Lindstrom
Hello Everyone- I'd like to announce the tutorials sessions for PyCon 2008 (US). As you may know, this year PyCon is being held in Chicago, Illinois March 14-16 with the Thursday before (the 13th) being Tutorial Thursday. We are expecting nearly 600 Python enthusiasts to meet up for the

[Tutor] Fwd: [pycon-tutorials] Request: Python Instruction Needed for GIS Symposium

2007-10-30 Thread Greg Lindstrom
We received this on the PyCon tutorial list. Anyone interested?? Thanks, --greg -- Forwarded message -- From: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Oct 30, 2007 11:18 AM Subject: [pycon-tutorials] Request: Python Instruction Needed for GIS Symposium To: [EMAIL PROTECTED] I

[Tutor] PyCon 2008 - Call for Tutorial Topics

2007-09-01 Thread Greg Lindstrom
me know what class would entice you to attend the tutorials. Greg Lindstrom Tutorial Coordinator, PyCon 2008 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] PyCon 2008 - Call for Tutorial Ideas

2007-08-16 Thread Greg Lindstrom
gathering ideas. What tutorials would YOU like to see offered? Please response to: [EMAIL PROTECTED] Thanks, Greg Lindstrom Tutorial Coordinator, PyCon 2008 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How can I execute a PL/SQL Procedure directly through

2007-07-30 Thread Greg Lindstrom
Can anybody help me in how to connect Python to oracle and then to execute an already existing PL/SQL Procedure through Python. What platform are you running? Windows? Linux? Mac? I've used Oracle and plSql for years and will be happy to help out once I know what you need. --greg

Re: [Tutor] How can I execute a PL/SQL Procedure directly through

2007-07-30 Thread Greg Lindstrom
My Oracle connection is set up using the adodb module ( http://adodb.sourceforge.net/). I don't remember why we set it up that way...we haven't touched this part of our code for almost 2 years!. from cx_Oracle import makedsn import adodb db = adodb.NewADOConnection('oci8') connection_string =

Re: [Tutor] How can I execute a PL/SQL Procedure directly through

2007-07-30 Thread Greg Lindstrom
On 7/30/07, Amit Saxena [EMAIL PROTECTED] wrote: I m still not able to run a Procedure from cx_Oracle import makedsn import adodb db = adodb.NewADOConnection('oci8') connection_string = makedsn(10.200.91.27 , 1521, scorpio) #== your values here, of course db.Connect(connection_string,

Re: [Tutor] How can I execute a PL/SQL Procedure directly through

2007-07-30 Thread Greg Lindstrom
I've never tried anything like that before; others may be of more help at this point. What I would try is reading the contents of the file into a local variable. my_data = file('metadata.sql').readlines() # read the file into a list query = ''.join(my_data) # append

Re: [Tutor] Running Python on Gentoo

2007-07-26 Thread Greg Lindstrom
Eric Brunson wrote: What does the command which python say? [EMAIL PROTECTED] ~ $ which python /usr/bin/python HTH, --greg ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Running Python on Gentoo

2007-07-26 Thread Greg Lindstrom
Hello, I am running python 2.4.2 on Gentoo Unix and am having problems running programs. I have a script, hello.py as such: #! /usr/bin/python print 'hello, world' that I save and add executable permission. Then at the prompt I type in.. $ ./hello.py -bash: ./hello.py: /usr/bin/python: bad

[Tutor] Creating Packages

2007-07-18 Thread Greg Lindstrom
Hello- I have written a class to help folks like me manipulate data segments (the kind one deals with when reading/writing data files). The classes and tests are written -- at least enough to get things going -- what I need help with is creating a package out of this and then creating routines

[Tutor] Properties

2007-06-07 Thread Greg Lindstrom
Hello, and I apologize in advance for the question. I have decided to publish a class I use to handle data segments to Google Code for the world to see (I plan to make millions off training classes, books and lectures :-). I need to make it a bit more 'generic' than the class I have been using,

[Tutor] Two Questions...(i) Checking for None (ii) Making

2006-11-05 Thread Greg Lindstrom
Date: Sat, 4 Nov 2006 10:36:58 +From: Asrarahmed Kadri [EMAIL PROTECTED]Hi Folks,I am trying to build a program which takes the following command-line arguments: *-s IP address -D start date -n no. of days -t start timeendtime*the first argument which is -s (for source) can be replaced by -d

[Tutor] Decorators

2006-04-10 Thread Greg Lindstrom
Hello-For some reason I have decided to learn about decorators; I heard them talked up at Pycon the past two years and want to know what all the fuss is about. I might even use them in my code :-)My problem, and this is after reading PEP 318 and other items found when I Googled for decorators, is

Re: [Tutor] failing to learn python

2006-04-10 Thread Greg Lindstrom
Paypal- I do a lot of system admin type work with Python. If you'd like, drop me a line and let me know what you're interested in learning...perhaps I could help you work through a project or two. Greg Lindstrom [EMAIL PROTECTED] ___ Tutor maillist

Re: [Tutor] Is this a good idea to improve my currency program?

2005-12-14 Thread Greg Lindstrom
I was thinking of using a dictionary to hold the currency exchange rates, and saving it to a file, and loading it every time the program opens. It still would not be GUI, but it would be a step towards a better program, I believe. Is this a good idea, or is there stronger ways of doing it? Is it

[Tutor] Pretty XML

2005-11-23 Thread Greg Lindstrom
Hello- I am in the process of creating an XML document from information stored in our database. One of my colleagues will use the record to format our information (health care claims) into all sorts of forms, reports, etc. He is partial to PHP5 but I like Python and would like to know if there is

[Tutor] Re; Geometry

2005-11-07 Thread Greg Lindstrom
If there's not code for geometry, let's write some!! What, precisely, are you looking for? Or, better yet, do you have the resources to have you students write the code after teaching them just enough python? I did that with a physics class a few years ago and the students loved it! --greg

[Tutor] Dynamic Function Assignment

2005-10-20 Thread Greg Lindstrom
Hello- Suppose I have three objects... a = MyObject(id=1) b = MyObject(id=2) c = MyObject(id=3) As I read in segments from my file, I need to choose one of the above based on the segment, something like this; segment = 'A Segment to Process' for id, S in (('A',a), ('B',b), ('C',c)): if

[Tutor] Shut up and deal!

2005-08-08 Thread Greg Lindstrom
I found the conversation of dealing cards interesting, so I took a few minutes (about 20 while I waited for a production run to finish) and came up with the following Dealer class. I come with a long history of coding in C/C++ and have been told my code looks like it (notice, in particular the

[Tutor] Building an SQL query

2005-06-02 Thread Greg Lindstrom
Hello- I am building a query to hit a Postgres (8.0.1) database from Python (4.2.1) on Linux.Here's how I've been doing it for the past year or so: data = ""> data['start_date'] = '2005-6-2' data['last_name'] = 'Johnson' query = ''' SELECT * FROM my_table WHERE date = '%(start_date)s' AND

Re: [Tutor] Building an SQL query

2005-06-02 Thread Greg Lindstrom
On 6/2/05, Alan G [EMAIL PROTECTED] wrote: Its a really bad idea to use SELECT * FROM in production code.There are two main reasons:1) If the database structure changes your code is likely to break since SELECT * does not normally guarantee anything about the order of fields returned, so if the

Re: [Tutor] Building an SQL query

2005-06-02 Thread Greg Lindstrom
Hmm, I dunno ADOpy but assume it somehow miraculously turns your dataset into a dictionary of some sort? How it guesses which order the SELECT will return the fields is a mystery to me, but maybe it hasknowledge of the Postgres hashing function or somesuch. Yeah. I used to do it by hand by

Re: [Tutor] Tutor Digest, Vol 16, Issue 7

2005-06-02 Thread Greg Lindstrom
data = "">data['start_date'] = '2005-6-2'data['last_name'] = 'Johnson'query = ''' SELECT *FROM my_table WHERE date = '%(start_date)s' AND last_name = '%(last_name)s % dataresults = my_database.Execute(query)First up. This is a bad idea. It may be ok now, as long as you have absolute

Re: [Tutor] For Loop Exercises

2005-05-31 Thread Greg Lindstrom
I finished the chapter which includes for loop, tuples, indexing and slicing. Can anyone suggest me 3 exercises to remind of the chapter? A great place to find all sorts of programs to write -- from very easy to complex -- is the programming contest archive on the useless python page

[Tutor] Python Resources

2005-05-13 Thread Greg Lindstrom
Hello- I have been asked to write an article for the IEEE IT Pro magazine dealing with using Python in the medical field. The editors asked for about half the article dealing with using Python and the other half giving a short tutorial. They also asked for three sidebars; I'm going with Tim