Thanks Chris and John. Chris, this worked perfectly with the ODBC
module that ships with Python Win32:
> column_names = [d[0] for d in cursor.description]
John, I've never heard of pyodbc but I'll have to look into it.
Thanks again.
Dana
--
http://mail.python.org/mailman/listinfo/python-list
Is there any way to retrieve column names from a cursor using the ODBC
module? Or must I, in advance, create a dictionary of column position
and column names for a particular table before I can access column
values by column names? I'd prefer sticking with the ODBC module for
now because it comes s
Is there a module available in the standard library, for Python 2.4
running on Windows, like "crypt" for Python 2.4 running on *nix
machines?
I need to store database passwords in a Python 2.4 script, but
obviously don't want them in clear text.
I'm looking for a reasonable level of security. Wha
> There are some examples of using the security descriptor objects in
> \Lib\site-packages\win32\Demos\security.
> Also, searching the Python-win32 mailing list should turn up some
> more code.
Thanks again Roger.
--
http://mail.python.org/mailman/listinfo/python-list
Could you give an example for listing security descriptors using the
win32security module? I looked at the documentation but found it
confusing. Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Roger, I'll give it a shot.
Is os.walk the best way (using standard library modules) to traverse
directory trees in Python 2.4 and beyond?
--
http://mail.python.org/mailman/listinfo/python-list
Is there a standard library module in Python 2.4 (Win32) that will
return directory permissions / ACLs (e.g. users, groups, and what
rights they have)?
Otherwise, I'm faced with sending "cacls dirName" commands via os.popen
as below, and then parsing and comparing the text output.
Basically, I'd
> Untestetd, but I'm pretty sure something like this will do.
> If you need more control, and on windows, try pywinauto
I do need it to run on Windows. I'll check out pywinauto. Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Is there a Python module that, given a URL, will grab a screenshot of
the web page it goes to? I'd like to be able to feed such a module a
list of URLs from a file.
Thanks very much.
--
http://mail.python.org/mailman/listinfo/python-list
This worked for me:
data = google.doGoogleSearch(searchTerm, restrict = 'countryUS')
How does restrict results by country at Google.com?
--
http://mail.python.org/mailman/listinfo/python-list
If I want to restrict search results by country, what precisely do I
need to include in searchTerm variable below?
I've tried:
searchTerm = 'restrict:countryUS blah blah'
searchTerm = ' countryUS blah blah'
Neither work. What am I doing wrong?
import google
data = google.doGoogleSearch(searchTe
I can handle making the connections and running queries, but what's the
best way to process table rows returned in Python? What about turning a
table definition into an object? Just looking for ways to be efficient,
since I know I will be hitting the same external RDBMS from Python and
regularly pr
Can you tell I miss Unix?
I want to write a Python script that, when launched, will choose a
random .sig (from a list of about 30 cool ones I've devised), and store
the .sig text in the Windows Clipboard, so I can then paste it into any
Windows application.
This way, it'll work for Outlook e-mail
bruno at modulix wrote:
> There's a Kant generator example in Dive Into Python:
> http://diveintopython.org/xml_processing/index.html
Thanks Bruno! Perhaps I could modify it to throw in some Hume and
Wittgenstein, mix it all up in a syntactic / semantic blender and
REALLY confuse people. Word Gam
I would like to learn how to roll my own filter ala early 90's filters
like Jive, Fudd, Kraut, Moron, etc, that take text as an input, and
re-writes the text adding general hilarity of various linguistic flavor
(depending on the filter).
I always loved running my philosophy papers, or anything tha
O'Reilly's Spidering Hacks books terrific. One problem. All the code
samples are in Perl. Nothing Pythonic. Is there a book out there for
Python which covers spidering / crawling in depth?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Andrew.
> I've been bugging ESRI about upgrading, and I'm sure others have too.
The beta of ArcGIS Desktop 9.2 ships with Python 2.4, so I imagine the
release of ArcGIS Desktop 9.2 this summer will also ship with Python
2.4. I've read threads recently on the geoprocessing / scripting
suppo
Magnus Lycka wrote:
> Are you using an old version of ESRI software, or are
> they shipping a product with an ancient version of Python?
We're using the latest and greatest ArcGIS Desktop product, which is at
release 9.1. Evidently they chose to use Python 2.1 to ensure a "silent
install" when Arc
>[EMAIL PROTECTED] wrote:
> dananrg> Are you saying I'm getting the "L" as an artifact of printing?
>
> No, you're getting the "L" because you're printing a long integer. If you
> execute
>
> x = 872L
> y = 872
>
> a
Steven, does your technique fix my problem? Would that delete the
objects I've created within a program if I suffix my code with it?
--
http://mail.python.org/mailman/listinfo/python-list
> If you actually get a suffixed L in the resulting text file, you
> are using a strange way to convert your data to text. You aren't
> simply printing lists or tuples are you? Then other types, such as
> datetime objects will also look bizarre. (Not that the ancient
> odbc would support that...)
>
Sorry for the double-thanks Frank.
I'm using Python 2.1 for Win32 and import datetime fails.
Does the datetime module come standard with later releases of Python?
If so, which release? If not, will datetime with with Python 2.1, if it
will, where can I get it? I'm still such a newbie with Python
Thanks Frank. Much appreciated. I will give it a go.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Frank. Much appreciated. I will give it a go.
--
http://mail.python.org/mailman/listinfo/python-list
Great, thanks Diez! Should I just use str(n) to convert it to a format
I can write out to a flat file? I'm also struggling with the strange
date object format that the ODBC module returns when I fetch rows. I
need to convert that to a text string in a format that a mainframe
flatfile database requi
Been using the ODBC module for Python 2.1 (Win32) and had another
question. When I return data from date columns, it's in a strange
object form, e.g. (don't have the output in front
of me>.
What's an easy way to convert date objects into a human-readable
string? I'm using this module to extract d
I was messing around with the native ODBC module (I am using Python in
a Win32 environment), e.g:
import dbi, odbc
...and it seems to meet my needs. I'd rather use a module that comes
natively with Python if it works (don't care about performance in this
particular use case; just that it works).
> PythonWin is just an IDE. For what reason you have to delete all objects by
> yourself? Garbage collector is there for that :)
I think the garbage collector is on strike. :-)
Example:
# 1st execution
a = [1,2,3]
print a
>>> [1,2.3]
program ends.
Then I comment out a = [1,2,3] and run the pr
In PythonWin, is there any way to bulk-delete all objects without using
"del object" for each, and without having to exit out of PythonWin?
--
http://mail.python.org/mailman/listinfo/python-list
The other thing I didn't do a good job of explaining is that I want to
have a layer of abstraction between the underlying RDBMS and the
business logic. It's the business logic I want to use Python for, so
that would stay roughly the same between RDBMS changes, if we ever have
an RDBMS change. I agr
Thanks Gerhard and Magnus. Magnus, thanks for the references. I will
follow up on those.
I was messing around with the native ODBC module you mentioned (I am
using Python in a Win32 environment), e.g:
import dbi, odbc
...and it seems to meet my needs. The only issue I've had so far is
retrieving
Also, what's the difference between something like cx_oracle and an
ODBC module? If I were to use an ODBC module (not trying to torture
myself here, I promise, but I just want to see what alternatives exist
and how they work).
--
http://mail.python.org/mailman/listinfo/python-list
What would be the next best Oracle database module for Python next to
cx_oracle? I'd like to compare two and choose one, just for the sake of
seeing how two modules doing the same thing operate.
Also, does installing cx_oracle create registry entries or require
admin privs on a Windows XP machine?
How about DBdesigner4 or Dia as free ER diagrammers?
[EMAIL PROTECTED] wrote:
> Thanks Olivier and Jonathan.
>
> Do either of you, or anyone else, know of a good open source data
> modeling / ER-diagram / CASE tools? I'd like to be able to build
> relatively simple schemas in one open source too
Seems like most web hosting providers support MySQL, but not
PostgreSQL. I need a web hosting account that supports PostgreSQL for a
particular personal project I'm working on (as well as Python, natch),
since PostGIS runs only on PostgreSQL. PostGIS is a nice open source
spatial database extension
Thanks Olivier and Jonathan.
Do either of you, or anyone else, know of a good open source data
modeling / ER-diagram / CASE tools? I'd like to be able to build
relatively simple schemas in one open source tool and be able to create
a database on different platforms as needed (e.g. MySQL, PostgreSQ
I have Python 2.1 / PythonWin 2.1 installed on my machine because I
need it for use with ESRI's ArcGIS Desktop software, but I want to play
with a more recent version of Python.
Is it safe to install more than one version of Python / PythonWin on
the same machine? I don't want the latest release t
I'm a little confused about what's out there for database modules at:
http://python.org/topics/database/modules.html
What I'd like to do is use Python to access an Oracle 9.X database for
exporting a series of tables into one aggregated table as a text file,
for import into a mainframe database
38 matches
Mail list logo