Suds and Complex Sequences

2013-09-17 Thread Greg Lindstrom
Hello Everyone -

I am trying to use Suds, the very fine library allowing me to use SOAP, to
query a service over the net.  Part of the data structure defined be the
WSDL calls for a sequence of SubscriberDataTypes (this application is used
to test an insurance companys' rating service).

(SubscriberDataType){
   SubscriberID = None
   SubscriberBirthDate = None
   Zip = None
   
   DependentData[] = 
 }

Which goes into

(MedicalRatingRequest){
   MessageHeader =
  (MessageHeaderType){
 MessageName = None
 MessageID = None
 
  }
   RequestHeader =
  (RequestHeaderType){
 RequestType =
(RequestTypeEnum){
   value = None
}
 
  }
   
   SubscriberData[] = 
 }

Note that the Subscriber Data is a sequence of SubscriberDataType.  I have
not been able to find any documentation showing me how to do this.  Does
anyone out there know how I can generate the request?

Thanks for your time,

Greg Lindstrom
-- 
https://mail.python.org/mailman/listinfo/python-list


Web Testing Frameworks

2013-02-12 Thread Greg Lindstrom
Hello,

I'm not wanting to start anything here, but I am wanting to automate
testing of my Django-based websites.  A quick search on Google turns up a
number of packages and I would like to know if any stand out from the
others?  Our main sites are used to display a customer dashboard, so my
concerns are is the site up and assessable, are the proper navigational
tabs displayed and is the appropriate information presented when I fill out
a request.  My guess is that is pretty standard for testing a web site?

So,

1.  What framework(s) should I look at?
2.  Where can I get information/documentation/training on how to test a web
site?

Thanks!
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


Overlayong PDF Files

2012-04-26 Thread Greg Lindstrom
I would like to take an existing pdf file which has the image of a health
care claim and overlay the image with claim data (insured name, address,
procedures, etc.).  I'm pretty good with reportlab -- in fact, I've created
a form close to the CMS 1500 (with NPI), but it's not close enough for
scanning.  I'd like to read in the "official" form and add my data.  Is
this possible?

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


Python 3.2 and MS Outlook

2012-03-07 Thread Greg Lindstrom
Is there documentation showing how to read from a Microsoft Outlook server
using Python 3.2.  I've done it with 2.x, but can't find anything to help
me with 3.2.

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


Overlaying PDF with data

2011-12-22 Thread Greg Lindstrom
Hello,

I would like to take an existing pdf form and overlay text "on top" (name,
address, etc.).  I'm looking at ReportLab v2.5 and see their "PLATYPUS"
library might be what I crave, but would like to know if there's a more
obvious way to do this?  I'm working with health care forms which are quite
complex (over 150 fields to potentially populate)  and would like to do it
as painlessly as possible.  I'm running Python 2.7 on Windows.

Thanks for any advice you may have,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


Dictionary from String?

2011-05-08 Thread Greg Lindstrom
Is it possible to create a dictionary from a string value?  Something along
these lines (but that works):

>>> mystring = "{'name':'greg','hatsize':'7 5/8'}"
>>> mystring
"{'name':'greg','hatsize':'7 5/8'}"
>>> dict(mystring)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: dictionary update sequence element #0 has length 1; 2 is
required
>>>

I would like to return an undetermined (at call time) number of fields from
a postgres database (only 1 record) for a given request.  My thought is that
I could build a dictionary in the form of a string, return the string and
then convert the string value to a dictionary.  I can do that now, but I
have to parse the string and then build the dictionary.  Any thoughts or
help you could provide would be appreciated.

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


Dictionaries inside out

2010-11-26 Thread Greg Lindstrom
I am working on a project where I'm using dictionaries to hold the
translations to codes (i.e., {'1':'Cheddar','2':'Ice
Hockey','IL':'Thermostat Broken'}).  The bulk of the application requires me
to translate codes to their meaning, but it would be nice to be able to
translate a meaning back to the original code as well.  This seems to me
like it must be a common situation that has been addresses/solved by those
smarter than me.  Is there, dare I say, a design pattern for this problem?
Is there a better way of approaching it other than making a set of
dictionaries which "mirror" the originals?  FWIW, I have approximately 50
tables ranging from 2 entries to over 100.

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


PyCon 2011 Call For Tutorials

2010-10-04 Thread Greg Lindstrom
PyCon 2011 will be held March 9th through the 17th, 2011 in Atlanta,
Georgia. (Home of some of the best southern food you can possibly find on
Earth!) The PyCon conference days will be March 11-13, preceded by two
tutorial days (March 9-10), and followed by four days of development sprints
(March 14-17).

The call for tutorial proposals is open until November 1 and we want to
encourage you to submit a class idea!  Teachers are paid for their efforts
and it's a great opportunity for you to teach to a room full of people who
have paid to hear what you have to say?

Tutorials are 3-hour long classes (with a refreshment break) taught be some
of the leading minds in the Python community.  Classes range from beginner
(Introduction to Python) to advanced (OOP, Data Storage and Optimization)
and everything in between.  If you don't feel up to teaching a class, you
can always encourage your favorite mentor to teach it!  Anything Python may
be proposed for a class and a variety of topics is always presented but we
can't offer what isn't proposed!
Get more information at http://us.pycon.org/2011/about/ under the "Tutorial
Days" section.  Submit your idea on the site under the "Speakers" tab.
That's it!  You could be teaching a class at PyCon next March.  See you in
Atlanta!
-- 
http://mail.python.org/mailman/listinfo/python-list


Distributing Packages

2010-09-23 Thread Greg Lindstrom
I am not intending to start anything, here, but would like to know if any
consensus has been reached in how to distribute Python modules.
Specifically, I'd like to use something to install packages on various
machines in our enterprise (mostly Linux, but some windows boxes, too).
I've read up on distutils, but also recall hearing about Python eggs and
sitting in on a talk or two at PyCon (US) that seemed to indicate that the
community was in a state of flux over how to distribute things.  What are
the current thoughts on the subject?

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


# of Months between two dates

2010-08-08 Thread Greg Lindstrom
I work for a company that processes claims for the health care industry
(Novasys Health, recently purchased by Centene Corp).  My current assignment
has me writing a routine to compute insurance premiums.  One of the
requirements is to determine how many months a policy has been in effect.
The datetime module will give me the number of days but, with months having
different lengths, that does not do me much good.  I've looked in the
calendar library but didn't see anything there, either.

I've written a function to return the months between date1 and date2 but I'd
like to know if anyone is aware of anything in the standard library to do
the same?  For bonus points, does anyone know if postgres can do the same
(we use a lot of date/time funcitons in postgres, already, but didn't see
this problem addressed).

On a side note; since I'm dealing with money (USD), I decided to use the
decimal module for all computations.  It's not a big difference -- unless
you've seen the movie "Office Space" :-) -- but it sure is nice.  Especially
being able to easily round values to the nearest cent.  You just have to
love the standard library.

Thanks for your help,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


Looking for an Application

2010-03-01 Thread Greg Lindstrom
A few months ago there was a post dealing with an application that would 
power scripts based on graphical snippets of the screen.  Essentially, 
the script would "look" for a match with what you pasted into it.  I 
don't recall the name of the application, but would like to try it.  
Does anyone remember what it is?


Thanks,
--greg


--
http://mail.python.org/mailman/listinfo/python-list


PyCon 2011 - Call for Tutorial Volunteers

2010-02-26 Thread Greg Lindstrom
PyCon 2010 is complete and plans for PyCon 2011 in Atlanta have already
begun!  The main conference will once again be proceeded by two days of
tutorials.  There was quite a bit of feedback from students and teachers
this year that we want to incorporate in next years classes.  In order to do
this, more people need to get involved; why not you?  You do not need to
have any experience in organizing a national conference, just the desire to
help out.  There is plenty to do from tasks that take a couple of hours to
others that span months and you will get help with everything.  The areas we
will be working on are:

* Proposals -  help with the call for tutorial proposals and selection of
classes
* Room Assignments - help get the selected tutorials assigned to classrooms
and monitor attendance numbers
* Notes - work with teachers to get class notes printed and distributed
* Program Guide - work with conference organizers to get tutorial
information in the conference guide
* Feedback - Work to get meaningful feedback from students and teachers (so
PyCon 2012 is even better!)
* Payments - collect information so our teachers get paid
* Runner - On tutorial days at the conference, make yourself available to do
whatever needs to be done.

It's a lot of work -- and a lot of fun-- to put on tutorials for PyCon each
year.  You won't get paid, but you will get one of the snappy "staff" tee
shirts when you attend PyCon and you get to work with an incredibly
dedicated group of volunteers.

Interested?  Please drop a note at pycon-tutori...@python.org and let us
know.

Thanks,

Greg Lindstrom
Tutorial Coordinator, PyCon 2011 (Atlanta)
-- 
http://mail.python.org/mailman/listinfo/python-list


PyCon 2010 US - Call For Tutorials Ending Soon

2009-10-13 Thread Greg Lindstrom
The period to submit proposals to teach a tutorial at PyCon 2010 US ends on
Sunday, October 18th.  There is still time for you to get a proposal on your
favorite Python topic and teach a 3-hour class (with breaks and
refreshments) to your colleagues on the Wednesday or Thursday before the
conference ("Tutorial Days").

An example proposal (and a blank template) can be found at
http://us.pycon.org/2010/tutorials/proposals/ .

Thanks!

Greg Lindstrom
-- 
http://mail.python.org/mailman/listinfo/python-list


PyCon 2010 (Atlanta) Call For Tutorials

2009-09-17 Thread Greg Lindstrom
The period to submit proposals for PyCon 2010 in Atlanta is open until
October 18th.  Tutorial are held the two days prior to the main conference
and feature 3-hour classes led by fellow Python developers and
enthusiasts *just
like you*.  Any topic relating to Python is allowed and the organizers
encourage anyone who wants to share their knowledge to submit their ideas
for consideration.  Perennial classes include "Introduction to Python" for
various audiences (beginners, programmers, those new to Django and web
frameworks, etc.), intermediate Python (standard library, module/packages,
objects, etc.) and more specialized topics (SciPy/Matlab, unit and web
testing, optimization) as well as general topics such as "Best Practices"
for web programming, objects, libraries.  There is even interest in a class
to show how to organize, design, write and distribute an Open Source
project.  Any topic 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 Lindstrom
Tutorial Coordinator, PyCon 2010 (Atlanta)
-- 
http://mail.python.org/mailman/listinfo/python-list


Managing a Sub-Process

2009-09-06 Thread Greg Lindstrom
I am using Python 2.6 on Gentoo Linux and have a routine that gets/puts
files to other servers via sftp.  We have an ongoing problem with various
sftp processes "hanging"; that is, it no longer transfers any data but does
not shutdown/timeout.  I would like to design a routine that will kick off
the sftp (or whatever) module and then monitor it.  If the sub-process hangs
(or fails any other criteria we define) it could be killed in the main
routine and an error could be logged.

How can I do this?  I've looked into the subprocess module as well as the
Twisted package but I thought that before I launch onto building my own
system to accomplish this I'd ask if it's been done before and, if so, how?
What are the isues I need to worry about?

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


PyCon 2010 - Call for Tutorials

2009-09-05 Thread Greg Lindstrom
The Tutorial Committee for PyCon 2010 in Atlanta is now accepting proposals
for classes.  This year will feature 2 days of classes prior to the
"official" conference.  These classes are 3-hour long sessions concentrating
on specific Python packages or techniques and are taught by some of the
smartest cookies in the Python Universe.  Anything Python may be submitted
for consideration but there are a limited number of sessions to be filled.
Topics taught or requested over the past two years include:

* Python 101 - An introduction to programming Python, either for complete
beginners or programmers experienced in other languages.

* Python 201 - There has been repeated requests for classes covering
"intermediate" topics; data structures, database techniques,
classes/objects, standard library, eggs, etc.

* Python 401 - Classes covering "advanced" topics;
multi-processing/concurrency, iterators/generators, OOP, etc.

* Web Topics - Frameworks, web testing, design, security, scraping.

* Scientific Python - MatLab, SciPy

* Testing - Frameworks, methods

* GUI - Dabo, wxPython, TkInter, etc.

*  More: XML, GIS, SQLAlchemy, Jython, System Administration

More information, including a sample proposal and blank template, are at
http://us.pycon.org/2010/tutorials/proposals/.

Questions?  Email us at pycon-tutori...@python.org.

Greg Lindstrom
-- 
http://mail.python.org/mailman/listinfo/python-list


PyCon 2010 - Call for Tutorials

2009-08-25 Thread Greg Lindstrom
The period to submit proposals for PyCon 2010 in Atlanta, Georgia (USA) is
now open and will close on October 18.  Tutorials are 3-hour long classes on
a specific Python technique, package or technology and are taught by members
of the Python community.  If you have knowledge in a particular topic and
would like to be considered to teach a class we invite you to submit a
proposal outlining the material you would like to cover.  Once we receive
your proposal, we will "score" it based on content and then select 24
classes (subject to change) for presentation.

Class instructors will be paid $1000.00 per class.  If a class has more than
one teacher, the fee will be split between them.

Interested?  Click on over to the Tutorial Proposal
Page<http://us.pycon.org/2010/tutorials/proposals/>to see more
details, examples of classes that have been requested in the
past (though you are free to submit a proposal on anything Python), an
example proposal and an empty template to help you prepare your own
proposal.  Once complete, email your proposal to
pycon-tutori...@python.orgso we can get it out to the evaluation
committee and get you on your way to
being a PyCon

Questions?  You can contact us at the PyCon Email
Listand we will get back with you.

We look forward to hearing from you!

Greg Lindstrom
Tutorial Coordinator
PyCon 2010 (Atlanta)
-- 
http://mail.python.org/mailman/listinfo/python-list


Creating xml

2009-07-23 Thread Greg Lindstrom
It's been a while since I've played with XML using Python but I've been
asked to create XML using data from our postgres database.  Currently we are
generating XML directly from the database using a set of stored procedures
but it is too slow (yes, I have numbers).  I have been asked to create a
routine to generate the XML to see if it will be faster that the sprocs
(which I think it will be, based on other routines we have running).  But I
digress...

Using my favorite search engine I see that there is a lot of material on
Python and XML.  At the risk of starting something (which is not my
intention), what are my options if I want to create xml?  Ceratinly writing
my own routine is an option, but I bet there are better ones :-)

How about if I need/want to parse or process an XML file?

Thanks!

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list


PyCon 2009 (US) - Call for tutorials Extended to 11/3

2008-10-30 Thread Greg Lindstrom
We have had requests to extend the deadline for submitting Tutorial
Proposals for PyCon 2009 (US) through the weekend and are willing to do so.
We will accept tutorial proposals through Monday, November 3.

--greg

==

The period for submitting tutorial proposals for Pycon 2009 (US) is open and
will continue through Monday, November 3rd. This year features two
"pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday
March 26 in Chicago. This allows for more classes than ever.

Tutorials are 3-hours long on a specific topic of your choice. Last year we
featured classes on Learning Python, Web Development, Scientific Computing,
and many more. Class size varied from 10 to over 60 students. The extended
time spent in class allows teachers to cover a lot of material while
allowing for interaction with students.

The full Call for Tutorial Proposals, including submission details, an
example proposal as well as a template, is available at <
http://us.pycon.org/2009/tutorials/proposals/>.

Tutorial selections will be announced 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)
--
http://mail.python.org/mailman/listinfo/python-list


PyCon 2009 - Call for tutorials nearing the end

2008-10-29 Thread Greg Lindstrom
The period for submitting tutorial proposals for Pycon 2009 (US) is open and
will continue through Friday, October 31th. This year features two
"pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday
March 26 in Chicago. This allows for more classes than ever.

Tutorials are 3-hours long on a specific topic of your choice. Last year we
featured classes on Learning Python, Web Development, Scientific Computing,
and many more (there was particular interest in "Intermediate" level
classes).  Class size varied from 10 to over 60 students. The extended time
spent in class allows teachers to cover a lot of material while
allowing forinteraction with students.

The full Call for Tutorial Proposals, including submission details, an
example proposal as well as a template, is available at <
http://us.pycon.org/2009/tutorials/proposals/>.

Tutorial selections will be announced 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)
--
http://mail.python.org/mailman/listinfo/python-list


Using LDAP

2008-10-20 Thread Greg Lindstrom
I am attempting to use python-ldap to connect to our company ldap server.  I
have downloaded and installed python-ldap 2.3.2 on my Ubuntu system and have
been working through the "LDAP Programming with Python" documentation.  I am
confused because the documentation states that "After an LDAP object is
created and before any other operations can be attempted over the
connection, a bind operation must be performed" (p7), but in the example in
section 1.1.5, it shows using the ldap.initialize() statement then a
search_s() statement; with no bind().  I've keep getting a "Can't contact
LDAP server" error when running in iPython, but I can hit the LDAP server
using PHP.

Do I need to run a bind statement of some sort after initialize()?

Thanks,
--greg
--
http://mail.python.org/mailman/listinfo/python-list


PyCon 2009 (US) - Call for Tutorials

2008-10-18 Thread Greg Lindstrom
The period for submitting tutorial proposals for Pycon 2009 (US) is open and
will continue through Friday, October 31th. This year features two
"pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday
March 26 in Chicago. This allows for more classes than ever.

Tutorials are 3-hours long on a specific topic of your choice. Last year we
featured classes on Learning Python, Web Development, Scientific Computing,
and many more. Class size varied from 10 to over 60 students. The extended
time spent in class allows teachers to cover a lot of material while
allowing for interaction with students.

The full Call for Tutorial Proposals, including submission details, an
example proposal as well as a template, is available at <http://us.pycon
.org/2009/tutorials/proposals/>.

Tutorial selections will be announced 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)
--
http://mail.python.org/mailman/listinfo/python-list


PyCon 2009 (US) - Call for Tutorials

2008-10-01 Thread Greg Lindstrom
The period for submitting tutorial proposals for Pycon 2009 (US) is open and
will continue through Friday, October 31th. This year features two
"pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday
March 26 in Chicago. This allows for more classes than ever.

Tutorials are 3-hours long on a specific topic of your choice. Last year we
featured classes on Learning Python, Web Development, Scientific Computing,
and many more. Class size varied from 10 to over 60 students. The extended
time spent in class allows teachers to cover a lot of material while
allowing for interaction with students.

The full Call for Tutorial Proposals, including submission details, an
example proposal as well as a template, is available at <
http://us.pycon.org/2009/tutorials/proposals/>.

Tutorial selections will be announced 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)
--
http://mail.python.org/mailman/listinfo/python-list

pyArkansas Set for October 4th

2008-09-22 Thread Greg Lindstrom
 This is a reminder of the upcoming pyArkansas one-day Python conference
being held on the campus of the University of Central Arkansas on Sat Oct 4,
2008. The schedule is pretty much set (
http://pycamp.python.org/Arkansas/Schedule) and has something for anyone
interested in Python, from intro workshops to advanced topics. Jeff Rush and
Noah Gift are scheduled to present workshops and talks while Dr. Bernard
Chen (UCA Faculty) will teach a 3-hour class on "Python for the Absolute
Beginner". Eggs, pyGame, standard library, Eclipse and OLPC are some of the
other talks scheduled.

This is a *FREE* event (we have GREAT sponsors), so all you need to bring is
yourself. We have over 45 people -- from 4 States -- registered and tons of
great swag and giveaways lined up.

See our wiki (http://pycamp.python.org/Arkansas/HomePage) for more details
and registration info.

Greg Lindstrom
Python Artists of Arkansas (pyAR^2)
--
http://mail.python.org/mailman/listinfo/python-list

PyCon 2009 (US) - Call for Tutorials

2008-09-18 Thread Greg Lindstrom
*Pycon 2009 (US) – Call for Tutorials*

The period for submitting tutorial proposals for Pycon 2009 (US) is now open
and will continue through Friday, October 31th. This year features two
"pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday
March 26 in Chicago. This allows for more classes than ever.

Tutorials are 3-hours long on a specific topic of your choice. Last year we
featured classes on Learning Python, Web Development, Scientific Computing,
and many more. Class size varied from 10 to over 60 students. The extended
time spent in class allows teachers to cover a lot of material while
allowing for interaction with students.

The full Call for Tutorial Proposals, including submission details, an
example proposal as well as a template, is available at <
http://us.pycon.org/2009/tutorials/proposals/>.


Tutorial selections will be announced in early December 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
--
http://mail.python.org/mailman/listinfo/python-list

Python and Open Office

2008-09-10 Thread Greg Lindstrom
Hello,

I would like to create and manipulate Open Office documents using Python.  I
have found then UNO Python page and odfpy modules which seem to be exactly
what I need.  The odfpy manual is, to me, a confusing list of objects and
methods (it's an impressive list!), but does not have much in the way of how
to use them.  For example, I can open a spreadsheet and create new pages
(there's a nice example near the back of the manual) but I can't figure out
how to open an existing spreadsheet and list the names of the individual
sheets ("tabs").

I have written an application that access Microsoft Excel and creates
reports for work, but would like to create an Open Source version using Open
Office and release it to the community (and maybe get a talk at PyCon :-).

Is there someone here who can help me out, or is there an appropriate
mailing list for me to join?

Thanks

--greg
--
http://mail.python.org/mailman/listinfo/python-list

pyArkansas on October 4th

2008-09-02 Thread Greg Lindstrom
We are pleased to announce that pyArkansas will be held on the campus of
University of Central Arkansas  (www.uca.edu) on October 4th.  Scheduled
classes in the morning include Python 101 taught by Dr. Bernard Chen
(incoming faculty at UCA but having taught the course at Georgia State
University), "Python 201" taught by Jeff Rush (Dallas Python Users Group)
and Python for Unix/Linux Administration (Noah Gift teaching on his -- and
Jeremy Jones' -- newly released OReilly title).  The afternoon features
talks and a panel discussion along with lots of great give aways and swag.

Due to limitations of physical space we must close registration at 100
participants (in honor of my first OS, SunOS, we may go to 110).  Check out
our wiki at http://pycamp.python.org/Arkansas/HomePage.  There's no
registration fee, so if you're in the area stop on by...we are looking
forward to a great day.

Greg Lindstrom
Python Artists of Arkansas (PyAR^2)
--
http://mail.python.org/mailman/listinfo/python-list

Renaming Excel Spreadsheets

2008-08-26 Thread Greg Lindstrom
Hello,

I am working with Python to create Excel spreadsheets and have run into a
couple of problems I hope you can help me with.

First...are there any bindings/libraries into Open Office?

Now, back to Excel.

--> Does anyone know a way to create N worksheets?  By default, 3 are
created, but I would like more.

--> Is it possible to rename a worksheet inside of the workbook (change
"Sheet1" to "July 08", for example).

I've been working with Mark Hammond's book on Windows programming with
Python, but these have me stumped.

Better yet, an Open Source reporting system (ala Crystal Reports) would keep
me from having to write this.  I've looked at Jasper and DataVision;

Thanks,
--greg
--
http://mail.python.org/mailman/listinfo/python-list

Re: Very good Python Book. Free download : Beginning Python: From Novice to Professional

2008-04-09 Thread Greg Lindstrom
> From: hassan nikbakhsh <[EMAIL PROTECTED]>
> Subject: Very good Python Book. Free download : Beginning Python: From
> Novice to Professional
> can i have a free bownload of this book
> many thanks
>

Yes, it's a very good book.  Magnus Lie Hetland spent a lot of time putting
the book together; why not *buy* it (~$29.00 on Amazon) to help support the
effort?  It's not that much and a great way to say "thanks".
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Learning curve for new database program with Python?

2008-04-07 Thread Greg Lindstrom
On Sun, Apr 6, 2008 at 2:31 AM, John Nagle <[EMAIL PROTECTED]> wrote:
>
> Basic SQL isn't that hard.  Learn CREATE, SELECT, INSERT,
>  UPDATE, and DELETE syntax.  That's enough for most simple
>  applications.

And then learn more advanced SQL: joins, nested selects, pivot tables and
stored procedures.  You can do a lot of processing "inside" the database
which cuts down on data running over the wire.

SQL is one of the areas I wish I had mastered (much) earlier in my career
--greg.
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: What motivates all unpaid volunteers at Pycon?

2008-04-01 Thread Greg Lindstrom
> >> There really isn't any simple answer.  Most people seem to be
> >> motivated to help out their communities,
> >
> > I still think all this unselfishness is noteworthy
> > and curious.
>
>
>Assuming that people get nothing back by participating in a
> community, yes, it would be curious. My experience, though, is that I
> get a lot more out of it than I could ever contribute. IOW, it's a
> great example of synergy.
>
> -- Ed Leafe


I attended my first PyCon in D.C. a few years back.  The next year I
volunteered as a session chair because I wanted one of the groovy black
"staff" shirts.  Last year I signed up as the tutorial coordinator because I
was told there was a need for people to step up and I felt strongly that as
part of the community I have an obligation to give back (the same reason I
was a volunteer firefighter for 5 years).

I had no idea how much work it would be to put together 1 day of the
conference; and just the talks at that (there's the technical aspect, food,
registration, etc., that others handled).  Once you become part of the
community that puts the conference together and see how much passion these
people put into their tasks it's hard to walk away, at least for me.  I've
signed up for tutorials again for 2009 and hope to bring 3 or 4 other
volunteers along for the ride.

What do I get out of it?  Sure, I got another groovy tee shirt, but I also
saw over 600 people taking classes on Tutorial Thursday.  I got to meet some
very smart cookies and saw a lot of Python that I had never seen before.
Not everything went as planned, and a few things went poorly but, overall,
things went pretty well.  We are taking all off the feedback into account
and are already looking at next year.

So, if you're still reading this, why don't *YOU* help out, too?  You can
help out a little or you can help out a lot.  There are highly technical
issues that need addressing (see "PyCon Tech") and other tasks that don't
require programming at all but are just as important (food, swag, etc.).
Click on over to http://www.python.org/community/pycon/ and introduce
yourself.  You'll get a lot more than a groovy tee shirt out of it!

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Pycon disappointment

2008-03-20 Thread Greg Lindstrom
,,,... Let's see some code! Let's see

> stuff working (and sometimes crashing!), and how changes affect the
> results. When I've presented at PyCon and other conferences, that's
> the part that I spend the most time on: preparing demonstrations. It's
> not easy to do; certainly much more difficult than creating a slide
> that sums up what the demo does. But it makes for a much more
> interesting session!
>
> -- Ed Leafe


Here, here!! (or is it hear, hear??).  I remember Ed's talk on Dabo a couple
of years ago (or was it last year?) because he was writing code while up in
front of the room.  "Here's how to do this" and then he would tweak various
aspects and show the results.  I can appreciate the need for slides, but I
also like seeing "code in action".

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

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.  I
would like to point out the tutorial sessions being offered; all the way
from "Python for the Absolute Beginner", to advanced courses on optimizing
Python programs (with 27 more classes in between).  Click on over to
http://us.pycon.org/2008/about/  for information about the conference.  Here
is a list of the classes being offered along with the instructors scheduled
to present the classes (click to get more information on a session).  It's a
great way to learn more Python.

*Morning Session* (9:00am-12:20pm)

   - Eggs and Buildout Deployment in
Python(Jeff Rush)
   - Python 101 for
Programmers(Steve
Holden)
   - Introduction to
SQLAlchemy(Jonathan
Ellis and Michael Bayer)
   - Python plotting with matplotlib and
pylab(John Hunter)
   - SWIG Master Class
(David Beazley)
   - Secrets of the Framework
Creators(Feihong
Hsu and Kumar McMillan)
   - Introduction to
NumPy(Travis Oliphant
and Eric Jones)
   - Making Small Software for Small People, Sugar/OLPC Coding by
Example(Mike C.
Fletcher)
   - Hands-on Python for the Absolute Beginner
I(Dr. Andrew
Harrington)

*Afternoon Session* (1:20pm-4:40pm)

   - Python 101
(Stuart
Williams)
   - Getting Started with Pylons/TurboGears2 & WSGI: Modern Python Web
   Development  (Mark
   Ramm and Ben Bangert)
   - Advanced 
SQLAlchemy(Jonathan
Ellis and Michael Bayer)
   - Django Tutorial
(Jacob Kaplan-Moss)
   - wxPython I: Intro to GUI Programming with wxPython and
MVC(David
Goodger)
   - Faster Python Programs through Optimization and Extensions
I(Mike
Müller)
   - Tools for Scientific Computing in
Python(Travis
Oliphant and Eric Jones)
   - Generator Tricks for Systems
Programmers(David
Beazley)
   - Basic Python for Java
Programmers(Alex
Martelli and Anna Ravenscroft)
   - Hands-on Python for the Absolute Beginner
II(Dr.
Andrew Harrington)

*Evening Session* (6:10pm-9:30pm)

   - Python 102
(Stuart
Williams)
   - Mastering Pylons and TurboGears 2: Moving Beyond the
Basics.(Mark Ramm,
Ben Bangert)
   - Practical Applications of Agile (Web) Testing
Tools(C. Titus
Brown and Grig Gheorghiu)
   - Django Code Lab
(Jacob Kaplan-Moss,
Adrian Holovaty and James Bennett)
   - wxPython II: Advanced GUI Programming with wxPython and
MVC(David
Goodger)
   - Faster Python Programs through Optimization and Extensions
II(Mike
Müller)
   - Automating Windows Applications with
win32com(Roy H.
Han)
   - Internet Programming with
Python(Wesley
J. Chun)
   - Tail Wags Fangs: What Python Developers Should Know About
Plone(Rob Lineberger)
   - Pygame: Modern game
development(Noah
Kantrowitz and Marc Destefano)
-- 
http://mail.python.org/mailman/listinfo/python-list

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 conference and have 29
tutorial sessions scheduled on Thursday in three sessions; morning,
afternoon, and evening.  There is an extra fee to attend a tutorial, but the
sessions are 3 hours long (with a break) and are taught by some of the
smartest cookies in the Python community.  Pop on over to
http://us.pycon.org/2008/about/ for more information

Here's a list of the sessions currently offered (we may cancel a session if
there are fewer than 10 people registered, but that doesn't happen very
often). In particular, note that there are 4 different introduction to
Python tutorials aimed at different audiences.

*Morning Session* (9:00am-12:20pm)

   - Eggs and Buildout Deployment in
Python(Jeff Rush)
   - Python 101 for
Programmers(Steve
Holden)
   - Introduction to
SQLAlchemy(Jonathan
Ellis and and Michael Baye)
   - Python plotting with matplotlib and
pylab(John Hunter)
   - SWIG Master Class
(David Beazley)
   - Secrets of the Framework
Creators(Feihong
Hsu)
   - Introduction to
NumPy(Travis Oliphant
and Eric Jones)
   - Making Small Software for Small People, Sugar/OLPC Coding by
Example(Mike C.
Fletcher)
   - Hands-on Python for the Absolute Beginner
I(Dr. Andrew
Harrington)

*Afternoon Session* (1:20pm-4:40pm)

   - Python 101
(Stuart
Williams)
   - Getting Started with Pylons/TurboGears2 & WSGI: Modern Python Web
   Development  (Mark
   Ramm and Ben Bangert)
   - Advanced 
SQLAlchemy(Jonathan
Ellis and and Michael Baye)
   - Django Tutorial
(Jacob Kaplan-Moss)
   - wxPython I: Intro to GUI Programming with wxPython and
MVC(David
Goodger)
   - Faster Python Programs through Optimization and Extensions
I(Mike
Müller)
   - Tools for Scientific Computing in
Python(Travis
Oliphant and Eric Jones)
   - Generator Tricks for Systems
Programmers(David
Beazley)
   - Basic Python for Java
Programmers(Alex
Martelli and Anna Ravenscroft)
   - Hands-on Python for the Absolute Beginner
II(Dr.
Andrew Harrington)

*Evening Session* (6:10pm-9:30pm)

   - Python 102
(Stuart
Williams)
   - Mastering Pylons and TurboGears 2: Moving Beyond the
Basics.(Mark Ramm,
Ben Bangert)
   - Practical Applications of Agile (Web) Testing
Tools(C. Titus
Brown and Grig Gheorghiu)
   - Django Code Lab
(Jacob Kaplan-Moss,
Adrian Holovaty and James Bennett)
   - wxPython II: Advanced GUI Programming with wxPython and
MVC(David
Goodger)
   - Faster Python Programs through Optimization and Extensions
II(Mike
Müller)
   - Automating Windows Applications with
win32com(Roy H.
Han)
   - Internet Programming with
Python(Wesley
J. Chun)
   - Tail Wags Fangs: What Python Developers Should Know About
Plone(Rob Lineberger)
   - Pygame: Modern game
development(Noah
Kantrowitz and Marc Destefano)
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Fractions on musical notation

2007-12-17 Thread Greg Lindstrom
> > As a time signature 1/4 has no sense,


You've never played and Grainger, have you? :-)
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Determining Dependencies

2007-12-06 Thread Greg Lindstrom
Hello All-

I have a Python routine consisting of 75 or more files (most files house 1
object) and would like to know if there is an automated way to search though
the files and determine all of the (non-standard lib) modules required to
run the routine.  For example, looking in my base class I can see that I
need cx_Oracle and odbc, but there are many files to go through which
increases the chance for errors.

The flip side of this is that the code has gone through many revisions and I
would like to know if all of the modules being brought in are actually being
used in a given file.  If I'm not using it I don't want to bring it in.

Worst case is we go though each file manually.  I was just curious if there
is a better way.

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: "Python" is not a good name, should rename to "Athon"

2007-11-30 Thread Greg Lindstrom
>
> > In Athon, the first letter "A" could pronounce as [ e ] .
>
> For English speakers that pronunciation is just plain wrong.
>

Going back to my shell scripting days, I nominate "nothyP"  as the new name.
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

New Python User Group (Arkansas, USA)

2007-11-09 Thread Greg Lindstrom
We are pleased to announce a Python User Group is forming in Arkansas
(USA).  The Python ARtists of ARkansas, or PyAR^2 is being created to
promote the use of all things Python in the Natural State.  While our
initial intentions are to concentrate on education, we are open to all
ideas.

If you live in or near Arkansas, we invite you to join our mailing list at
http://mail.python.org/mailman/listinfo/pyar2 and look for meetings to start
early next year.

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

PyCon 2008 - Call for Tutorials

2007-11-09 Thread Greg Lindstrom
Still thinking of presenting a tutorial at PyCon 2008 in Chicago?  "Tutorial
Day" is March 13th offering 1/2 day classes on just about any topic Python.
It's a great way to help others in the community learn more about Python and
you get paid ($1000.00 cash money + conference registration; not a bad
gig!).  We have a number of proposals already but want more ideas.  The more
topics we can offer the better the conference will be for everyone.

   - Testing
   - "Intermediate" Python
   - Working with Databases
   - Documentation
   - Object Oriented Python
   - Web Development
   - Anything Else (just about)

Anything is up for consideration.  Pop on over to
http://us.pycon.org/2008/tutorials/proposals/  for more information or
submit your idea to [EMAIL PROTECTED]

Thanks!

Greg Lindstrom
Tutorial Coordinator, PyCon 2008 (Chicago)
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python good for data mining?

2007-11-05 Thread Greg Lindstrom
> -- Forwarded message --
> From: "D.Hering" <[EMAIL PROTECTED]>
> To: python-list@python.org
> Date: Sun, 04 Nov 2007 19:42:16 -0800
> Subject: Re: Python good for data mining?
> On Nov 3, 9:02 pm, Jens <[EMAIL PROTECTED]> wrote:
> > I'm starting a project indatamining, and I'm considering Python and
> > Java as possible platforms.
> >
> > I'm conserned by performance. Most benchmarks report that Java is
> > about 10-15 times faster than Python, and my own experiments confirms
> > this. I could imagine this to become a problem for very large
> > datasets.




>
> > I really like Python for a number of reasons, and would like to avoid
> > Java.


I've been working with databases -- many in the terabyte size -- for over 20
years and my advice to you is to learn how to use SQL to do most of the work
for you.  There is (almost) nothing you can't do with a good database (we
use Oracle and Postgres, but I hear that MySQL is good, too).  We have over
100 stored procedures and some of our queries are a bit long; some with over
30 JOINS, but our queries are fast enough.  We even generate XML and EDI-X12
directly from the database via stored procedures.

I used to pull as much as I could back from the database and them manipulate
it with C using abstract data types and record layouts with lots of
pointers.  Now I use Python to access the base and let the database do most
of the heavy lifting.  Life is good.

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

PyCon 2008 - Tutorial HowTo

2007-10-31 Thread Greg Lindstrom
Thinking about presenting a tutorial at PyCon 2008?  Here's a link with
everything you would ever want to know.

http://us.pycon.org/2008/tutorials/proposals/


PyCon simply would not exist without volunteers like YOU.  Get involved
today!

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

PyCon 2008 - Call for Tutorials

2007-10-31 Thread Greg Lindstrom
PyCon 2008 is being held in Chicago this year. The general conference is
March 14-16 with the proceeding day, March 13th, being the traditional
"tutorial day".  We have had a lot of input on topics to cover and now we
are looking for qualified instructors to sign up to present the sessions.
Tutorials are 3 hours long (with break) and instructors are paid for their
effort ($1000.00 + conference registration).

PyCon is planned and run by volunteers just like you.  Why not get involved?

Pop on over to us.pycon.org  for conference
details or email us at [EMAIL PROTECTED] and let us know what you
would like to present as a tutorial.

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question

2007-09-18 Thread Greg Lindstrom
>
> I see.  It's so hard to imagine the world of python than from VB.
> It's like looking at VB is in 2 dimensions, where with Python, it's
> more 3D.  The code is so simple, yet it's hard for me to envision how
> to do something so simple.  I guess it's because the rules or the way
> of looking at things in Python, things can be stripped down to the
> bare bones and in so many ways.  Thanks.
>
> Kou


Indeed. A common phrase you will here around here is "reset your mind".
Python, like most languages, has it's own way of looking at the world.  You
may want to look at the tutors list, too ([EMAIL PROTECTED]).  You'll like it
there (I do).

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Why 'class spam(object)' instead of class spam(Object)' ?7

2007-09-17 Thread Greg Lindstrom
>
> Does the user care whether an object is implemented in C?
>
> Colin W.
>
> You're damn right I care!  This is critical to just about everything I
write because...well..I meanwell.  I guess it isn't really all that
important.  Never mind.

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python and Cron

2007-09-07 Thread Greg Lindstrom
> "Shawn Milochik" <[EMAIL PROTECTED]>
> Could you send the output of "crontab -l" and the script you're running?
>
> It's probably an environment issue of some kind, but it's hard to say
> what blindly.



# run client pricing at 0215 (p) Monday-Friday
15 2 * * 1-5 cd /m01/edith/src && /usr/bin/python /m01/edith/src/driver.py
--paid-date yesterday --jobname professional >>
/m01/edith/stdout/ecomppo.stdout 2&>1

I've emailed parts of the script in another reply.

Thanks for your time,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python and Cron

2007-09-07 Thread Greg Lindstrom
> Can you post the Python script?


Not the whole thing; it's quite long.  But here's the relevant parts.  We're
using the ado database interface into postgres (that's what the
results.EOFis all about)

output_file = file(output_path, 'w')   # output_path =
/my_path/data/work/my_file.txt
while not results.EOF:
row = results.GetRowAssoc(upper=0)
output_file.write(row['data'])
results.MoveNext()
output_file.close()
debug('Total Bytes Written: %d' % total_bytes)

new_path = None
if total_bytes > 0:   new_path = output_path.replace('/work/', '/')
else: new_path = output_path.replace('/work/',
'/empty/')

debug('Original Path [%s]'%output_path)   # new_path =
/my_path/data/my_file.txt
debug(' New Path [%s]'%new_path)  # new_path =
/my_path/data/empty/my_file.txt


The original code looked like this (worked from command line, failed with
cron)

os.rename(output_path, new_path)

But since that didn't work and I could create a new file, I tried this as a
work around

output_file = file(new_path, 'w')
for line in file(output_path):
output_file.write(line)
output_file.close()

The interesting/infuriating thing is that the second method also fails; that
is, the file is not moved to the data directory or the "empty"
directory...it remains in the "work" directory after the cron job
completes.  If I run the same routine from the command like (after su'ing to
the edith user) it runs and moves the file to the appropriate directory.

I am going to see if we can get the email routing set up (we run over 100
cron jobs daily so I'm not sure I want it on too long) to see if it will
tell me anything.


Thanks for your time and effort
--greg



What's the name of the original file, and what are you trying to rename
> it to? I'm wondering if you are deriving the new name from something,
> and that thing is failing from within the cronjob for some reason.
> Perhaps the new name contains a complete path in one of the cases but
> not in the other...
>
> Edith should be getting email (if email routing is set up correctly) if
> the job is failing or producing output. Specifically, perhaps she's
> getting Python tracebacks and not telling you... :)
>
>
>
> --
> pkm ~ http://paulmcnett.com
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Python and Cron

2007-09-07 Thread Greg Lindstrom
This may be more of a Linux question, but I'm hoping some of you may be able
to help me.

I have a python (2.4) routine running on Gentoo Linux.  It creates a file
and, after the file is complete, renames the file using the os.rename()
command.  When I run the file from the command line everything works great,
but when I schedule the job to run from the crontab file, the original file
is created and populated, but the rename fails.  I am using full paths for
both the original and destination file, and run the command line version
after I 'su' to the production account (named 'edith').  I am told by my
sysadmin that the cron jobs run as edith as well, so he does not think it is
a permission issue (he points out the original file is being created and
populated as expected...the rename fails)

Have any of you dealt with anything like this?  It really has me scratching
my head.

Thanks,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

PyCon 2008 - Call for Tutorial Topics

2007-09-01 Thread Greg Lindstrom
Hello All,

We are still soliciting ideas for tutorials to put on at PyCon in Chicago
next spring.  PyCon is all about our community; under the direction of the
PSF, planned, organized and run by volunteers just like you.  We are asking
for topics that you want to see covered on the tutorial day (the day
preceding the "official" conference).  There is an additional charge for
these classes but they are taught by instructors who really know their
topics.  The following ideas have been requested (nothing has been
scheduled, yet):

   - Testing strategies
   - Intermediate Python
   - Database
   - How to "think" in Python 3000
   - Using Cheeseshop
   - SOAP/.Net (Iron Python?)
   - Programming Contest

We need more ideas before we start putting things together.  What do *you*
want to see?  This is your chance to learn from the experts (or, maybe,
*you* would like to present a class).

Let me know what class would entice you to attend the tutorials.

Greg Lindstrom
Tutorial Coordinator, PyCon 2008
-- 
http://mail.python.org/mailman/listinfo/python-list

Complex Numbers

2007-08-31 Thread Greg Lindstrom
> -- Forwarded message --
> From: "Lamonte Harris" <[EMAIL PROTECTED]>
> To: python-list@python.org
> Date: Thu, 30 Aug 2007 20:11:14 -0500
> Subject: So what exactly is a complex number?
> Like in math where you put letters that represent numbers for place
> holders to try to find the answer type complex numbers?


Not quite.  Consider the square root of -1.  It's not real because you can't
square a real number and get a negative, so we define "i" (or, perhaps "j")
to be the square root of -1.  An imaginary number is of the form Ai, where A
is "real".  So 2i, -3.14i are imaginary.

Complex Numbers are of the form A + Bi  Where A and B are real (so they have
a "real" component and am "imaginary" component). So yo might see 2 + 3i,
etc.  You'll see them a lot in engineering.
-- 
http://mail.python.org/mailman/listinfo/python-list

PyCon 2008 - Call for Tutorial Ideas

2007-08-15 Thread Greg Lindstrom
It's hard to believe, but the planning for PyCon 2008 is underway.  PyCon,
an annual gathering of Python enthusiasts -- nearly 600 in Dallas last year
-- will be held in Chicago next March 14-16, with one full "pre-conference"
day, March 13, set aside for tutorials; classes given by Python honchos on
various topics.  These sessions last 3 hours (plus a break) and in general
are more detailed than the talks given during the actual conference.  Right
now, we need to know what YOU want to see covered in these sessions.
 Testing, GUI, web-apps, database, basic Python, advanced Python, objects,
anything and everything Python is on the table at this point.  We have to
narrow the field down to 10 or 15 and then find qualified presenters, so now
is the time to start gathering ideas.

What tutorials would you like to see offered?  Please response to:
[EMAIL PROTECTED]

Thanks,

Greg Lindstrom
Tutorial Coordinator, PyCon 2008
-- 
http://mail.python.org/mailman/listinfo/python-list

Creating Packages

2007-07-14 Thread Greg Lindstrom

Hello, All-

I have written a class that allows me to create and manipulate data segments
(the type one deals with when reading/writing  text files);  validating
fields, serialization, etc.  I would like to put this together as a module
and release it to the community while I expand on the features.

Is there a preferred way to do this?  I have read the docutil information
but recall hearing about Python Eggs being the new way to do such things.  I
have no intention of starting/continuing another debate (vim/emacs,
perl/python, take your pick), but would like information/help as to my next
step.

I believe this package would be helpful to those of us dealing with text
files.  How do I go about making it available?

Thanks,

--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Python business software?

2006-11-23 Thread Greg Lindstrom

Hello-

My wife runs a sewing/embroidery business and has asked me to write a system
to help her with her client database, inventory, and accounts
receivable/payable.  I've looked into using either PythonCard or Dabo (I
like both packages) but thought I ask the list if there is anything like
this out there already.  Tasks such as tracking clients are fairly routine
in business, so maybe there's something close that I could hack in order to
add details specific to our business.  We only have one computer right now,
so we don't *need* a web-based system but we plan on growing so it would be
an option.

Thanks for you help,
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Scaled Vector Graphics

2006-05-08 Thread Greg Lindstrom
I have been asked to write a routine to merge documents in pfd and svg formats into a single file (preferably pfd format).  Currently we send the pdf image to the printer followed by the svg image (a scan of a health care claim) but this is not a satisfactory solution.  We have as many as 3000 document pairs daily (another project in development will send all the information to out clients electronically via EDI X12 format).
Does Python offer support for working with svg files?  I've looked at the PIL and Reportlab packages and Googled around but have not found anything.  My other option is to snag one of the routines I've found that claim to convert scg to pdf and then merge them as pdf files.
Any help or suggestions you may supply will be greatly appreciated,Greg LindstromNovaSys HealthLittle Rock, Arkansas (USA)
-- 
http://mail.python.org/mailman/listinfo/python-list

Central Arkansas Python Users Group

2006-03-29 Thread Greg Lindstrom
At PyCon I met a handful of programmers from the Little Rock area.  Are there enough of us with any interest in forming a Central Arkansas Python Users Group?For others of you that have started user groups, how do you get the word out, especially in an area where Python coders are difficult to find (but I *know* they're out there!).
If you're interested, email me [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Gathering screen output

2006-03-08 Thread Greg Lindstrom
Hello-

I'm running Python 2.4 on windows xp "professional" and seem to recall
there is a way to kick off system command (or any external routine) and
then collect the screen output back into the calling python routine for
analysis.  I've look and googled but have come up lacking. 
Please tell me this is not a flashback to my days coding with another
"P" language...

Thanks for your help!
--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

PyDev/Eclipse Help

2006-02-20 Thread Greg Lindstrom
I am running Python 2.4 on Windows XP "Professional" and Eclipse 3.1.  I would like to take a look at PyDev on Eclipse and downloaded the PyDev (1.0.2?) via the Help->SotwareUpdates->FindAndInstall wizard.  Then then go to create a Python Project with File->New->Project and then select Pydev->Pydev Project and get an Error Dialog stating: "The selected wizard could not be started.  Reason: Plug-in 
org.python.pydev was unable to load class org.python.pydev.ui.wazards.project.PythonProjectWizard."  Can any of you wizards tell me what this means (well, OK, I *know* it means I can't load PythonProjectWizard, but you get my drift, right?).
Thanks for your help...see yo in Dallas!--greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: pain

2005-08-04 Thread Greg Lindstrom
Mage Wrote:
I would be surprised if there were more than five python jobs in my
country but have to look around.

I Reply:
It's not quite that bad in Arkansas (USA), but when I was hired to help
start a new IT department I insisted on using Python and my employer
agreed to try it.  I now have over 15,000 lines of code running in
production and the CEO of the company says he has "six or seven" more
projects for me to write (with huge cost saving potential for the
company).  We're running on GenToo Linux using a Postgres database and
PHP for our web development.  We've automated about 25% of our day to
day business and are looking to expand!  I've never had more fun
writing code, and I've been writing code for over 20 years.

Would it be possible to talk to your supervisor and convince them to
allow you to use Python?  Start small, with a little project.  When you
show them that Python "works" and that they will be able to understand
the code, I'm guessing they will let you do more.  Before you know it,
you're coding everything in Python.

Best of luck,
--greg

-- 
http://mail.python.org/mailman/listinfo/python-list


Knowing when a file completes.

2005-07-26 Thread Greg Lindstrom
I have an odd problem that I'm sure someone here can help me solve.  I 
am using Python 2.3 on a Linux box to process text files.  At one point 
in my automated process, I have to zip and ship the files over to a 
Windows server running a proprietary package to do some manipulation to 
the file.  Problem is that I need to know when the process completes 
processing the file.  Complicating matters is that this package names 
the output file using a guid type notation, so I don't have a clue as 
the output filename (though I do know the output directory).  We have 
considered running a query from the Linux box every 10 minutes or so 
looking for any "new" files in the windows directory, then monitoring 
the size of the files and when they stop growing bring them back to 
finish our work, but that doesn't make us feel very good.  Is there a 
way to run a daemon (or whatever it's called on windows) to detect when 
a new file is created in a directory and, more importantly, when it is 
"complete" (if that makes sense)?

Thanks for your help.
--greg

-- 
Greg Lindstrom   501 975.4859 (office)
Senior Programmer501 219-4455 (fax)
NovaSys Health   [EMAIL PROTECTED]
Little Rock, Arkansas

"We are the music makers, and we are the dreamers of dreams."  W.W.


-- 
http://mail.python.org/mailman/listinfo/python-list


Lots of pdf files

2005-07-20 Thread Greg Lindstrom
Hello-
I'm running Python 2.3 on a Linux system and have lots (about 2000) 
files in pdf format to print each day.  If I just wind up and fire all 
the files at the printer at once (as 2000 separate print jobs), the 
print server throws a fit and our system admin comes down and slaps me 
around for a few minutes (which, I guess, is fair).

There does not appear to be a simple way to merge many pdf's into one.  
I could, for example, merge all of the files for a particular provider 
into one pdf for that provider and then print it (or, better 
yet...encrypt it and ship it!), but I do not see a way.

Any suggestions?  As it stands now, I'm printing sending 200 files, 
waiting until the queue is clear, then another 200, and so forth.  
Eventually we will be paperless (if for no other reason this seems 
insane to me), but what can I do in the meantime?

Thanks for your help!

--greg

-- 
Greg Lindstrom   501 975.4859 (office)
Senior Programmer501 219-4455 (fax)
NovaSys Health   [EMAIL PROTECTED]
Little Rock, Arkansas

"We are the music makers, and we are the dreamers of dreams."  W.W.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: f*cking re module

2005-07-05 Thread Greg Lindstrom
> That's what I love in that news group. Someone comes with a
> stupid and arrogant question, and someone else answers in a
> calm and reasonable way.

Me, too. Indeed, that's a great reason to be a part of this community.
I didn't see the original question as either stupid or arrogant; I read
it as being from a frustrated user not knowing the regular expression
package.  We've all been there.  While it would be nice if the question
could be expressed without the explatives, it does no good at all to
return the hostile tone.  Another thing I like is that after the
question was answered, other ways to approach the problem were offered
along with reasons as to why the new way is a better approach.  And no
one had to get hurt!

Perhaps Python is a victim of it's own design here.  We, or at least I,
have grown to expect things to be clear and easy to understand/use.
Regular expressions are not either, though I use them all the time (I
learned them when I was a system admin on a Sun network and tend to
fall back on them when I need a "quick fix").  I hear that Perl 6 is
going to have a rewrite of regular expressions; it will be interesting
to see what their hard work produces.

--greg

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Loop until condition is true

2005-06-22 Thread Greg Lindstrom
A bit off topic, but what does the expression "Don't try to teach your
grandfather how to suck eggs." mean?  I've never heard it before and am
curious to the story behind it.

Thanks,
--greg

-- 
http://mail.python.org/mailman/listinfo/python-list


School Administration Software

2005-06-07 Thread Greg Lindstrom
Hello-

I just picked up my daughters' report cards for the year (they did well, 
thank-you) and was approached by the school administrator about writing 
an Acess application to help track attendance for next year 
(excused/unexcused, after so many unexcused absences a letter will be 
generated, etc.).  Since I have a feel for how large this request will 
become, I googled for school administration software on the Python site 
and was pleased to get 312 "hits".  There's software out there but -- 
alas -- it's difficult to tell what is being used, what people think, 
what's being maintained, etc. 

So...do any of you have experience with any of this software?  This is 
for a small (~400 students k-12), private school that is not swimming in 
taxpayer dollars and I would rather use Open Source because we will 
probably need to customize some reports, etc.  Any advice you have would 
be welcome.

Thanks,
--greg

-- 
Greg Lindstrom   501 975.4859 (office)
Senior Programmer501 219-4455 (fax)
NovaSys Health   [EMAIL PROTECTED]
Little Rock, Arkansas

"We are the music makers, and we are the dreamers of dreams."  W.W.


-- 
http://mail.python.org/mailman/listinfo/python-list


Using Paramiko

2005-04-19 Thread Greg Lindstrom
Can anyone point me to a "how-to" on Paramiko?  I need to use sftp for 
file transfer, have installed Paramiko and have a connection (that was 
pretty easy, actually), but cannot find documentation on how to transfer 
a file (I have demo_simple.py but can't figure it out).  Perhaps I 
missed a section of the documentation; if I did, I apologize.  Can 
anyone show me how to use this package?

Thanks,
--greg
--
Greg Lindstrom   501 975.4859 (office)
Senior Programmer501 219-4455 (fax)
NovaSys Health   [EMAIL PROTECTED]
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Compute pi to base 12 using Python?

2005-04-14 Thread Greg Lindstrom
> He says,
> Do you know how I can get "base12 pi"?
> Because the chromatic scale is base12.
> c c# d d# e f f# g g# a a# b
>
> Dick

It might feel more "natural" to do this with 'e' (2.718...)
--greg

-- 
http://mail.python.org/mailman/listinfo/python-list


Interpreter problem

2005-04-08 Thread Greg Lindstrom
I am using python 2.3.5 on a Linux system and have an odd problem 
dealing with the 'sha-bang' line.  I have a file, driver.py which starts 
with

#!/usr/bin/python
and works fine (that is, when I type in ./driver.py at the command 
prompt the file runs as expected).  I have another file, myotherfile.py 
which starts with the exact same line (#!/usr/bin/python) but I get

: bad interpreter: No such file or directory
H.  That occurs when I have no trailing spaces after the word 
'python' on the first line.  When I place a single space at the end of 
the line I get:

usr/bin/python: can't open file  (note the lack of a slash at the 
start of the line...is that significant?)

In the 2nd file I placed import sys on line 2, then sys.exit(0) on line 
3 to isolate the behavior, so I'm pretty  sure the problem deals with 
the first line of the file.

If I remove the import sys and sys.exit(0) then type ./myotherfile.py at 
the command line it runs as expected. Both files have the same 
permission settings (744) and owner (me).  I'm been looking at this for 
a couple of days and am at a loss.  Have any of you seen anything like 
this and what can I do about it?

Thanks,
--greg
--
Greg Lindstrom   501 975.4859 (office)
Senior Programmer501 219-4455 (fax)
NovaSys Health   [EMAIL PROTECTED]
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
Confidentiality Notice
--
This email and any attachments to it are privileged and confidential and are 
intended solely for use of the individual or entity to which they are 
addressed. If the reader of this message is not the intended recipient, any 
use, distribution, or copying of this communication, or disclosure of all or 
any part of its content to any other person, is strictly prohibited. If you 
have received this communication in error, please notify the sender by replying 
to this message and destroy this message and delete any copies held in your 
electronic files. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list


Unzipping Files

2005-04-01 Thread Greg Lindstrom
Hello-
I am trying to read a file from a zip archive.  I have read the 
documentation on zipfile and can read the names of the files in the 
archive and the length of each file, but do not see how to get to the 
actual data from any given file.  This is probably so simple that it 
hurts, so take it easy on me if you please...I just don't see it and 
have a deadline rushing towards me.  How do I read the data from a file 
in a zip archive?

Thanks!
--greg
--
Greg Lindstrom   501 975.4859 (office)
Senior Programmer501 219-4455 (fax)
NovaSys Health   [EMAIL PROTECTED]
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
--
http://mail.python.org/mailman/listinfo/python-list


Help Installing Python 2.3.5

2005-03-11 Thread Greg Lindstrom
I've been running python for years and have never had trouble installing 
until today.  I am trying to install Python 2.3.5 from python.org on my 
windows 2000 box.  I uninstalled everything from the previous Python, 
downloaded and ran the exe and everything appeared to run correctly 
(even got the "Python installed correctly" screen).  Reboot.  When I 
open a dos window and type "python" I am told it doesn't know that that 
is!  The file association with seems to work.  Do I need to map the PATH 
myself?  Everything's in the default directory (C:\Python23).

Thanks for your help,
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
--
http://mail.python.org/mailman/listinfo/python-list


An Odd Little Script

2005-03-09 Thread Greg Lindstrom
Hello-
I have a task which -- dare I say -- would be easy in  
Perl  but would rather do in Python (our primary 
language at Novasys).  I have a file with varying length records.  All 
but the first record, that is; it's always 107 bytes long.  What I would 
like to do is strip out all linefeeds from the file, read the character 
in position 107 (the end of segment delimiter) and then replace all of 
the end of segment characters with linefeeds, making a file where each 
segment is on its own line.  Currently, some vendors supply files with 
linefeeds, others don't, and some split the file every 80 bytes.  In 
Perl I would operate on the file in place and be on my way.  The files 
can be quite large, so I'd rather not be making extra copies unless it's 
absolutely essential/required.

I turn to the collective wisdom/trickery of the list to point me in the 
right direction.  How can I perform the above task while keeping my sanity?

Thanks!
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
--
http://mail.python.org/mailman/listinfo/python-list


Recognizing the Arrival of a New File

2005-03-08 Thread Greg Lindstrom
Hello-
I am writing an application where I need to recognize when a file 
arrives in a given directory.  Files may arrive at any time during the 
course of the day.  Do I set up a cron job to poll the directory every 
few minutes?  Write a daemon to monitor the directory?  Or is there some 
other more common/accepted way to perform this task?  I'm using Python 
2.3 on Linux.

Thanks for your help,
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
--
http://mail.python.org/mailman/listinfo/python-list


Fonts and PIL

2005-02-23 Thread Greg Lindstrom
Hello-
I'm running Python 2.3 on a windows box and would like to use PIL to 
superimpose text over an existing pgn image.  I have no problem getting 
the text on the image but can not figure out how to manage fonts.  How 
to set the font style and size.  From reading the archives I surmise 
that I want to work with *.pil files.  I've searched my box for the font 
files but did not find them.  I've googled for information on pil font 
files and it appears to be involved with Zope.  So, can any of you 
honcho-level types help me out?  How can I set font size and style in my 
PIL application?

Thanks again!
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
--
http://mail.python.org/mailman/listinfo/python-list


Postgres and SSL

2005-02-11 Thread Greg Lindstrom
I'm on a Linux box running python 2.3 and would like to connect to a 
postgres database via SSL, but have not been able to find a module to do 
this (or haven't figured out the syntax).  Can anyone help me out?

Thanks,
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
Confidentiality Notice
--
This email and any attachments to it are privileged and confidential and are 
intended solely for use of the individual or entity to which they are 
addressed. If the reader of this message is not the intended recipient, any 
use, distribution, or copying of this communication, or disclosure of all or 
any part of its content to any other person, is strictly prohibited. If you 
have received this communication in error, please notify the sender by replying 
to this message and destroy this message and delete any copies held in your 
electronic files. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list


EDI x12 --> XML

2005-02-04 Thread Greg Lindstrom
Hello, List-
I am working on automating a system accepting input data in EDI x12 
format and would like to convert it to XML.  Before I start, I thought 
I'd ask if anyone has worked on such a beast.  I have seen work by Chris 
Cioffi on parsing EDI records.  Is anything else out there before I 
either write one or use one that I have written in Perl?

Thanks!
--greg--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
--
http://mail.python.org/mailman/listinfo/python-list


Accessing Postgress from Windows

2005-01-28 Thread Greg Lindstrom
Hello, All-
I am running Python 2.3 on a Windows XP box and would like to access a 
postgres database running on a Linux fileserver.  I've googled for 
Python and Postgres but most of the stuff I saw looked stale.  I would 
like to use a secure connection (ssl) and a direct connection, if 
possible.  What can you recommend for the task?

Thanks...and see you all at PyCon!
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
Confidentiality Notice
--
This email and any attachments to it are privileged and confidential and are 
intended solely for use of the individual or entity to which they are 
addressed. If the reader of this message is not the intended recipient, any 
use, distribution, or copying of this communication, or disclosure of all or 
any part of its content to any other person, is strictly prohibited. If you 
have received this communication in error, please notify the sender by replying 
to this message and destroy this message and delete any copies held in your 
electronic files. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list


Looking for Form Feeds

2005-01-24 Thread Greg Lindstrom
Hello-
I have a file generated by an HP-9000 running Unix containing form feeds 
signified by ^M^L.  I am trying to scan for the linefeed to signal 
certain processing to be performed but can not get the regex to "see" 
it.  Suppose I read my input line into a variable named "input"

The following does not seem to work...
input = input_file.readline()
if re.match('\f', input): print 'Found a formfeed!'
else: print 'No linefeed!'
I also tried to create a ^M^L (typed in as Q M  L) but that 
gives me a syntax error when I try to run the program (re does not like 
the control characters, I guess).  Is it possible for me to pull out the 
formfeeds in a straightforward manner?

Thanks!
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.
Confidentiality Notice
--
This email and any attachments to it are privileged and confidential and are 
intended solely for use of the individual or entity to which they are 
addressed. If the reader of this message is not the intended recipient, any 
use, distribution, or copying of this communication, or disclosure of all or 
any part of its content to any other person, is strictly prohibited. If you 
have received this communication in error, please notify the sender by replying 
to this message and destroy this message and delete any copies held in your 
electronic files. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list


ODBC Connection on Windows XP

2005-01-03 Thread Greg Lindstrom
I am running Python 2.3 on Windows XP and am trying to connect to an 
ODBC datasource.  I have done this many times on this same box but this 
time I get an error message saying

dbi.operation-error: [WSOCK32.DLL]Connection refused, is the host 
listener running? (#10061) in LOGIN

Not having seen this before, and having used the odbc module for about a 
year now, I'm at a quandary; what does this mean and what do I do to fix it?

Thanks!
--greg
--
Greg Lindstrom   501 975.4859
Computer Programmer  [EMAIL PROTECTED]
NovaSys Health
Little Rock, Arkansas
"We are the music makers, and we are the dreamers of dreams."  W.W.

--
http://mail.python.org/mailman/listinfo/python-list


Creating Fixed Length Records

2004-12-08 Thread Greg Lindstrom
Hello-
I'm creating fixed-length record layouts for various record translations 
I need to perform.  I have been using a home-grown object, 
"FixedLengthRecord" for about 4 years now and am very happy with it.  
Almost.  The burr under my saddle occurs when I serialize the record.  
Currently, I create an empty text field and for each record in my 
database (all record layouts, data types, lengths, defaults, etc. are 
held in an SQL server) I concatenate the field to the text segment.  I 
have been led to believe this is bad form because Python will copy the 
entire segment each time I add a field.  Up until now, it was not a big 
deal because the segments had at most 20 fields.  I have just been 
handed a record layout that is almost 5000 bytes long with 350 fields in 
it.  Gulp!!  Although I could let my object churn away on this bad boy, 
I'd like to know if there is a more pythonic way to serialize the record.

One thought I had, which might lead to an addition to the language, was 
to use the struct module.  If I could feed the pack method a format 
string then a tuple of values (instead of individual values), then I 
could create the format string once, then pass it a tuple with the 
values for that record.  Just a thought. 

So, gurus, what are your suggestions to tame this record?  Are there 
easier ways that I'm just not seeing?

Thanks,
--greg
--
http://mail.python.org/mailman/listinfo/python-list