Re: Python IDE

2004-12-15 Thread Grig
I use PyDev (pydev.sf.net), an Eclipse plug-in. I may be biased, since
I contributed some code to the project, but it works great for me. An
article talking about using PyDev and ant within Eclipse is available
at
http://www-106.ibm.com/developerworks/library/os-ecant/?ca=drs-tp2604.

Grig

Chris wrote:
> What IDE's do y'all recommend for Python?  I'm using PythonWin atm,
but 
> I'd like something with more functionality.
> 
> Chris

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


pyUnitPerf

2004-12-28 Thread Grig
I just released a Python port of Mike Clark's JUnitPerf. I called it
pyUnitPerf and it's available at
http://sourceforge.net/projects/pyunitperf. It is in a very early stage
of development, but I think it's pretty usable (and useful) as it is.

I already received an interesting comment from a hard-core Python user
from Switzerland:

"Problem with porting patterns/api's from java straight to python is
that most of the outcome feels unpythonic. I'll not go about my own
feelings python vs. java here now, but I just want to point out that
there's already a rather large core of hard-python users who refuse to
use pyUnit because of this, and pyUnitPerf's doomed to share this fate,
unless of course somebody decides along the way to make it sexy and
pythonic and takes on the trouble of lowering the red-flag again which
java has become to lots of folks."

My own experience with pyUnit has been very satisfactory and for me
personally pyUnitPerf scratches an itch.

I'm curious to find out more about people's feelings and opinions on
this. I don't want to begin a flame war, but my personal take on it is
that the various Java-based test frameworks are very useful and there's
a lack of corresponding frameworks in Python. I'm thinking about tools
such as HTTPUnit, Cactus, Abbot, The Grinder, and there are many
others. I'm happy to see Jython being used more and more in such tools
though (The Grinder, Test Maker, Marathon). 

Grig

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


Re: Simulating low bandwidth network on localhost

2005-10-07 Thread Grig Gheorghiu
Try dummynet (<http://info.iet.unipi.it/~luigi/ip_dummynet/> and/or
Google for it)

Grig

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


TurboGears slashdotted

2005-10-10 Thread Grig Gheorghiu
"TurboGears: Python on Rails?" post:

http://developers.slashdot.org/developers/05/10/10/0650207.shtml?tid=156

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


Re: rrdtool?

2005-10-10 Thread Grig Gheorghiu
By sheer coincidence I was looking into the same thing today. I just
downloaded the latest rrdtool release (rrdtool-1.2.11) and I noticed a
/bindings/python subdirectory. I haven't played with it yet, as I still
need to install tons of prerequisites before I can build rrdtool.

Grig

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


Re: rrdtool?

2005-10-10 Thread Grig Gheorghiu
I don't know of any, so maybe it's time to roll our sleeves :-)

Actually, a while ago I started a python project called perfstats
(<http://sourceforge.net/projects/perfstats>) which uses SNMP to
retrieve various system performance metrics, stores them into a
Firebird database, then displays them using the biggles module. I
haven't worked on it in a while, and I'd rewrite it from scratch
probably. If you want to see the source, check out
<http://cvs.sourceforge.net/viewcvs.py/perfstats/>.

Grig

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


Re: What's the best SNMP interface?

2005-10-11 Thread Grig Gheorghiu
I used pySNMP successfully. I think it's the most active SNMP-related
Python project too.

Grig

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


Re: Well written open source Python apps

2005-10-13 Thread Grig Gheorghiu
This is really synchronicity in action! I started to think yesterday
about putting together a project that measures the 'goodness' of Python
packages in the PyPI Cheese Shop repository. I call it the "Cheesecake"
project. I took the liberty of citing Micah's post in a blog entry that
I just posted:
<http://agiletesting.blogspot.com/2005/10/cheesecake-how-tasty-is-your-code.html>

Comments/suggestions welcome!

Grig

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


Re: looking for a good python module for MS SQL server

2005-10-31 Thread Grig Gheorghiu
I successfully used mxODBC
(<http://www.egenix.com/files/python/mxODBC.html>)

Grig

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


Re: Web automation with twill

2005-11-02 Thread Grig Gheorghiu
You might want to post your question to the twill mailing list. Info
about the list is available at <http://lists.idyll.org/listinfo/twill>

Grig

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


Re: python + ODBC + Oracle + MySQL - money

2005-11-10 Thread Grig Gheorghiu
In my testing, I need to connect to Oracle, SQL Server and DB2 on
various platforms. I have a base class with all the common code, and
derived classes for each specific database type using specific database
modules such as cxOracle, mxODBC and pyDB2. The derived classes are
pretty thin, containing only some syntax peculiarities for a given
database type. The code is clean and portable.

Grig

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


Re: python + ODBC + Oracle + MySQL - money

2005-11-10 Thread Grig Gheorghiu
Yes, I did run into the difference in the parameter styles, so I deal
with that in the database-specific classes. It's not a huge difficulty
though.

Grig

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


Re: Where can I find an example that uses FTP standard library?

2005-11-14 Thread Grig Gheorghiu
I have some code that looks something like this:

from ftplib import FTP

ftp = FTP()
# connect and login
ftp.connect(server_name)
ftp.login(user_name, password)
cmd = "STOR %s" % filename
#"ASCII transfer"
l = open(filename)
ftp.storlines(cmd, l)
#"BIN transfer"
l = open(filename, 'rb')
ftp.storbinary(cmd, l)
# close connection
ftp.close()

All the various methods on the ftp object should be called in
try/except blocks, since they can potentially raise exceptions.

Grig

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


Re: Los Angeles Python Users' Group, anyone?

2005-11-18 Thread Grig Gheorghiu
[EMAIL PROTECTED] wrote:
> Hi,
>
> I was rifling through python.org to see if there was an existing Python
> user's group for the Los Angeles area. Doesn't seem like it, so maybe
> we should start one? I'm interested in helping with the coordination of
> activities etc.
>
> Since everybody living in greater L.A. area is likely to have
> superhuman tolerance for traffic and commuting times, I see no reason
> why an L.A users' group couldn't cover the whole
> LA/Valley/Burbank/Glendale/Pasadena/Long Beach/etc sprawl.
>
> Anyone interested, please email me at: m AT bagai DOT com
>
> Thanks!
>
> /Morten

Hi, Morten

I'm the organizer of the SoCal Piggies. Please subscribe to the mailing
list and you'll get all the messages regarding our next meetings. We're
planning to meet for dinner in December (probably Dec. 7th) at a
restaurant in Pasadena. Check out the mailing list archives for
details.

Hope to see you at our next meetings!

Grig
Grig

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


Re: Importing Problem on Windows

2005-01-10 Thread Grig Gheorghiu
What version of Python are you running on Linux vs. Windows?

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


Re: Importing Problem on Windows

2005-01-10 Thread Grig Gheorghiu
I normall set PYTHONPATH to the parent directory of my module directory
tree. If I have my module files in C:\home\mymodules and below, then I
set PYTHONPATH to C:\home. This way, I can do "import mymodules" in my
code.

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


Re: import problems *newbie*

2005-01-16 Thread Grig Gheorghiu
In my experience (as a tester), it is easier to deal with PYTHONPATH
than to add the my.pth file to the site-packages directory. The main
reason is that I have my custom packages and modules in a directory
tree that I deploy on many clients/servers/platforms/OS versions, some
running different versions of Python. I found that I solve my import
problems by adding one line to .bash_profile, which sets PYTHONPATH to
the parent directory of my custom directory tree. Or, on Windows, I add
an Environment variable, call it PYTHONPATH, and set it to the
necessary directory. The alternative would be to hunt for the
site-packages directory (of which there might be several) on all my
systems.

I guess it's a matter of taste in the end, but I do find the PYTHONPATH
approach more suitable for automation and scripting, particularly when
dealing with a large number of systems. 

Grig

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


Re: script to automate GUI application (newbie)

2005-01-18 Thread Grig Gheorghiu
Bogdan,

If your app is written in Java, take a look at Marathon
(http://marathonman.sourceforge.net/). It uses Jython as its scripting
language and it's pretty smart about how it does automation (i.e. it
doesn't look at screen coordinates, but at control names). It also
offers a capture/replay functionality, and it automatically builds the
Jython script that drives your flow of actions. You can then edit and
enhance the script manually.

Grig

bogdan romocea wrote:
> Dear Python experts,
>
> I have a GUI application (Windows; apparently written in Java) which
I
> want to use through a script (without a mouse or keyboard). First,
one
> of several buttons needs to be clicked (no keyboard shortcuts
> available, but I can measure the coordinates in pixels from the top
> left corner of the window to the center of the button to be clicked).
> Then, a window with a few drop-down lists pops up - I have to make
some
> choices and click OK (it's possible to navigate from one drop-down to
> the next with Tab, and hit Enter for OK).
>
> I want to run the script above from code (if this then click "... and
> OK") and perhaps by means of several desktop shortcuts (one shortcut
> for each set of GUI inputs).
>
> Is such a script possible? If yes, how do I get there? I searched
> comp.lang.python but didn't find something directly applicable (or so
> it seemed to me - I'm a beginner). Directions (and sample code, if
> possible) will be warmly appreciated.
>
> Thank you,
> b.
>
>
>
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> http://info.mail.yahoo.com/mail_250

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


Re: python under java

2005-01-27 Thread Grig Gheorghiu
At a command prompt, do "which python" to see where the python binary
lives. Then specify the full path to python in your exec() call,
instead of just "python". What probably happens is that you don't have
the python binary in your PATH when you run exec() from your Java code.
Grig

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


Re: utf8 silly question

2005-06-21 Thread Grig Gheorghiu
Salut, Catalin

You can first convert your c string to unicode, and in the process
specify an encoding that understands non-ASCII characters (if you don't
specify an encoding, it will try to use your default, which is most
likely ASCII, and you'll get the error you mentioned.). In the
following example, I specified 'iso-8859-1' as the encoding.

Then you can utf8-encode the c string via the codecs module.

Here's a snippet of code (note the error when I don't specify a
non-default unicode encoding):

Python 2.4 (#1, Nov 30 2004, 16:42:53)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> c = unicode(chr(169)+" some text")
Traceback (most recent call last):
  File "", line 1, in ?
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa9 in position 0:
ordinal not in range(128)
>>> c = unicode(chr(169)+" some text", 'iso-8859-1')
>>> print c
© some text
>>> import codecs
>>> print codecs.encode(c, 'utf-8')
© some text

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


Re: Connecting to Firebird database using Kinterbasdb+Python

2005-07-04 Thread Grig Gheorghiu
How is your Firebird database configured -- Classic Server or Super
Server? If it's in classic server mode, you don't need to worry about
the host portion. You do need to worry about permissions on the
database file. I got it to work by making it 664 and owner + group
firebird.

Grig

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


Re: best options for oracle/python?

2005-07-06 Thread Grig Gheorghiu
Use cx_Oracle: <http://starship.python.net/crew/atuining/cx_Oracle/>

Grig

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


Re: Python Installation error on Solaris-9-SPARC

2005-07-14 Thread Grig Gheorghiu
Why don't you donwload the source from python.org? Also, on Solaris tar
is sometimes broken (i.e. can't deal with long directory names etc.)
You may want to donwload and install gnu tar.

Grig

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


Re: Native ODBC access for python on linux?

2005-07-14 Thread Grig Gheorghiu
I concur with Larry. I find that by properly abstracting the database
connection code in my own class, I can then use any DB-API-compliant
Python module to connect to a variety of databases. I use for example
cxOracle to connect to Oracle and kinterbasdb to connect to firebird. I
haven't tried connecting to MySQL natively yet, but I don't think it
would be any different.

Grig

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


Re: Native ODBC access for python on linux?

2005-07-14 Thread Grig Gheorghiu
1. Download and install MySQL-python from
<http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775>

2. Try to connect to a MySQL database that you have running. In this
example I'm connecting to the bugs database installed with Bugzilla,
and I'm connecting as MySQL user root (not recommended for 'production'
code):

# python
Python 2.4 (#1, Nov 30 2004, 16:42:53)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> from pprint import pprint
>>> conn = MySQLdb.connect(db='bugs', user='root', passwd='***')
>>> cursor = conn.cursor()
>>> cursor.execute('select * from groups')
7L
>>> data = cursor.fetchall()
>>> print data
((1L, 'tweakparams', 'Can tweak operating parameters', 0, '', 1), (2L,
'editusers', 'Can edit or disable users', 0, '', 1), (4L,
'creategroups', 'Can create and destroy groups.', 0, '', 1), (8L,
'editcomponents', 'Can create, destroy, and edit components.', 0, '',
1), (16L, 'editkeywords', 'Can create, destroy, and edit keywords.', 0,
'', 1), (32L, 'editbugs', 'Can edit all aspects of any bug.', 0, '.*',
1), (64L, 'canconfirm', 'Can confirm a bug.', 0, '.*', 1))
>>> pprint(data)
((1L, 'tweakparams', 'Can tweak operating parameters', 0, '', 1),
 (2L, 'editusers', 'Can edit or disable users', 0, '', 1),
 (4L, 'creategroups', 'Can create and destroy groups.', 0, '', 1),
 (8L, 'editcomponents', 'Can create, destroy, and edit components.', 0,
'', 1),
 (16L, 'editkeywords', 'Can create, destroy, and edit keywords.', 0,
'', 1),
 (32L, 'editbugs', 'Can edit all aspects of any bug.', 0, '.*', 1),
 (64L, 'canconfirm', 'Can confirm a bug.', 0, '.*', 1))
>>>

For more info on how to use the MySQLdb module, see the docs at
<http://sourceforge.net/docman/?group_id=22307>

Hope this helps,

Grig

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


Re: Native ODBC access for python on linux?

2005-07-15 Thread Grig Gheorghiu
That's exactly the way to go. In my case, I'm using cx_Oracle to
connect from Python to Oracle and the same exact code runs on Windows,
Linux, Solaris and soon on AIX.

Grig

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


Re: difficulty connecting to networked oracle database

2005-07-21 Thread Grig Gheorghiu
As the other posters already mentioned, cx_Oracle is the way to go. I'm
using it to connect to Oracle not only on Windows, but also on Solaris,
Linux and AIX.

Grig

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


Re: Using win32com for web automation

2005-07-26 Thread Grig Gheorghiu
For Javascript automation, I recommend Selenium
(<http://confluence.public.thoughtworks.org/display/SEL/Home>).

Grig

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


Re: Art of Unit Testing

2005-08-02 Thread Grig Gheorghiu
The py.test module offers setup/teardown hooks at the method, class and
module level. The scenario you're describing would be covered at the
module level. See the py.test documentation for more details:
<http://codespeak.net/py/current/doc/test.html#managing-test-state-across-test-modules-classes-and-methods>

Grig


http://agiletesting.blogspot.com

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


Re: installing python2.4.1

2005-08-04 Thread Grig Gheorghiu
I had a similar problem when trying to compile Python 2.4.1 on AIX. The
configure script complained about not finding 'cc_r'. I simply did 'ln
-s /usr/bin/gcc /usr/bin/cc_r' and that solved my problem. You may
consider doing the same for cclplus.

Grig

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


Re: stopping a python windows service

2005-08-16 Thread Grig Gheorghiu
Here are 2 recipes from the online Python Cookbook. I've used this one
very successfully:
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/115875>.

This one seems simpler:
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/59872>

Grig

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


Re: improvements for the logging package

2005-09-07 Thread Grig Gheorghiu
I recommend py.log (part of the py lib) as an example of a pythonic
implementation of logging. It uses a keyword-based mechanism and it
distinguishes between "producers" of log messages (i.e. your app) and
"consumers" of log messages (i.e. stdout, stderr, a database, a mail
server, etc.)

You can do things like:

>>> import py
>>> py.log.default('hello world')
[default] hello world
>>> log = py.log.Producer("myapp")
>>> log.info('hello again')
[myapp:info] hello again
>>> log.hello('again')
[myapp:hello] again

See
<http://agiletesting.blogspot.com/2005/06/keyword-based-logging-with-py-library.html>
for more details.

Grig

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


Re: python script under windows

2005-09-09 Thread Grig Gheorghiu
Jan,

Here's what I did to run a Python script (let's call it myscript.py) as
a service:

1. Install Win2K Resource Kit.

2. Run instsrv to install srvany.exe as a service with the name
myscript:

C:\Program Files\Resource Kit\instsrv myscript "C:\Program
Files\Resource Kit\srvany.exe"

3. Go to Computer Management->Services and make sure myscript is listed
as a service. Also make sure the Startup Type is Automatic.

4. Create a myscript.bat file with the following contents in e.g.
C:\pyscripts:

C:\Python23\python C:\pyscripts\myscript.py

5. Create new registry entries for the new service.
- run regedt32 and go to the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\myscript entry
- add new key (Edit->Add Key) called Parameters
- add new entry for Parameters key (Edit->Add Value) to set the
Application name => Name should be Application, Type should be
REG_SZ, Value should be path to myscript.bat, i.e.
C:\pyscripts\myscript.bat
- add new entry for Parameters key (Edit->Add Value) to set the working
directory => Name should be AppDir, Type should be
REG_SZ, Value should be path to pyscripts directory, i.e. C:\pyscripts

6. Test starting and stopping the myscript service in Computer
Management->Services.

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


Re: testing a website from python

2005-09-21 Thread Grig Gheorghiu
Achim,

Have you looked into twill? It's available at
<http://www.python.org/pypi/twill/0.7.2>

Grig

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


Re: Testing web applications

2005-02-11 Thread Grig Gheorghiu
The Jython / HttpUnit combination worked well for me too. There's also
maxq (http://maxq.tigris.org/), which looks promising, but I haven't
used it yet.

Grig


http://agiletesting.blogspot.com

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


Re: Unit Testing in Python

2005-02-11 Thread Grig Gheorghiu
A great place to start for TDD-related stuff is testdriven.com. On the
topic of Python-specific unit testing, there's also a recent thread on
the newly-created extreme-python google group:
http://groups-beta.google.com/group/extreme-python/browse_thread/thread/f39844c4cf6c844f?tvc=2

Grig


http://agiletesting.blogspot.com

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


Re: Unittesting for web applications

2005-02-12 Thread Grig Gheorghiu
There's another current thread on c.l.py talking about testing Web
applications. Somenone suggested Jython in conjunction with HttpUnit, a
combination that worked for me too -- but the name HttpUnit is
misleading, since it does functional/black box testing and not unit
testing. It beats scraping Web pages though, so it may be sufficient
for what you need. You can see a mini-tutorial I wrote at
http://agiletesting.blogspot.com/2005/02/web-app-testing-with-jython-and.html

I don't know any Python-specific frameworks for Web app unit testing.
In the Java world, there's Cactus at http://jakarta.apache.org/cactus/.
To quote from that page, "Cactus is a simple test framework for unit
testing server-side java code (Servlets, EJBs, Tag Libs, Filters,
...)." So this is pretty much Java-centric and may not help you much.

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


Re: Will presentations at PyCon be recorded/streamed?

2005-03-11 Thread Grig Gheorghiu
Is there an official procedure for signing up for presenting a
Lightning Talk, except for editing the PyCon05 Wiki page?

Grig

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


Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Grig Gheorghiu
As a tester, my vote goes to extending the "Testing" subsection of the
"Testing, debugging and optimizing". I'd like to see more testing tools
discussed there. Maybe py.test, PyFIT, and possibly others. 

Grig

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


Re: unittest vs py.test?

2005-04-01 Thread Grig Gheorghiu
In my mind, practicing TDD is what matters most. Which framework you
choose is a function of your actual needs. The fact that there are 3 of
them doesn't really bother me. I think it's better to have a choice
from a small number of frameworks rather than have no choice or have a
single choice that might not be the best for your specific environment
-- provided of course that this doesn't evolve into a PyWebOff-like
nightmare :-) 

Grig

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


Re: unittest vs py.test?

2005-04-01 Thread Grig Gheorghiu
>From what I know, the PyPy guys already have a unittest-to-py.test
translator working, but they didn't check in the code yet. You can send
an email to py-dev at codespeak.net and let them know you're interested
in this functionality. 

Grig

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


Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-02 Thread Grig Gheorghiu
Can't you use the tempfile module to generate unique names for
non-existent files and directories? Take a look at
http://www.python.org/doc/lib/module-tempfile.html -- it works on all
supported platforms.

Grig

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


Re: unittest vs py.test?

2005-04-04 Thread Grig Gheorghiu
py.test intercepts the assert statements before they are optimized
away. It's part of the profuse "magic" that py.test does.

Grig

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


Re: Web application toolkit recommendation?

2005-04-04 Thread Grig Gheorghiu
Check out http://pyre.third-bit.com/pyweb/index.html

Grig

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


Re: oracle interface

2005-04-05 Thread Grig Gheorghiu
I subscribe to the other posters' opinion: cx_Oracle is what I use on
Windows, Linux and Solaris. Works great cross-platform and across
Oracle versions (I use it with Oracle 9 and 10, haven't tried 8 yet).

Grig

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


Re: Establishing connection SSH

2005-04-06 Thread Grig Gheorghiu
Try paramiko: http://www.lag.net/paramiko/

Grig

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


SoCal Piggies meeting Tuesday 4/12

2005-04-09 Thread Grig Gheorghiu
The Southern California Python Interest Group (SoCal Piggies) will meet
Tuesday April 12 @ 7:30 PM, at the Kerckhoff Marine Lab in Newport
Beach. If you're a Pythonista in the area and you're interested in
participating, please e-mail socal-piggies at lists.idyll.org and
request more info.

Thanks,

Grig

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


Re: Programming Language for Systems Administrator

2005-04-11 Thread Grig Gheorghiu
In my experience, Python is more Windows-friendly than Perl. Mark
Hammond's Python Extensions for Windows are a lifesaver. You can
download the package from http://sourceforge.net/projects/pywin32/ or
install the ActiveState Python package, which includes the Windows
extensions.

I use Python for example to automate user and mailbox management in
Active Directory and Exchange. I also use the mxODBC module to interact
with SQL Server.

I warmly recommend "Python Programming on Win32" by Mark Hammond and
Andy Robinson (O'Reilly).

Grig

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


Re: The convenient database engine for a "Distributed" System

2005-04-11 Thread Grig Gheorghiu
I also recommend Firebird. I like the fact that the database is in its
own file that can be copied from one platform to another. I use it on
Linux, but it works just as well on Windows.

Grig

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


Re: Memory Profiler

2006-01-11 Thread Grig Gheorghiu
See

http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy#MiscellaneousPythonTestingTools

In particular, PySizer and HeapPy might be what you're looking for. I
can't say for sure, since I haven't used these tools myself.

Grig

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


Re: Python Projects Continuous Integration

2006-08-07 Thread Grig Gheorghiu
Ziga Seilnacht wrote:
> Dave Potts wrote:
> > Hi,
> >
> > I'm just starting a development project in Python having spent time in
> > the Java world.  I was wondering what tool advice you could give me
> > about setting up a continuous integration environment for the python
> > code: get the latest source, run all the tests, package up, produce the
> > docs, tag the code repository.  I'm used to things like Maven and
> > CruiseControl in the Java world.
> >
> > Cheers,
> >
> > Dave.
>
> Buildbot might be what you are looking for:
> http://buildbot.sourceforge.net/
>
> Hope this helps,
> Ziga

+1 for buildbot. It is amazingly flexible and powerful, once you get
past staring at the configuration file and trying to make sense of it.
Here's a blog post I wrote that can help you get started:
<http://agiletesting.blogspot.com/2006/02/continuous-integration-with-buildbot.html>.

Hope this helps,

Grig

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


Re: Test driven programming, was Re: VB to Python migration

2006-02-01 Thread Grig Gheorghiu
Magnus,

I've been writing TextTest tests lately for an application that will be
presented at a PyCon tutorial on "Agile development and testing". I
have to say that if your application does a lot of logging, then the
TextTest tests become very fragile in the presence of changes. So I had
to come up with this process in order for the tests to be of any use at
all:

1) add new code in, with no logging calls
2) run texttest and see if anything got broken
3) if nothing got broken, add logging calls for new code and
re-generate texttest golden images

I've been doing 3) pretty much for a while and I find myself
regenerating the golden images over and over again. So I figured that I
won't go very far with this tool without the discipline of going
through 1) and 2) first.

>From what I see though, there's no way I can replace my unit tests with
TextTest. It's just too coarse-grained to catch subtle errors. I'm
curious to know how exactly you use it at Carmen and how you can get
rid of your unit tests by using it.

Grig

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


Re: Test driven programming, was Re: VB to Python migration

2006-02-02 Thread Grig Gheorghiu
Thanks for the insightful answer, Magnus. I have a lot of stuff to
digest from your message :-) Maybe I'll continue the discussion on the
mailing list you mentioned.

Grig

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


Re: Best way to capture output of another command-line program in Win32?

2006-02-06 Thread Grig Gheorghiu
subprocess gets my vote too.

You can do something like:

from subprocess import call, Popen, PIPE, STDOUT

def run_cmd(cmd):
arglist = cmd.split()
p = Popen(arglist, stdout=PIPE, stderr=STDOUT)
output = p.communicate()[0]
return (p.returncode, output)

rc, output = run_cmd("python setup.py test")
if rc:
print "Command failed"
....sys.exit(rc)

Grig

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


Re: Python interest group software

2005-06-03 Thread Grig Gheorghiu
Try upcoming.org. In addition to the Web interface, they also offer a
REST-ful API that you can use from your own app.

Grig

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


Re: Sending mail from 'current user' in Python

2005-06-10 Thread Grig Gheorghiu
I use this function as a platform-independent way of finding out the
current user name:

def get_username():
if sys.platform == 'win32':
return win32api.GetUserName()
else:
return getpass.getuser()

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


Re: Sending mail from 'current user' in Python

2005-06-11 Thread Grig Gheorghiu
There may have been a reason for the win32 stuff at some pointbut I
don't remember and you're right, it does seem like getpass by itself
would do the job.

Grig

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


Re: How's python's web scraping capabilities (vs LWP) ...

2006-04-08 Thread Grig Gheorghiu
Check out twill <http://www.idyll.org/~t/www-tools/twill/>, which is
based on mechanize (<http://wwwsearch.sourceforge.net/>).

Grig

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