On 2/22/07, Nagendra Singh <[EMAIL PROTECTED]> wrote:
> How can I get python to display
> the results in the interactive window or what is the right way to do this.
Use os.popen:
http://docs.python.org/lib/os-newstreams.html#os-newstreams
--
- Rikard.
_
Mark Bystry wrote:
> Ok. I'm not sure what programming language I want to try this in...since I'm
> not sure how to write
> this in any language (thought I'd give python a try.
>
> Here's my problem: I have a directory full of about 2,000 pdf files. I want
> to be able to add the
> same comm
[EMAIL PROTECTED] wrote:
> Am trying to convert a C program with a GOTO in it to Python and was
> wondering
> how many loops a Python "break" jumps out of. Here is the C pseudo code
>
> if (test_1) {
> for (;;) {
> if (test_2) {
> do_stuff();
> } else if (test_2)
Hi Kent,
Thank you
I was able to find it in the end.
It was at the bottom of the file I was editing
Lance
Kent Johnson wrote:
> Lance Haig wrote:
>> I am debugging a script that was written by someone else and I was
>> wondering if there is a way to determine where a function or module
>
Lance Haig wrote:
> I am debugging a script that was written by someone else and I was
> wondering if there is a way to determine where a function or module is
> imported from
You can use the __file__ attribute of a module:
In [9]: csv.__file__
Out[9]:
'/Library/Frameworks/Python.framework/Vers
"Mark Bystry" <[EMAIL PROTECTED]> wrote
> Well that's awesome. Thanks for the code. Unfortunately
> I cannot get it to run. After I installed the win32 extensions
> for python...
ISTR that before uing Windows scripting you have to enable it.
There is a script in the library and a readme file tel
Adam Pridgen wrote:
> Thanks in advance for your help.
> I am trying to pickle a class, but I want to exclude function objects
> for obvious reasons. How do I determine if a python object is a
> function, specifically when using isinstance()? I am not sure what a
> type or instance a Python 'func
"Lance Haig" <[EMAIL PROTECTED]> wrote
>I am debugging a script that was written by someone else and I was
> wondering if there is a way to determine where a function or module
> is
> imported from
>>> import time
>>> print time
>>> time.__file__
'/usr/lib/python2.4/lib-dynload/time.dll'
>>>
H
<[EMAIL PROTECTED]> wrote
> Am trying to convert a C program with a GOTO in it
> to Python and was wondering how many loops a
> Python "break" jumps out of.
Just the immediately enclosing loop.
You can fake higher level breaks by setting
a global variable and immediately after the
exit fro
Tim Golden wrote:
> Slightly bizarrely, it works fine for me on a different
> computer (my laptop). Both are Win2K. The only help I
> could find on the error code suggested a permission issue,
> which isn't likely. That said, I have experienced a few
> funnies with the Python script writing the new
Mark Bystry wrote:
> Well that's awesome. Thanks for the code. Unfortunately I cannot get it to
> run. After I installed
> the win32 extensions for python...I get this error when trying to run.
>
> Traceback (most recent call last):
>File "C:\test.py", line 4, in
> props.SummaryPropert
I have a directory that is filled with DICOM files that I obtained by using the
Offis DICOM tool kit.
The dictionary file I have is not included in the DICOM file. I have a flat
file that has all of the DICOM fields defined as a python dictionary. In my
initial post I
included only the first s
I am debugging a script that was written by someone else and I was
wondering if there is a way to determine where a function or module is
imported from
Thanks
Lance
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Well that's awesome. Thanks for the code. Unfortunately I cannot get it to run.
After I installed
the win32 extensions for python...I get this error when trying to run.
Traceback (most recent call last):
File "C:\test.py", line 4, in
props.SummaryProperties.Category = "CAT69"
File "C
On 2/22/07, Nagendra Singh <[EMAIL PROTECTED]> wrote:
What it does is that opens and closes the command window really fast and
displays a value of 1 in the interpreter. How can I get python to display
the results in the interactive window or what is the right way to do this.
I assume you're
Mark Bystry wrote:
> getting even closer. figure out how to write to a file but still in vbscript.
>
> dsofile_write.vbs
> code:
> Set objFile = CreateObject("DSOFile.OleDocumentProperties")
> objFile.Open("D:\test.txt")
> objFile.SummaryProperties.Category = "CAT54"
> objFile.Save
In Python, tha
Hi,
Take a lok=ok at the module named subprocess. You can catch the output
of invoked programs with this.
There is also a module called "commands" but it its not available in
windows.
Hugo
___
Tutor maillist - Tutor@python.org
http://mail.python
On Thu, 22 Feb 2007 11:56:19 -0700
"Andrew Liimatta" <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
>
> I am having a hard time figuring something out.
>
> I have Files that are written in DICOM format. I want to be able
> to pull out select elements from the header of these files
>
> I have a dict
Thanks in advance for your help.
I am trying to pickle a class, but I want to exclude function objects
for obvious reasons. How do I determine if a python object is a
function, specifically when using isinstance()? I am not sure what a
type or instance a Python 'function' originates from.
The be
> I have Files that are written in DICOM format. I want to be able to pull
> out select elements from the header of these files
for those who aren't in the industry, DICOM files are a digital
imaging format typically used by the medical industry. it contains an
embedded JPG and lots of patient/
Hi,
I am trying to learn Python and have no prior programming experience. My
problem is that I am trying to call an .exe through Python, the exe gives
certain information about a file when I simply type it at the command
prompt, something like C:> getinfo C:\Singh\abc.bcd and it displays the
in
Hello,
I am having a hard time figuring something out.
I have Files that are written in DICOM format. I want to be able to pull out
select elements from the header of these files
I have a dictionary file that contains enteries like this.
dicomdict = {
# meta tags
(0x0002,0x0001):('OB', "Fil
getting even closer. figure out how to write to a file but still in vbscript.
dsofile_write.vbs
code:
Set objFile = CreateObject("DSOFile.OleDocumentProperties")
objFile.Open("D:\test.txt")
objFile.SummaryProperties.Category = "CAT54"
objFile.Save
Mark
Mark Bystry wrote the following on 2/22/200
I think I'm getting close but with the wrong programming language...
filename: test.vbs
code:
Set objFile = CreateObject("DSOFile.OleDocumentProperties")
objFile.Open("C:\test.txt")
Wscript.Echo "Category: " & objFile.SummaryProperties.Category
With the help of dsofile.dll the above reads the "Ca
Actually no. I want to change the Windows metadata. This is the same metadata
that is on all files.
It isn't PDF specific. (I wonder if Linux is the same)
Basically, I can select 100's of file in a dir, right-click, properties,
summary, and add something
to the Category field. This obviously a
Am trying to convert a C program with a GOTO in it to Python and was wondering
how many loops a Python "break" jumps out of. Here is the C pseudo code
if (test_1) {
for (;;) {
if (test_2) {
do_stuff();
} else if (test_2) {
for (ip=m1+m2+1;ip<=m;ip++) {
> Here's my problem: I have a directory full of about 2,000 pdf files. I want
> to be able to add the
> same comment to the "Category" field of each file (in the document properties
> of the file). So I am
> looking to batch process pdf files (or any filetype, i guess) to add some
> metadata.
Ok. I'm not sure what programming language I want to try this in...since I'm
not sure how to write
this in any language (thought I'd give python a try.
Here's my problem: I have a directory full of about 2,000 pdf files. I want to
be able to add the
same comment to the "Category" field of each
Thank you Bob and Alan. That helps alot. I will store text as
files and index them somehow in the database (and yes Alan's
section on SQL on his site is a great resource for this). -Che
_
The average US Credit Score is 675. The cos
Thanks, Alan.
That makes it a lot easier to understand. I'll play around with other
examples to see what it is doing.
Johan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Alan Gauld
Sent: 22 February 2007 11:46 AM
To: tutor@python.org
Subject: Re: [Tut
"Chae M" <[EMAIL PROTECTED]> wrote
> Is it a reasonable idea to store text (a few hundred words each
> record) in a database?
That depends on what you want to do with it.
If you only wanmt to store the data and maybe do some searches
for words etc then no, a simply folder fiull of text files will
"Johan Geldenhuys" <[EMAIL PROTECTED]> wrote
> Would somebody care to explain what is happening in this process?
>
> def intToBin(self, x, count=8):
>return "".join(map(lambda y:str((x>>y)&1),
> range(count-1, -1, -1)))
"".join() turns a list into a string
map() returns a list where e
32 matches
Mail list logo