Re: Should I Learn Python or Ruby next?

2010-06-22 Thread Michael Crute
On Tue, Jun 22, 2010 at 4:58 AM, Josef Tupag joseftu...@gmail.com wrote: I've been programming (when I do program) mainly in Perl for the last 10 years or so. But I've been itching to learn a new language for a while now, and the two near the top of the list are Ruby and Python. If you have

Re: What module to parse/generate ical files?

2010-06-21 Thread Michael Crute
On Mon, Jun 21, 2010 at 1:50 PM, Grant Edwards inva...@invalid.invalid wrote: What module is recommended for parsing/generating ical files? However, I'm not sure it's being maintained.  Despite the claim on the above page that the current version is 2.1, The latest version I can find is v1.2

Standard Library SSL Module (was: Python OpenSSL library)

2010-06-14 Thread Michael Crute
On Mon, Jun 14, 2010 at 1:25 PM, Antoine Pitrou solip...@pitrou.net wrote: That was not my question. My question was whether there was a reason to rewrite a separate OpenSSL-accessing library rather than contributing to improve the hashlib and ssl modules which are already part of the Python

Re: Python OpenSSL library

2010-06-13 Thread Michael Crute
On Sun, Jun 13, 2010 at 4:29 PM, astral ast...@news.eternal-september.org wrote: I am looking for Python OpenSSL library, for Python version 2.5.4 (on Windows) Which does not require to install Cygwin package. Need just to decrypt file, then uninstall library. You might want to take a look at

Re: Python OpenSSL library

2010-06-13 Thread Michael Crute
On Sun, Jun 13, 2010 at 5:59 PM, astral ast...@news.eternal-september.org wrote: You might want to take a look at m2crypto[0]. While I have not personally run it on Windows (runs great on OS X and Linux) they do provide pre-compiled Windows binaries. which one is for windows, for Python

Re: pythonic ssh

2010-05-17 Thread Michael Crute
On Mon, May 17, 2010 at 9:37 AM, John Maclean jaye...@gmail.com wrote: pyssh, pexpect, paramiko or creating your your own sockets. what do you use to pythonically ssh to boxes? I think the answer to this depends on your goals. Paramiko is the best way to go if you want a pythonic API to ssh but

Re: Two questions ( Oracle and modules )

2009-12-07 Thread Michael Crute
On Mon, Dec 7, 2009 at 6:57 AM, Gabor Urban urbang...@gmail.com wrote: 1. I have choice to introduce Python to my new employee. We are to write and application that uses databases stored partially in Oracle 10 and partially in Oracle 11. We have to execute standard SQL commands and stored

Code in __init__.py, is it bad form?

2009-02-23 Thread Michael Crute
Is it bad form (i.e. non-pythonic) to have code in your __init__.py files? I know this is subjective so I'm just looking for the general consensus. I've heard both sides of the story and I personally feel its okay if the code pertains to the whole module but have an open mind about the matter. If

Re: Code in __init__.py, is it bad form?

2009-02-23 Thread Michael Crute
On Mon, Feb 23, 2009 at 9:03 PM, Steve Holden st...@holdenweb.com wrote: Michael Crute wrote: Is it bad form (i.e. non-pythonic) to have code in your __init__.py files? I know this is subjective so I'm just looking for the general consensus. I've heard both sides of the story and I personally

Re: Code in __init__.py, is it bad form?

2009-02-23 Thread Michael Crute
On Mon, Feb 23, 2009 at 9:41 PM, Benjamin Peterson benja...@python.org wrote: Michael Crute mcrute at gmail.com writes: On Mon, Feb 23, 2009 at 9:03 PM, Steve Holden steve at holdenweb.com wrote: No, it's absolutely fine. One common usage is to import symbols from sub-modules so

Importing Version Specific Modules

2008-12-04 Thread Michael Crute
Which method makes the most sense for importing a module in python that is version specific? My use case is that I'm writing code that will be deployed into a python 2.3 environment and in a few months be upgraded to python 2.5. This: if sys.version_info[:2] = (2, 5): from string import

Re: Importing Version Specific Modules

2008-12-04 Thread Michael Crute
On Thu, Dec 4, 2008 at 7:33 PM, [EMAIL PROTECTED] wrote: Michael try: Michael from string import Template Michael except ImportError: Michael from our.compat.string import Template This is easier to ask forgiveness than permission (EAFP). This tends to be more Pythonic

Re: 'new' module deprecation in python2.6

2008-11-29 Thread Michael Crute
On Sat, Nov 29, 2008 at 11:52 AM, David Pratt [EMAIL PROTECTED] wrote: Can someone tell me why 'new' has been deprecated in python 2.6 and provide direction for code that uses new for the future. I find new is invaluable for some forms of automation. I don't see a replacement for python 3

Re: Web programming in Python.

2008-09-28 Thread Michael Crute
On Sun, Sep 28, 2008 at 6:39 PM, Kurda Yon [EMAIL PROTECTED] wrote: I am totaly newbie in the Python's web programming. So, I dont even know the basic conceptions (but I have ideas about php-web- programming). Does it work in a similar way? First, I have to install a Python-server? There are

Re: check if file is MS Word or PDF file

2008-09-27 Thread Michael Crute
On Sat, Sep 27, 2008 at 5:43 PM, A. Joseph [EMAIL PROTECTED] wrote: What should I look for in a file to determine whether or not it is a MS Word file or an Excel file or a PDF file, etc., etc.? including Zip files I don`t want to check for file extension. os.path.splitext('Filename.jpg')

Re: check if file is MS Word or PDF file

2008-09-27 Thread Michael Crute
On Sat, Sep 27, 2008 at 7:01 PM, Chris Rebert [EMAIL PROTECTED] wrote: Looking at the docs for the mimetypes module, it just guesses based on the filename (and extension), not the actual contents of the file, so it doesn't really help the OP, who wants to make sure their program isn't misled