Re: Kill process based on window name (win32)

2006-08-11 Thread Roger Upole
drodrig wrote: > Hi. > > I am trying to close/kill all processes that show visible windows on > Windows XP. So far I've created a script that uses win32gui.EnumWindows > to iterate through all windows, check for which windows are visible, > then send a WM_CLOSE message to the window to request tha

[OT] John Salerno (was: and i thought windows made a mess of files...)

2006-08-11 Thread Alan Connor
On alt.os.linux, in <[EMAIL PROTECTED]>, "John Salerno" wrote: > Path: > text.usenetserver.com!atl-c01.usenetserver.com!news.usenetserver.com!atl-c03.usenetserver.com!news.usenetserver.com!news.glorb.com!news.astraweb.com!router2.astraweb.com!not-for-mail > Date: Fri, 11 Aug 2006 22:19:06 -0400 >

Re: Regd:Video Converter Programming

2006-08-11 Thread Tim Roberts
"Ch3ru5" <[EMAIL PROTECTED]> wrote: > > Thanks all for replies . I am sorry for a confusion of the question . >But what i wanted to know is in general in any programming language , >how you go about writing a video converter . The problem is that converting between video formats requires LOTS of

Kill process based on window name (win32)

2006-08-11 Thread drodrig
Hi. I am trying to close/kill all processes that show visible windows on Windows XP. So far I've created a script that uses win32gui.EnumWindows to iterate through all windows, check for which windows are visible, then send a WM_CLOSE message to the window to request that it closes. Of course, not

Re: help with c <-> python buffer transfer

2006-08-11 Thread John Machin
[EMAIL PROTECTED] wrote: > This is the part I need help with. I've also used PyBuffer_... > subroutines which gave similar problems. Thanks for all of your other > comments, but I was hoping someone could just tell me what was wrong > with the code without having to worry about all of the other

Python/Tk not working in Linux

2006-08-11 Thread BinnyVA
I am using Fedora Core 3 Linux and I have a problem with Tk in Python. Whenever I try to run a tk script, I get the error... --- Traceback (most recent call last): File "Tk.py", line 1, in ? from Tkinter import * File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 38, in ? import _

Re: iterator wrapper

2006-08-11 Thread Simon Forman
alf wrote: > Simon Forman wrote: > > >class LW(object): # ListWrapper > >>... def __init__(self, i): > >>... self.theiter = i > >>... def next(self): > >>... return [self.theiter.next()] > > > I hoped one lamda would take care of it but looks like it is a simplest > choi

Re: help with c <-> python buffer transfer

2006-08-11 Thread [EMAIL PROTECTED]
John Machin wrote: > [EMAIL PROTECTED] wrote: > > How does one transfer a buffer object from python -> c and back again > > (assuming the data gets modified)? > > I can't seem to get this or anything else to work, but am clueless as > > to what I'm doing wrong > > > > > > using namespace boost::pyt

Re: long(Decimal) performance

2006-08-11 Thread ajaksu
Sorry... I'm ashamed to submit such awful code in my first post. Let me try again... from decimal import Decimal def dec2long(number): """ Convert decimal.Decimal to long """ longstring = str(number) if "e" in longstring: radix, exponent = longstring.split("e") elif "E" in

long(Decimal) performance

2006-08-11 Thread ajaksu
Hello c.l.p.ers :) Running long(Decimal) is pretty slow, and the conversion is based on strings. I'm trying to figure out whether there is a good reason for using strings like in decimal.py (that reason would be bound to bite me down the road). This converts Decimal to long and is much faster in m

Re: hide python code !

2006-08-11 Thread Grant Edwards
On 2006-08-12, Ben Finney <[EMAIL PROTECTED]> wrote: > The only thing I can see in there you might object to is the "you and > others like you". Here, "you" is "Python programmers". By hiding the > source code to their programs, they will hide it from any Python > programmers. And hiding Python c

Re: hide python code !

2006-08-11 Thread Philippe Martin
Bayazee wrote: > Hi, > ThnaX for Your Answers ... > i am an open source programmer ... ! and i never like to write a closed > source app or hide my codes ! it just a question that i must > answer/solve it! > one of site ( www.python.ir ) users asked this question ! but > unfortunately i have't any

Re: hide python code !

2006-08-11 Thread Bayazee
Hi, ThnaX for Your Answers ... i am an open source programmer ... ! and i never like to write a closed source app or hide my codes ! it just a question that i must answer/solve it! one of site ( www.python.ir ) users asked this question ! but unfortunately i have't any solution to it ! so i ask it

Re: semi-Newbie question

2006-08-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, len <[EMAIL PROTECTED]> wrote: . . . >I have done some more reading and I think the code I need is as >follows; > >mycode = "TagToSQL['mySQLfieldname'] = Tagfile['Value']" >exec mycode > >This is

Re: iterator wrapper

2006-08-11 Thread Paul Rubin
alf <[EMAIL PROTECTED]> writes: > > |>> I = ([n] for n in i) > > This is nice but I am iterating thru hude objects (like MBs) so you know ... I don't understand the objection-- the above is entirely correct and produces the same iterator you'd get from def wrap(i): for x in i:

Re: Learning Python

2006-08-11 Thread Ben Finney
"Dr. Pastor" <[EMAIL PROTECTED]> writes: > #--- > # Name:SendMoreMoney.py > # Purpose: A solution to the SEND+MORE=MONEY puzzle. > # > # Author: Dr. Pastor > # > # Copyright: (c) Dr. Pastor 2

Re: hide python code !

2006-08-11 Thread Ben Finney
"Fuzzyman" <[EMAIL PROTECTED]> writes: > Terry Reedy wrote: > > Let's clarify the question: "Dear Python programmers: please tell > > me for free how I can hide my code from you and others like you." > > And categorising their intent in this way I don't see how this categorises intent at all. It

Re: iterator wrapper

2006-08-11 Thread alf
Simon Forman wrote: >class LW(object): # ListWrapper >>... def __init__(self, i): >>... self.theiter = i >>... def next(self): >>... return [self.theiter.next()] I hoped one lamda would take care of it but looks like it is a simplest choice. > |>> I = ([n] for n in

Re: Learning Python

2006-08-11 Thread Gabriel Genellina
At Friday 11/8/2006 18:04, Dr. Pastor wrote: Attempting to learn Python; I constructed the module listed below. I would like to make it shorter, faster, more "Python like". (Windows XP, Pro.) Many thanks for any advice! ... #--

Re: hide python code !

2006-08-11 Thread Ben Finney
"Fuzzyman" <[EMAIL PROTECTED]> writes: > Paul Boddie wrote: > > Well, given the pace of technological development and the > > disregard in some environments for perpetual backward > > compatibility, how much of your infrastructure would you implement > > in vendor-supplied binaries, especially whe

Re: iterator wrapper

2006-08-11 Thread Simon Forman
John Machin wrote: > alf wrote: > > Hi, > > > > I have a following task: let's say I do have an iterator returning the > > some objects: > > > > >>i= > > >>i.next() > > 1 > > >>i.next() > > 'abgfdgdfg' > > >>i.next() > > > > > > > > For some reason I need to wrap thos objects with a list. I th

Re: kerberos under windows

2006-08-11 Thread Roger Upole
Kamil Malinka wrote: > Hi > > i'd like to know, is there any package like pykpass for windows? Or how to > use this under windows. I need to authenticate > users with kerberos under windows environment and have no idea how. > Thanks for help. > > Kamil Malinka The Pywin32 package (http://sourcefo

Re: seeking the "Hello World" of Packages

2006-08-11 Thread Gabriel Genellina
At Friday 11/8/2006 14:48, Bell, Kevin wrote: I'm trying to get an idea of how packages work and I've read about it in the Py Tutorial and Nutshell, but I'm still craving a concrete example that I can poke through. Does anyone have a really basic package that does very little that I could look

Re: iterator wrapper

2006-08-11 Thread John Machin
alf wrote: > Hi, > > I have a following task: let's say I do have an iterator returning the > some objects: > > >>i= > >>i.next() > 1 > >>i.next() > 'abgfdgdfg' > >>i.next() > > > > For some reason I need to wrap thos objects with a list. I thought I > could have a smart lamda or simple funct

Re: PIL Image transform

2006-08-11 Thread Ben C
On 2006-08-11, Dean Card <[EMAIL PROTECTED]> wrote: >> This looks like a correct description of the sources: >> >> In Image.py: >> >> elif method == PERSPECTIVE: >># change argument order to match implementation >>data = (data[2], data[0], data[1], >>data[5], data[3], >>

Re: hide python code !

2006-08-11 Thread Fuzzyman
Terry Reedy wrote: > "Fuzzyman" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I never understand the knee-jerk reaction on this mailing list to > > answer people who ask this question by telling them they don't really > > want to do it... > > Let's clarify the question: "Dear

Re: help with c <-> python buffer transfer

2006-08-11 Thread John Machin
[EMAIL PROTECTED] wrote: > How does one transfer a buffer object from python -> c and back again > (assuming the data gets modified)? > I can't seem to get this or anything else to work, but am clueless as > to what I'm doing wrong > > > using namespace boost::python; Looks like C++, not C. > > s

iterator wrapper

2006-08-11 Thread alf
Hi, I have a following task: let's say I do have an iterator returning the some objects: >>i= >>i.next() 1 >>i.next() 'abgfdgdfg' >>i.next() For some reason I need to wrap thos objects with a list. I thought I could have a smart lamda or simple function class yielding following result:

Re: Boost Install

2006-08-11 Thread Neil Hodgson
Jeff: > I have attempted to follow some online install directions which do not > seem to work. I am using VS2005. VS2003 is more likely to work since that was the compiler used for the python executables distributed by python.org. > I have tried, bjam "--with-python-version[=2.4] and just g

Re: sys.platform documentation?

2006-08-11 Thread Simon Forman
|>> platform.platform() 'Linux-2.6.15-26-386-i686-with-debian-testing-unstable' |>> platform.uname() ('Linux', 'garbage', '2.6.15-26-386', '#1 PREEMPT Thu Aug 3 02:52:00 UTC 2006', 'i686', '') Ubuntu 6.06 LTS - the Dapper Drake - released in June 2006. [EMAIL PROTECTED]:~ $ cat /proc/cpuinfo pro

Re: Tab delimited file

2006-08-11 Thread Gabriel Genellina
At Friday 11/8/2006 11:41, Colin Wildsmith wrote: >I am making a gui for the purpose that I can >change the values in a list of different >criteria which is found in a text file, such as: > >Name(tab)rating(tab)breast size(tab)occurrences >… >… >… > >However as far as I know Python does not allo

help with c <-> python buffer transfer

2006-08-11 Thread tkirke
How does one transfer a buffer object from python -> c and back again (assuming the data gets modified)? I can't seem to get this or anything else to work, but am clueless as to what I'm doing wrong using namespace boost::python; static PyObject * proc_buf(PyObject *self, PyObject *args) { P

Re: datetime to timestamp

2006-08-11 Thread John Machin
Tim Peters wrote: > [Simen Haugen] > >>> How can I convert a python datetime to a timestamp? It's easy to convert > >>> a timestamp to datetime (datetime.datetime.fromtimestamp(), but the > >>> other way around...?) > > [John Machin] > >> Is the timetuple() method what you want? > >> > >> #>>> imp

Re: Read a file with open command

2006-08-11 Thread jean-jeanot
Sorry, I regret my reaction. Jean-jeanot AlbaClause a écrit : > jean-jeanot wrote: > > > Dear Sybrel, > > > > I am delighted to know that you have been enlighted through my > > question. > > I am aware of my stupidity and I would say of my ignorance.If all > > Python users were not ignorant I s

Learning Python

2006-08-11 Thread Dr. Pastor
Attempting to learn Python; I constructed the module listed below. I would like to make it shorter, faster, more "Python like". (Windows XP, Pro.) Many thanks for any advice! ... #--- # Name:SendMoreMoney.py #

Using a dictionary to pass data to/from embedded python functions

2006-08-11 Thread wardm
I have created a Dict object in a C++ App that calls (embedded) Python functions. The Dict is to be used to pass variable data between the C++ App and the python functions. However I cannot get the Python functions to 'see' the Dict created in the C++ App. The C++ app creates the Dict using th

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread Chris Lambacher
If you mean that you are building Python2.4 and get an error during the configure step, you need to install libc6-dev. You are likely to find lots of issues unless you install some basic developer tools. There are some metapackages that get the right things for you, but I can't remember what it i

Re: What's the cleanest way to compare 2 dictionary?

2006-08-11 Thread Paddy
I have gone the whole hog and got something thats run-able: dict_diff.py= from pprint import pprint as pp a = {1:{'1':'1'}, 2:{'2':'2'}, 3:dict("AA BB CC".split()), 4:{'4':'4'}} b = { 2:{'2':'2'}, 3:dict("BB CD EE".split()), 5:{'5':'5'}} def recor

Help with cx_freeze module

2006-08-11 Thread diffuser78
Has anybody written a file for cx_freeze. I am running Ubuntu Linux and downloaded version for Python2.4. When I run it I get an error saying that I dont have GLIBC_2.4. I searched around but couldn't find a .deb for Ubuntu, I couldnt find this in Synaptic too. Any clues or pointers as to how to g

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread diffuser78
Has anybody written a file for cx_freeze. I am running Ubuntu Linux and downloaded version for Python2.4. When I run it I get an error saying that I dont have GLIBC_2.4. I couldnt find this in Synaptic too. Any clues ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Read a file with open command

2006-08-11 Thread AlbaClause
jean-jeanot wrote: > Dear Sybrel, > > I am delighted to know that you have been enlighted through my > question. > I am aware of my stupidity and I would say of my ignorance.If all > Python users were not ignorant I suppose the Python group would be > superfluous. I would suggest that if if you

Re: hide python code !

2006-08-11 Thread Philippe Martin
Bayazee wrote: > hi > can we hide a python code ? > if i want to write a commercial software can i hide my source code from > users access ? > we can conver it to pyc but this file can decompiled ... so ...!! > do you have any idea about this ...? > > --- > Fir

Re: having issues Installing Python 2.5b3 on Windows XP

2006-08-11 Thread Bucco
I'm getting closer now. I figured out that when I typed python in cmd.exe window it was trying to run the cygwin version of python. I removed that link and cmd.exe now finds the correct version. Therefore, this is not a bug. However, someone should add a caution in the installation instructions

Re: having issues Installing Python 2.5b3 on Windows XP

2006-08-11 Thread [EMAIL PROTECTED]
Bucco wrote: > The python 2.4 version msi did no better. Please help. I do not > really want to go back to Active State Python. > > > Thanks:) > > SA > > > Bucco wrote: > > I > > am going to try to install python 2.4 with the msi installer and see if > > I have the same issue with that version.

Re: What's the cleanest way to compare 2 dictionary?

2006-08-11 Thread John Henry
Thank you. That works. Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, John Henry > wrote: > > > When I do it under 2.3, I get: > > > > common_eq = set(k for k in _common if a[k] == b[k]) > >^ > > SyntaxError: invalid syntax > > > > Don't know wh

Re: having issues Installing Python 2.5b3 on Windows XP

2006-08-11 Thread [EMAIL PROTECTED]
Bucco wrote: > The python 2.4 version msi did no better. Please help. I do not > really want to go back to Active State Python. > > > Thanks:) > > SA > > > Bucco wrote: > > I > > am going to try to install python 2.4 with the msi installer and see if > > I have the same issue with that version.

Re: Inconsistency producing constant for float "infinity"

2006-08-11 Thread Tim Peters
[Peter Hansen] >> I'm investigating a puzzling problem involving an attempt to >> generate a constant containing an (IEEE 754) "infinity" value. (I >> understand that special float values are a "platform-dependent >> accident" etc...) [also Peter] > ... > My guess about marshal was correct. Yup.

Re: hide python code !

2006-08-11 Thread Paul Boddie
Ben Sizer wrote: > > Imagine if you were the single-person developer of a small application > that did something quite innovative, and charged a small fee for your > product. Now imagine you were practically forced to make your algorithm > obvious - a couple of months later, Microsoft bring out a f

Re: PIL Image transform

2006-08-11 Thread Dean Card
> This looks like a correct description of the sources: > > In Image.py: > > elif method == PERSPECTIVE: ># change argument order to match implementation >data = (data[2], data[0], data[1], >data[5], data[3], >data[4], >data[6], >data[7]) > >

Re: Read a file with open command

2006-08-11 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, jean-jeanot wrote: > Sorry, but the access mode is not binary with XP Windows. But ods files are binary so you better open them as binary files. Windows does a "magical" translation of line ending bytes and stops processing a file if it hits a \x26 byte if the file was op

Re: having issues Installing Python 2.5b3 on Windows XP

2006-08-11 Thread Bucco
The python 2.4 version msi did no better. Please help. I do not really want to go back to Active State Python. Thanks:) SA Bucco wrote: > I > am going to try to install python 2.4 with the msi installer and see if > I have the same issue with that version. If anyone else has any ideas > ple

Re: seeking the "Hello World" of Packages

2006-08-11 Thread faulkner
yep, that's all a package is. if you have trouble importing, check your PYTHONPATH environment variable, or sys.path. Bell, Kevin wrote: > I'm trying to get an idea of how packages work and I've read about it in > the Py Tutorial and Nutshell, but I'm still craving a concrete example > that I can

Re: hide python code !

2006-08-11 Thread Terry Reedy
"Fuzzyman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I never understand the knee-jerk reaction on this mailing list to > answer people who ask this question by telling them they don't really > want to do it... Let's clarify the question: "Dear Python programmers: please tell

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread Grant Edwards
On 2006-08-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Every help is appreciated. Thanks. > >> You could freeze the Python program. That'll ensure all the required >> files are packaged with your program, including Python itself. If you >> build a RPM from that, your users will be quite h

Re: What's the cleanest way to compare 2 dictionary?

2006-08-11 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, John Henry wrote: > When I do it under 2.3, I get: > > common_eq = set(k for k in _common if a[k] == b[k]) >^ > SyntaxError: invalid syntax > > Don't know why that is. There are no generator expressions in 2.3. Turn it into a list

seeking the "Hello World" of Packages

2006-08-11 Thread Bell, Kevin
I'm trying to get an idea of how packages work and I've read about it in the Py Tutorial and Nutshell, but I'm still craving a concrete example that I can poke through. Does anyone have a really basic package that does very little that I could look at? What I've gathered thus far is that a packag

Re: What's the cleanest way to compare 2 dictionary?

2006-08-11 Thread John Henry
John Machin wrote: > John Henry wrote: > > John, > > > > Yes, there are several scenerios. > > > > a) Comparing keys only. > > > > That's been answered (although I haven't gotten it to work under 2.3 > > yet) > > (1) What's the problem with getting it to work under 2.3? > (2) Why not upgrade? > L

Including python and wxPython in distutils

2006-08-11 Thread diffuser78
I wrote a small app in python and used wxPython in it. Now, I am trying to create an .rpm file for linux RedHat Distro. I want the ability in my installer to install python2.4 and wxPython too along with the .py files which are in the project. I am trying to use distutils. Can anybody give some po

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread diffuser78
Hi, How can we freeze the python program and how will it ensure that all the python files are packages with the programs (including python and wxPython). Can anybody give me some pointers on this. Every help is appreciated. Thanks. > You could freeze the Python program. That'll ensure all the re

Re: Read a file with open command

2006-08-11 Thread jean-jeanot
Dear Sybrel, I am delighted to know that you have been enlighted through my question. I am aware of my stupidity and I would say of my ignorance.If all Python users were not ignorant I suppose the Python group would be superfluous. I would suggest that if if you think that a question is supid ple

Re: PIL Image transform

2006-08-11 Thread Ben C
On 2006-08-09, Dean Card <[EMAIL PROTECTED]> wrote: > Okay, so here is the situation. I have need to do some on-the-fly image > creation. I have everything working great except for the last part of it, > applying a perspective type transform to the image. The transform will take > a rectangul

Re: Tkinter module not found

2006-08-11 Thread Philippe Martin
Shuaib wrote: > Hey, > > Even though I freshly installed Tcl and Tk, python still seem to have > problems accessing Tkinter module. Here is what says when I do "import > Tkinter" > > == > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named Tkinter > == >

Re: Read a file with open command

2006-08-11 Thread Tim Williams
On 11 Aug 2006 09:39:23 -0700, jean-jeanot <[EMAIL PROTECTED]> wrote: > Anyway many thanks.Here is the program: > > >>> file_obj= open ("D:/Mes documents/ADB Anna.ods",'r') > >>> s = file_obj > >>> s.readlines() Please remember not to top-post :) Try this >>> s = open ("D:/Mes documents/ADB Ann

having issues Installing Python 2.5b3 on Windows XP

2006-08-11 Thread Bucco
I installed python 2.5b3 on my windows XP sp2 box without any issues. I can double click the python program, and idle comes up in the command line window. However when I run python from the command line program cmd.exe, I get a pop-up window with the following error: 16 bit Windows Subsystem

Re: using python to edit a word file?

2006-08-11 Thread Anthra Norell
No one could do it any better. Good for you! - Frederic - Original Message - From: "John Salerno" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Friday, August 11, 2006 4:08 PM Subject: Re: using python to edit a word file? > Anthra Norell wrote: > > John, > > > > I ha

Re: Read a file with open command

2006-08-11 Thread jean-jeanot
Sorry, but the access mode is not binary with XP Windows. Finally for reading the file it is necessary to use a slash or a double backslash. If the file is a simple textfile, using a backslash is perhaps not recommended but it is functionning. Anyway many thanks.Here is the program: >>> file_obj=

Automate logging into page

2006-08-11 Thread david brochu jr
I am trying to automate logging a website and have been unsuccessful. The code below is supposed to log me into the site, but changing the username/password to an incorrect combination does not cause an error or crash to be seen. My goal is to log into this page and save the cookie from the page so

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread diffuser78
I saw some examples and understood for most part how to write a setpu.py. Since I want to bundle python and wxPython along with my application...how can I do that. Any code gurus can throw some pointers. Every help is appreciated. Bruno Desthuilliers wrote: > Look for distutil and EasyInstall

Re: hide python code !

2006-08-11 Thread Ben Sizer
Paul Boddie wrote: > Ben Sizer wrote: > > > > It's worth remembering that there is a massive amount of software that > > has nothing to do with 'infrastructure', that won't need to be > > maintained, or upgraded. Examples include most retail software for the > > home or small office, and most enter

Re: some n00b question

2006-08-11 Thread Omar
Gerard Flanagan wrote: > Omar wrote: > > I'm learning how to program python. a few questions > > > > a) I'm mostly interested in creating exe's that have to do with music > > -- things to help me keep track of chord progressions, transpositions, > > etc. can anyone point me in the direction of r

Re: some n00b question

2006-08-11 Thread Gerard Flanagan
Omar wrote: > I'm learning how to program python. a few questions > > a) I'm mostly interested in creating exe's that have to do with music > -- things to help me keep track of chord progressions, transpositions, > etc. can anyone point me in the direction of resources on this? > > b) I'm also in

Re: some n00b question

2006-08-11 Thread Larry Bates
Omar wrote: > I'm learning how to program python. a few questions > > a) I'm mostly interested in creating exe's that have to do with music > -- things to help me keep track of chord progressions, transpositions, > etc. can anyone point me in the direction of resources on this? > > b) I'm also

Re: Boost Install

2006-08-11 Thread missdeer
You should set PYTHON_ROOT & PYTHON_VERSION environment variable first, then set the VC toolset path, compile bjam.exe yourself and run bjam with -sTOOLS parameter. It seems Boost has not been totally tested under VS2005, but works fine with VS2003. Good luck!   missdeer 20

Re: Inconsistency producing constant for float "infinity"

2006-08-11 Thread Peter Hansen
Sybren Stuvel wrote: > Peter Hansen enlightened us with: > >>I'm investigating a puzzling problem involving an attempt to >>generate a constant containing an (IEEE 754) "infinity" value. (I >>understand that special float values are a "platform-dependent >>accident" etc...) > > Why aren't you si

Re: Tab delimited file

2006-08-11 Thread Tim Chase
> However as far as I know Python does not allow you to easily change a > specific line in a text file. You have to place the whole file to memory, > change what you need to and then write the file back after deleting the > previous information. > > Assuming this is true, how do i find where the

Re: hide python code !

2006-08-11 Thread Paul Boddie
Ben Sizer wrote: > > It's worth remembering that there is a massive amount of software that > has nothing to do with 'infrastructure', that won't need to be > maintained, or upgraded. Examples include most retail software for the > home or small office, and most entertainment software. Developers o

Re: some n00b question

2006-08-11 Thread Omar
John Salerno wrote: > Omar wrote: > > > b) I'm also interested in created GUI's sooner rather than later. Can > > anyone point me to a fast track to doing GUI's on python? > > I recommend reading wxPython in Action. It's a great starter and > reference to the wxPython GUI toolkit. Tkinter is usua

Re: using an already running COM object with Dispatch

2006-08-11 Thread jiccab
Roger Upole wrote: > "jiccab" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Greetings. > > > > with the following code, > > > > olApp = Dispatch("Outlook.Application") > > > > I am capable of getting a new instance of Outlook running. I would > > like to be able to use the insta

Tab delimited file

2006-08-11 Thread Colin Wildsmith
Hello, I am making a gui for the purpose that I can change the values in a list of different criteria which is found in a text file, such as:   Name(tab)rating(tab)breast size(tab)occurrences … … …   However as far as I know Python does not allow you to easily change a specific line

Inconsistency producing constant for float "infinity"

2006-08-11 Thread Peter Hansen
I'm investigating a puzzling problem involving an attempt to generate a constant containing an (IEEE 754) "infinity" value. (I understand that special float values are a "platform-dependent accident" etc...) The issue appears possibly to point to a bug in the Python compiler, with it producing

Re: hide python code !

2006-08-11 Thread Duncan Booth
Fuzzyman wrote: > Tim Chase wrote: > [snip] >> However, it's better to have a good relationship with your >> customers and know that they will adhere to licensing conditions, >> rather than to try and strong-arm them into behaving a particular >> way. >> > > Don't forget that distributing y

Boost Install

2006-08-11 Thread Hoop
Hi All, I am wondering if any have done an install of Boost for Python embedding? I have downoaded boost_1_33_1.exe, ran that and now have a boost_1_33_1 directory with plenty of items ine it. I have attempted to follow some online install directions which do not seem to work. I am using VS2005. I

Re: datetime to timestamp

2006-08-11 Thread Tim Peters
[Simen Haugen] >>> How can I convert a python datetime to a timestamp? It's easy to convert >>> a timestamp to datetime (datetime.datetime.fromtimestamp(), but the >>> other way around...?) [John Machin] >> Is the timetuple() method what you want? >> >> #>>> import datetime >> #>>> n = datetime.da

Re: datetime to timestamp

2006-08-11 Thread Sion Arrowsmith
John Machin <[EMAIL PROTECTED]> wrote: >On 11/08/2006 11:35 PM, John Machin wrote: >> On 11/08/2006 11:10 PM, Simen Haugen wrote: >>> How can I convert a python datetime to a timestamp? It's easy to convert >>> a timestamp to datetime (datetime.datetime.fromtimestamp(), but the >>> other way aroun

Re: converting a nested try/except statement into try/except/else

2006-08-11 Thread John Salerno
Simon Forman wrote: > I'm sorry to hear that. I thought it was cleaner and more > understandable than that. May I indulge in explaining it a bit? I > can, perhaps, make it clearer. Thanks for the explanation. I find that with a little concentration, it's not that it's hard to follow the code,

Re: hide python code !

2006-08-11 Thread Ben Sizer
Paul Boddie wrote: > Fuzzyman wrote: > > I never understand the knee-jerk reaction on this mailing list to > > answer people who ask this question by telling them they don't really > > want to do it... > > Well, given the pace of technological development and the disregard in > some environments fo

Re: some n00b question

2006-08-11 Thread John Salerno
Omar wrote: > b) I'm also interested in created GUI's sooner rather than later. Can > anyone point me to a fast track to doing GUI's on python? I recommend reading wxPython in Action. It's a great starter and reference to the wxPython GUI toolkit. Tkinter is usually considered easier and simpl

Re: converting a nested try/except statement into try/except/else

2006-08-11 Thread John Salerno
Boris Borcic wrote: > Boris Borcic wrote: >> John Salerno wrote: >>> In this case the method must return False, because it's a wxPython >>> method that needs a True or False value. If it doesn't, the program >>> will continue even after the error message. >> >> Just as it should do if the method

Re: schedule at specific hours

2006-08-11 Thread utabintarbo
Take a look at http://sourceforge.net/projects/pycron/ . It may give you some ideas. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: using python to edit a word file?

2006-08-11 Thread John Salerno
Anthra Norell wrote: > John, > > I have a notion about translating stuff in a mess and could help you > with the translation. But it may be that the conversion > from DOC to formatted test is a bigger problem. Loading the files into Word > and saving them in a different format may not be a

Re: hide python code !

2006-08-11 Thread Helmut Jarausch
John Machin wrote: > Bayazee wrote: >> hi >> can we hide a python code ? >> if i want to write a commercial software can i hide my source code from > [1] >> users access ? >> we can conver it to pyc but this file can decompiled ... so ...!! >> do

Re: Native Win32 text entry dialog?

2006-08-11 Thread utabintarbo
Well, to answer my own question http://www.averdevelopment.com/python/EasyDialogs.html Thanks to all who responded! ;-P -- http://mail.python.org/mailman/listinfo/python-list

some n00b question

2006-08-11 Thread Omar
I'm learning how to program python. a few questions a) I'm mostly interested in creating exe's that have to do with music -- things to help me keep track of chord progressions, transpositions, etc. can anyone point me in the direction of resources on this? b) I'm also interested in created GUI'

Re: Nested function scope problem

2006-08-11 Thread Gerhard Fiedler
On 2006-08-11 07:48:33, Slawomir Nowaczyk wrote: > But let me try again, please (just one more time, if this doesn't work > either I am willing to admit I do not see a simple analogy between > Python and C variables :-) > >Python C > variable: a

Re: Rendering Vector Graphics

2006-08-11 Thread K.S.Sreeram
jay graves wrote: > Bytter wrote: >> Hi ppl, >> I've already posted this message through the mailing-list, but it seems >> it never arrived here. Strange... Anyway: >> I need to render high-quality vector graphics with Python. I was >> thinking of something like 'cairo', though I need to run under

Re: Tkinter module not found

2006-08-11 Thread Shuaib
Well, I finally solved my problem. I just had to reinstall python with the USE flags of tcl and tk. #USE="tcl tk" emerge python And now I can use Tkinter Thanks guys! -- http://mail.python.org/mailman/listinfo/python-list

Re: excel in unix?

2006-08-11 Thread Harry George
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > hi > > is it possible to create excel files using python in Unix env? > > if so, what module should i use? > > thanks > > Depending on the complexity of your data you might find the csv module > useful. It allows you

Re: datetime to timestamp

2006-08-11 Thread John Machin
On 11/08/2006 11:35 PM, John Machin wrote: > On 11/08/2006 11:10 PM, Simen Haugen wrote: >> Hi. >> >> How can I convert a python datetime to a timestamp? It's easy to convert >> a timestamp to datetime (datetime.datetime.fromtimestamp(), but the >> other way around...?) >> >> -Simen >> > > Is the

Re: datetime to timestamp

2006-08-11 Thread John Machin
On 11/08/2006 11:10 PM, Simen Haugen wrote: > Hi. > > How can I convert a python datetime to a timestamp? It's easy to convert > a timestamp to datetime (datetime.datetime.fromtimestamp(), but the > other way around...?) > > -Simen > Is the timetuple() method what you want? #>>> import datetim

Re: hide python code !

2006-08-11 Thread Paul Boddie
Fuzzyman wrote: > Paul Boddie wrote: > > Fuzzyman wrote: > > > > > I never understand the knee-jerk reaction on this mailing list to > > > answer people who ask this question by telling them they don't really > > > want to do it... Note your choice of words: "don't really want to do it". [...] >

  1   2   >