Re: [NEWB]: List with random numbers

2006-08-19 Thread eltower
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, eltower wrote: > > > Generate a random number from 0 to 6 > > Insert this random number to the end of a list unless the number is > > already there > > finish with a len(list) = 7 > > > > so far, I have this: > > > > import random > > > > ra

Re: [NEWB]: List with random numbers

2006-08-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, eltower wrote: > Generate a random number from 0 to 6 > Insert this random number to the end of a list unless the number is > already there > finish with a len(list) = 7 > > so far, I have this: > > import random > > random_list = [] > > while len(random_list) < 8: Wel

Re: [NEWB]: List with random numbers

2006-08-19 Thread Simon Forman
eltower wrote: > Hey all, > > I'm trying to write a program in Python for learning purposes which is > meant to: > > Generate a random number from 0 to 6 > Insert this random number to the end of a list unless the number is > already there > finish with a len(list) = 7 > > so far, I have this: > >

Re: [NEWB]: List with random numbers

2006-08-19 Thread faulkner
what you want is impossible. step back a second. you want 7 distinct ints all between 0 and 5 inclusive. of course you'll loop forever. once you get all 6 numbers, no matter what you get will already be in your list. if you want floats between 0 and 6, say '6 * random.random()'. random.randrange is

[NEWB]: List with random numbers

2006-08-19 Thread eltower
Hey all, I'm trying to write a program in Python for learning purposes which is meant to: Generate a random number from 0 to 6 Insert this random number to the end of a list unless the number is already there finish with a len(list) = 7 so far, I have this: import random random_list = [] whil

Re: trouble using "\" as a string

2006-08-19 Thread Dan Bishop
OriginalBrownster wrote: > Hi there... > > I'm still pretty new to turbogears. but i have gotten pretty familiar > with it > > i'm just trying to clear something up, i'm having a difficult time > using \ when declaring a string expression > > such as tempname="\"..it says that the line is single qo

Re: [ANN] ratfun-2.3 Polynomials and Rational Functions

2006-08-19 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] clnum-1.3 Class Library For Numbers Python Binding

2006-08-19 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] rpncalc-2.4 RPN Calculator for Python

2006-08-19 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: Stopping all threads from other thread

2006-08-19 Thread alfanick
Thanks, it's working Bryan Olson wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > it is possible to stop all threads (application) from thread of > > application: > > App > > |-MainThread > > |-WebServer > > |-CmdListener # From this I want to stop App > > > > The sys.exit isn't working... > >

Re: Stopping all threads from other thread

2006-08-19 Thread Bryan Olson
[EMAIL PROTECTED] wrote: > Hello, > it is possible to stop all threads (application) from thread of > application: > App > |-MainThread > |-WebServer > |-CmdListener # From this I want to stop App > > The sys.exit isn't working... You can start all threads other than CmdListener as daemon thr

Re: Permission Denied

2006-08-19 Thread AlbaClause
hiaips wrote: > > Tom Strickland wrote: >> Hopefully this is a simple question. I've started to program in Python >> after an absence of about a year, so I'm very rusty. I wrote a short >> program and tried to run it using Python2.4 in Linux. I keep getting >> "permission denied" messages after e

Re: Text to MP3 using pyTTS - Non-programmer question

2006-08-19 Thread Marc Shapiro
[EMAIL PROTECTED] wrote: > I'm not a programmer, but I'd like to make a program that will open and > read a txt file and output to a mp3 file. I don't need to ever hear the > voice, but I'd like the program to direct > > I've been google'ing around and have found a few tutorials about > converting

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Ben Finney
"many_years_after" <[EMAIL PROTECTED]> writes: > Well, people may input from keyboard. They input some Chinese > characters, then, I want to create a number. The same number will be > created if they input the same Chinese characters. You seem to be looking for a hash. http://docs.python.org

Re: sum and strings

2006-08-19 Thread Carl Banks
Rhamphoryncus wrote: > It's also worth stressing (not in response to your post, but others) > that sum([[1],[2],[3]], []) is just as bad as attempting to sum > strings, both conceptually (it's not mathematical addition), and > performance-wise. Don't do it. :) Interesting. I would have guessed t

Re: Search or compai problem

2006-08-19 Thread timgerr
Gabriel Genellina wrote: > At Saturday 19/8/2006 01:16, [EMAIL PROTECTED] wrote: > > >it is really lstusers (it is an L not a # 1), Some of the output from > >print lstUsers has the output of None. I and trying to filter the None > >out of the list. I come from a perl background and this is ho

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread many_years_after
John Machin wrote: > many_years_after wrote: > > hi: > > > > what I want to do is just to make numbers as people input some Chinese > > character(hanzi,i mean).The same character will create the same > > number.So I think ascii code can do this very well. > > > > Possibly you have "create" upside-

Re: Permission Denied

2006-08-19 Thread hiaips
Tom Strickland wrote: > Hopefully this is a simple question. I've started to program in Python > after an absence of about a year, so I'm very rusty. I wrote a short > program and tried to run it using Python2.4 in Linux. I keep getting > "permission denied" messages after entering the path to the

Re: sum and strings

2006-08-19 Thread Rhamphoryncus
Bill Pursell wrote: > Georg Brandl wrote: > > Paul Rubin wrote: > > > Sybren Stuvel <[EMAIL PROTECTED]> writes: > > >> Because of "there should only be one way to do it, and that way should > > >> be obvious". There are already the str.join and unicode.join methods, > > > > > > Those are obvious???

Re: trouble using "\" as a string

2006-08-19 Thread OKB (not okblacke)
OriginalBrownster wrote: [I un-bottom-posted this] > Jim wrote: >> Try using: tempname = "\\" >> Jim > that stores tempname as "\\" > > .. I don't think so. I think you just think it's storing it as that because if you enter it at the interactive prompt it shows '\\'. But try len(temp

Re: sequel to the topic "install patch on windows".....

2006-08-19 Thread djoefish
Fuzzyman wrote: > djoefish wrote: > > sequel to the topic "install patch on windows". > > > > I am currently running Python2.3 with Enthought on a windows PC. I have > > been running into a memory problem (see > > http://evanjones.ca/python-memory-part3.html), and would like to > > install a p

Re: Disable close button in management window.(KDE- pyQT)

2006-08-19 Thread David Boddie
Gabriel - BR wrote: > Hi,,, > Is possible disable the close button in KDE management window? Using > python+qt? Can you say exactly which window you're talking about? The "Control Center" or something else? David -- http://mail.python.org/mailman/listinfo/python-list

Permission Denied

2006-08-19 Thread Tom Strickland
Hopefully this is a simple question. I've started to program in Python after an absence of about a year, so I'm very rusty. I wrote a short program and tried to run it using Python2.4 in Linux. I keep getting "permission denied" messages after entering the path to the program. I switched to the

Re: cloning generator iterators

2006-08-19 Thread Bernhard Mulder
Oops. Got the indentation wrong. Here is the corrected version: def generator(self): while True: while True: if (yield 1): if (yield 1): break self.n = 2 while (yield self.n):

Re: sequel to the topic "install patch on windows".....

2006-08-19 Thread Fuzzyman
djoefish wrote: > sequel to the topic "install patch on windows". > > I am currently running Python2.3 with Enthought on a windows PC. I have > been running into a memory problem (see > http://evanjones.ca/python-memory-part3.html), and would like to > install a patch. I have read a lot about

Re: tkinter btn visual state with tkMessageBox

2006-08-19 Thread jmdeschamps
Hendrik van Rooyen wrote: > <[EMAIL PROTECTED]> wrote: > > To: > > > | why is the button sunken when called through a bind method, and not > | with the command attribute? > | Thank you! > | > | > | ## Cut'nPaste example > | from Tkinter import * > | import tkMessageBox > | > | class Vue(object):

sequel to the topic "install patch on windows".....

2006-08-19 Thread djoefish
sequel to the topic "install patch on windows". I am currently running Python2.3 with Enthought on a windows PC. I have been running into a memory problem (see http://evanjones.ca/python-memory-part3.html), and would like to install a patch. I have read a lot about it online, but can't seem to

cloning generator iterators

2006-08-19 Thread Bernhard Mulder
I have something like the following (using Python 2.5 syntax): class adapt(object): def __init__(self): self.iterator = self.generator() self.n = 0 def generator(self): while True: while True: if (yield 1): if (yield 1

istep() addition to itertool? (Was: Re: Printing n elements per line in a list)

2006-08-19 Thread Rhamphoryncus
unexpected wrote: > If have a list from 1 to 100, what's the easiest, most elegant way to > print them out, so that there are only n elements per line. I've run into this problem a few times, and although many solutions have been presented specifically for printing I would like to present a more g

Re: trouble using "\" as a string

2006-08-19 Thread OriginalBrownster
that stores tempname as "\\" .. Jim wrote: > Try using: tempname = "\\" > Jim > > > OriginalBrownster wrote: > > Hi there... > > > > I'm still pretty new to turbogears. but i have gotten pretty familiar > > with it > > > > i'm just trying to clear something up, i'm having a difficult time > > us

Re: install patch on windows

2006-08-19 Thread djoefish
djoefish wrote: > Jorge Godoy wrote: > > "djoefish" <[EMAIL PROTECTED]> writes: > > > > > Tim Golden wrote: > > >> djoefish wrote: > > >> > Does anyone know how to install a patch on Winodws? For example, I want > > >> > to install the patch 'ocmalloc-free-arenas.diff' in Python 2.3. > > >> > > >>

Re: Python complaining about CherryPY?

2006-08-19 Thread dimitri pater
Hi Thomas,try the CP mailinglist: http://www.cherrypy.org/wiki/CherryPyMailingLists , they can probably answer your question.cheers,Dimitri On 8/19/06, Thomas McLean <[EMAIL PROTECTED]> wrote: Hi all,First post to the list, so first off, I'm new to Python and everythingsurrounding it so if you can

Re: Questions on unittest behaviour

2006-08-19 Thread John Roth
Collin Winter wrote: > While working on a test suite for unittest these past few weeks, I've > run across some behaviours that, while not obviously wrong, don't > strike me as quite right, either. Submitted for your consideration: > > 1) TestCase.tearDown() is only run if TestCase.setUp() succeede

Re: how to use python com server in c++?

2006-08-19 Thread Butternut Squash
Leo Jay wrote: > dear all, > i have a python com server like this: > > import win32com.server.register > > class HelloWorld: > _reg_clsid_ = "{B0EB5AAB-0465-4D54-9CF9-04ADF7F73E4E}" > _reg_desc_ = 'Python test com server' > _reg_progid_= "Leojay.ComServer" >

Re: sum and strings

2006-08-19 Thread Georg Brandl
Bill Pursell wrote: > Georg Brandl wrote: >> Paul Rubin wrote: >> > Sybren Stuvel <[EMAIL PROTECTED]> writes: >> >> Because of "there should only be one way to do it, and that way should >> >> be obvious". There are already the str.join and unicode.join methods, >> > >> > Those are obvious??? >> >>

Re: How to catch these kind of bugs in Python?

2006-08-19 Thread Ravi Teja
asincero wrote: > Is there anyway to catch the following type of bug in Python code: > > message = 'This is a message' > # some code > # some more code > if some_obscure_condition: >nessage = 'Some obscure condition occured.' > # yet more code > # still more code > print message > > > In the ab

Re: trouble using "\" as a string

2006-08-19 Thread Jim
Try using: tempname = "\\" Jim OriginalBrownster wrote: > Hi there... > > I'm still pretty new to turbogears. but i have gotten pretty familiar > with it > > i'm just trying to clear something up, i'm having a difficult time > using \ when declaring a string expression > > such as tempname="\"..i

Re: text editor suggestion?

2006-08-19 Thread John Salerno
milosz wrote: > Did you try gedit? > It has an options, which you need, I think. > Regards. > Yes, I tried it and it's alright, but it doesn't support smart indentation or much customizing of syntax highlighting (i.e. you can change the color of functions, but you can't define what a 'function'

Re: text editor suggestion?

2006-08-19 Thread John Salerno
Sybren Stuvel wrote: > John Salerno enlightened us with: >> I'd really like to learn vim, but I spent days just trying to figure >> out how to get the syntax highlighting and indentation working, >> where these settings are and how to edit them > > Stop being a man and just ask for directions :)

Re: couple more questions about sqlite

2006-08-19 Thread John Salerno
Joel Rosdahl wrote: > John Salerno <[EMAIL PROTECTED]> writes: > >> What is really confusing is that I did a search for 'sqlite' in my >> Ubuntu repositories and it came up with entries like this: >> >> python2.4-pysqlite1.1 python interface to SQLite 3 >> python2.4-pysqlite2 python interfac

trouble using "\" as a string

2006-08-19 Thread OriginalBrownster
Hi there... I'm still pretty new to turbogears. but i have gotten pretty familiar with it i'm just trying to clear something up, i'm having a difficult time using \ when declaring a string expression such as tempname="\"..it says that the line is single qouted. i want this because using python

Re: ratfun-2.3 Polynomials and Rational Functions

2006-08-19 Thread Raymond L. Buvel
Bas wrote: > Are there any differences between this module and the one already > present in numpy? > > http://www.scipy.org/doc/numpy_api_docs/numpy.lib.polynomial.html > > Cheers, > Bas > Yes, there are quite a few. This module uses a multi-precision library (clnum) to make the calculations m

Re: timezones and time_t

2006-08-19 Thread MrBlueSky
Thanks for the reply. Unfortunately, a simple "+offset" type solution isn't really accurate enough for the kind of scenario I'm looking at. I'm often dealing with different timezones with DST changeovers on different dates or even different times of day! So I need industrial-strength timezone han

streaming audio with standard modules?

2006-08-19 Thread Marc Shapiro
I am running Python 2.3 on Linux. I am trying to write a program to simulate a hardware mixer to play theatrical sound cues. I need to be able to play multiple sound channels at once, controlling volume by channel as well as globally. I also need to be able to pan a channel through left and r

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread John Machin
many_years_after wrote: > hi: > > what I want to do is just to make numbers as people input some Chinese > character(hanzi,i mean).The same character will create the same > number.So I think ascii code can do this very well. > Possibly you have "create" upside-down. Could you possibly be talking

Re: Documenting a package with Pydoc

2006-08-19 Thread Rob Cowie
Gabriel Genellina wrote: > At Friday 18/8/2006 11:45, Rob Cowie wrote: > > >Pydoc seems to be capable of writing documentation for all modules > >within a package by simply pointing it to the package on the command > >line... > > > >pydoc -w > > > >Certainly, the method writedocs() appears to des

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Gerhard Fiedler
On 2006-08-19 16:54:36, Peter Maas wrote: > Gerhard Fiedler wrote: >> Well, ASCII can represent the Unicode numerically -- if that is what the OP >> wants. > > No. ASCII characters range is 0..127 while Unicode characters range is > at least 0..65535. Actually, Unicode goes beyond 65535. But rig

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread John Machin
many_years_after wrote: > John Machin wrote: > > many_years_after wrote: > > > Hi,everyone: > > > > > > Have you any ideas? > > > > > > Say whatever you know about this. > > > > > > > Perhaps you had better explain what you mean by "ascii code of Chinese > > characters". Chinese charact

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Peter Maas
Gerhard Fiedler wrote: > Well, ASCII can represent the Unicode numerically -- if that is what the OP > wants. No. ASCII characters range is 0..127 while Unicode characters range is at least 0..65535. > For example, "U+81EC" (all ASCII) is one possible -- not very > readable though -- representat

Re: install patch on windows

2006-08-19 Thread djoefish
Jorge Godoy wrote: > "djoefish" <[EMAIL PROTECTED]> writes: > > > Tim Golden wrote: > >> djoefish wrote: > >> > Does anyone know how to install a patch on Winodws? For example, I want > >> > to install the patch 'ocmalloc-free-arenas.diff' in Python 2.3. > >> > >> You can get patch (and quite a lo

Embedding python: Segmentation Fault

2006-08-19 Thread Shuaib
Hi! I am trying to embed python into a C programe of mine. When the execution reaches the following line pModule = PyImport_Import(pName); It causes a Segmentation Fault Error. pModule is of type PyObject *, so is pName. What could be the possible reasons for the error? Thanks for your time.

Python complaining about CherryPY?

2006-08-19 Thread Thomas McLean
Hi all, First post to the list, so first off, I'm new to Python and everything surrounding it so if you can please ignore my ignorance. I setup a cherryPY server so that I could use sabnzbd but once, I have installed/configured what I was told by the tutorials and everything else. I run ubuntu x8

Re: install patch on windows

2006-08-19 Thread Jorge Godoy
"djoefish" <[EMAIL PROTECTED]> writes: > Tim Golden wrote: >> djoefish wrote: >> > Does anyone know how to install a patch on Winodws? For example, I want >> > to install the patch 'ocmalloc-free-arenas.diff' in Python 2.3. >> >> You can get patch (and quite a lot besides) for win32 from >> the Un

Re: install patch on windows

2006-08-19 Thread djoefish
Tim Golden wrote: > djoefish wrote: > > Does anyone know how to install a patch on Winodws? For example, I want > > to install the patch 'ocmalloc-free-arenas.diff' in Python 2.3. > > You can get patch (and quite a lot besides) for win32 from > the UnxUtils project: > > http://sourceforge.net/proj

Re: ratfun-2.3 Polynomials and Rational Functions

2006-08-19 Thread Bas
Are there any differences between this module and the one already present in numpy? http://www.scipy.org/doc/numpy_api_docs/numpy.lib.polynomial.html Cheers, Bas -- http://mail.python.org/mailman/listinfo/python-list

Re: install patch on windows

2006-08-19 Thread Tim Golden
djoefish wrote: > Does anyone know how to install a patch on Winodws? For example, I want > to install the patch 'ocmalloc-free-arenas.diff' in Python 2.3. You can get patch (and quite a lot besides) for win32 from the UnxUtils project: http://sourceforge.net/projects/unxutils TJG -- http://ma

Re: Embedding python: GCC gives errors of "undefined reference" to Py_* functions.

2006-08-19 Thread Shuaib
OK, I am not ashamed to admit that I am ashamed as I didn't search the group for my problem before posting it yet again. The solution was right there. I have link in my libpython2.4.so while compiling. $gcc -I/usr/include/python2.4/ -lpython2.4 -o foo foo.c Shuaib wrote: > Hey! > > I am trying

Stopping all threads from other thread

2006-08-19 Thread amadeusz . jasak
Hello, it is possible to stop all threads (application) from thread of application: App |-MainThread |-WebServer |-CmdListener # From this I want to stop App The sys.exit isn't working... Amadeusz Jasak (Poland) -- http://mail.python.org/mailman/listinfo/python-list

Google groups api

2006-08-19 Thread fooshm
Hello, Is there any module for searching google groups, something like PyGoogle ? Thank you in advance, Efi -- http://mail.python.org/mailman/listinfo/python-list

install patch on windows

2006-08-19 Thread djoefish
Does anyone know how to install a patch on Winodws? For example, I want to install the patch 'ocmalloc-free-arenas.diff' in Python 2.3. thanks... -- http://mail.python.org/mailman/listinfo/python-list

Embedding python: GCC gives errors of "undefined reference" to Py_* functions.

2006-08-19 Thread Shuaib
Hey! I am trying to embedd python into a C programe of mine. But when I try to compile the C code, gcc gives errors like "undefined reference to `Py_Finalize'" and the same kind for all the other functions. I have incuded "Python.h". Any idea what might be wrong? Thanks. -- http://mail.python.

Re: How to catch these kind of bugs in Python?

2006-08-19 Thread dave . brueck
asincero wrote: > Is there anyway to catch the following type of bug in Python code: > > message = 'This is a message' > if some_obscure_condition: >nessage = 'Some obscure condition occured.' > print message > > > In the above example, message should be set to 'Some obscure condition > occured

Re: How to catch these kind of bugs in Python?

2006-08-19 Thread Jorge Godoy
"asincero" <[EMAIL PROTECTED]> writes: > In the above example, message should be set to 'Some obscure condition > occured.' if some_obscure_condition is True. But due to a lack of > sleep, and possibly even being drunk, the programmer has mistyped > message. These types of bugs would easily be c

Re: sending values over classes

2006-08-19 Thread Rafał Janas
Hi, Exactly I want to set global value (like session - who is log in) I writing simple program with more than one class - every window has different class in different file. Example: 2 files (main and wind). Main is main window and wind is child window. I want to send value from main to child from

How to catch these kind of bugs in Python?

2006-08-19 Thread asincero
Is there anyway to catch the following type of bug in Python code: message = 'This is a message' # some code # some more code if some_obscure_condition: nessage = 'Some obscure condition occured.' # yet more code # still more code print message In the above example, message should be set to '

Re: Optimizing Inner Loop Copy

2006-08-19 Thread danielx
Mark E. Fenner wrote: > Paul McGuire wrote: > > > "Mark E. Fenner" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > >> Hello all, > >> > > > >> > >> Here's my class of the objects being copied: > >> > >> class Rule(list): > >> def __init__(self, lhs=None, rhs=None, nClasses=0,

Re: sending values over classes

2006-08-19 Thread Rob Wolfe
"Rafał Janas" <[EMAIL PROTECTED]> writes: > Hi, > > How to read/write value over different classes (in different files) > Something like global values? You need to be more specific about what exactly you're trying to accomplish. Some code whould be great. Maybe import statement is what you're lo

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Gerhard Fiedler
On 2006-08-19 12:42:31, Marc 'BlackJack' Rintsch wrote: > many_years_after wrote: > >> what I want to do is just to make numbers as people input some Chinese >> character(hanzi,i mean).The same character will create the same >> number.So I think ascii code can do this very well. > > No it can't.

Re: write eof without closing

2006-08-19 Thread Philippe Martin
cage wrote: > hello > > can i write a eof to a file descriptor without closing it? > like: > fd.write(EOF) > or something > > grts, > ruben No but there is an EOF to the file anyway, even if it is open. I recall under MS-DOS, you could create a file of size N without writing to it (some INT21

Re: PyThreadState_Swap(NULL)

2006-08-19 Thread Jack Diederich
On Sat, Aug 19, 2006 at 09:08:21AM -0700, Bryan wrote: > Jack Diederich wrote: > > On Fri, Aug 18, 2006 at 02:21:40PM -0700, Bryan wrote: > >> i've written a program that uses python c api code that lives in a > >> shared library that is loaded by a custom apache module (mod_xxx). this > >> pyth

Re: text editor suggestion?

2006-08-19 Thread Thorsten Kampe
* John Salerno (2006-08-19 02:20 +0100) > Ok, I know it's been asked a million times, but I have a more specific > question so hopefully this won't be just the same old post. I've tried a > few different editors, and I really like UltraEdit, but it's > Windows-only and I'm working more on Linux

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Thorsten Kampe
* many_years_after (2006-08-19 12:18 +0100) > Hi,everyone: > > Have you any ideas? > > Say whatever you know about this. contradictio in adiecto -- http://mail.python.org/mailman/listinfo/python-list

[ANN] rpncalc-2.4 RPN Calculator for Python

2006-08-19 Thread Raymond L. Buvel
The rpncalc package adds an interactive Reverse Polish Notation (RPN) interpreter to Python. This interpreter allows the use of Python as an RPN calculator. You can easily switch between the RPN interpreter and the standard Python interpreter. Home page: http://calcrpnpy.sourceforge.net/ Chang

[ANN] ratfun-2.3 Polynomials and Rational Functions

2006-08-19 Thread Raymond L. Buvel
The ratfun module provides classes for defining polynomial and rational function (ratio of two polynomials) objects. These objects can be used in arithmetic expressions and evaluated at a particular point. Home page: http://calcrpnpy.sourceforge.net/ratfun.html Note: If you are using rpncalc-1.2

how to use python com server in c++?

2006-08-19 Thread Leo Jay
dear all, i have a python com server like this: import win32com.server.register class HelloWorld: _reg_clsid_ = "{B0EB5AAB-0465-4D54-9CF9-04ADF7F73E4E}" _reg_desc_ = 'Python test com server' _reg_progid_= "Leojay.ComServer" _public_methods_= ['Add', 'M

Re: write eof without closing

2006-08-19 Thread cwarren89
Actually, nevermind. It appears that receiving an EOF from a stream tells it when to stop 'reading', not necessarily that the stream is closed. What a weird behavior. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] clnum-1.3 Class Library For Numbers Python Binding

2006-08-19 Thread Raymond L. Buvel
The clnum package adds rational numbers and arbitrary precision floating point numbers in real and complex form to Python. Also provides arbitrary precision floating point replacements for the functions in the math and cmath standard library modules. Home page: http://calcrpnpy.sourceforge.net/cln

Re: write eof without closing

2006-08-19 Thread cwarren89
Writing the binary value for ^D into the stream will not do anything. That value signals the shell to close the stream, as such it only has significance when you're typing something into the shell. To the OP: writing an EOF to a stream without closing it makes no sense. EOF means just that--end of

Re: write eof without closing

2006-08-19 Thread Diez B. Roggisch
cage schrieb: > Marc 'BlackJack' Rintsch schreef: >> In <[EMAIL PROTECTED]>, cage wrote: >> >>> can i write a eof to a file descriptor without closing it? >>> like: >>> fd.write(EOF) >>> or something >> >> What do you expect this to to? Writing a byte to the file and you don't >> know which va

Re: write eof without closing

2006-08-19 Thread Lars
cage wrote: > I want to use a program that has a 'pipe' mode, in which you can use > stdin to send commands to the program. I found out that, when in pipe > mode and you are using the keyboard as input source you can do Ctrl-D to > 'signal' the program that you have finished typing your command.

Re: PyThreadState_Swap(NULL)

2006-08-19 Thread Bryan
Jack Diederich wrote: > On Fri, Aug 18, 2006 at 02:21:40PM -0700, Bryan wrote: >> i've written a program that uses python c api code that lives in a >> shared library that is loaded by a custom apache module (mod_xxx). this >> python c api code all works correctly under our test server and under

Re: tkinter btn visual state with tkMessageBox

2006-08-19 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: To: | why is the button sunken when called through a bind method, and not | with the command attribute? | Thank you! | | | ## Cut'nPaste example | from Tkinter import * | import tkMessageBox | | class Vue(object): | def __init__(self): | self.root=Tk() |

Re: write eof without closing

2006-08-19 Thread Tim Chase
>> can i write a eof to a file descriptor without closing it? > > No. Not on Windows, OS-X, or Unix. There is no such thing as > "an eof". > > On CP/M Ctrl-Z is used as EOF for text files. Common Dos/Window convention also uses ctrl+Z (0x1a) for EOF. c:\> copy con test.txt hel

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, many_years_after wrote: > what I want to do is just to make numbers as people input some Chinese > character(hanzi,i mean).The same character will create the same > number.So I think ascii code can do this very well. No it can't. ASCII doesn't contain Chinese characters.

Re: write eof without closing

2006-08-19 Thread cage
Marc 'BlackJack' Rintsch schreef: > In <[EMAIL PROTECTED]>, cage wrote: > >> can i write a eof to a file descriptor without closing it? >> like: >> fd.write(EOF) >> or something > > What do you expect this to to? Writing a byte to the file and you don't > know which value this byte has? >

Packt published an article about xtopdf - creating PDF from Plain Text, DBF, CSV, TDV, and XLS Data

2006-08-19 Thread vasudevram
Hi group, This is an article I wrote for Packt Publishing - http://www.packtpub.com : Using xtopdf, a PDF creation toolkit - http://www.packtpub.com/article/Using_xtopdf It shows how to use xtopdf - http://sourceforge.net/projects/xtopdf - to create PDF from plain text, DBF, CSV, TDV and XLS dat

Re: Zope 3.3.0 beta 2 released!

2006-08-19 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

=?utf-8?Q?Re:_Packt_published_an_article_about_xtopdf_=2D_creating_PDF_from_Plain=0A=09Text, _DBF, _CSV, _TDV, _and_XLS_Data?=

2006-08-19 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: write eof without closing

2006-08-19 Thread Grant Edwards
On 2006-08-19, cage <[EMAIL PROTECTED]> wrote: > can i write a eof to a file descriptor without closing it? No. Not on Windows, OS-X, or Unix. There is no such thing as "an eof". On CP/M Ctrl-Z is used as EOF for text files. -- Grant Edwards [EMAIL PROTECTED] -- http://mail.python.org/mail

Re: how do you get the name of a dictionary?

2006-08-19 Thread Duncan Booth
Tim Chase wrote: > >>> [name for name in dir() if id(eval(name)) == id(banana)] > ['banana', 'spatula'] > Please, if you are going to do something like this, then please at least use the 'is' operator. Using id(expr1)==id(expr2) is just plain stupid: it will actually work in this case, but as

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread many_years_after
hi: what I want to do is just to make numbers as people input some Chinese character(hanzi,i mean).The same character will create the same number.So I think ascii code can do this very well. John Machin wrote: > many_years_after wrote: > > Hi,everyone: > > > > Have you any ideas? > > > >

Re: PyThreadState_Swap(NULL)

2006-08-19 Thread Jack Diederich
On Fri, Aug 18, 2006 at 02:21:40PM -0700, Bryan wrote: > > i've written a program that uses python c api code that lives in a > shared library that is loaded by a custom apache module (mod_xxx). this > python c api code all works correctly under our test server and under > apache but only if mo

Re: Small Troll on notation of variables over time

2006-08-19 Thread Hendrik van Rooyen
"John Machin" <[EMAIL PROTECTED]> wrote: | | Hendrik van Rooyen wrote: | [snip] | > What do you guys think? | | The subject said it all. You should find some other way of entertaining | yourself on the weekends :-) This is the right answer... *grin* - well - at least you *were* warned... -

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Philippe Martin
Philippe Martin wrote: > many_years_after wrote: > >> Hi,everyone: >> >> Have you any ideas? >> >> Say whatever you know about this. >> >> >> thanks. > Hi, > > You mean unicode I assume: > http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml > > Regards, > > Philipp

Re: Questions on unittest behaviour

2006-08-19 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Collin Winter" <[EMAIL PROTECTED]> wrote: > While working on a test suite for unittest these past few weeks, I've > run across some behaviours that, while not obviously wrong, don't > strike me as quite right, either. Submitted for your consideration: > > 1) Test

tkinter btn visual state with tkMessageBox

2006-08-19 Thread jmdeschamps
why is the button sunken when called through a bind method, and not with the command attribute? Thank you! ## Cut'nPaste example from Tkinter import * import tkMessageBox class Vue(object): def __init__(self): self.root=Tk() self.root.title("test button visual state")

Re: text editor suggestion?

2006-08-19 Thread milosz
Did you try gedit? It has an options, which you need, I think. Regards. -- http://mail.python.org/mailman/listinfo/python-list

Re: write eof without closing

2006-08-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, cage wrote: > can i write a eof to a file descriptor without closing it? > like: > fd.write(EOF) > or something What do you expect this to to? Writing a byte to the file and you don't know which value this byte has? Ciao, Marc 'BlackJack' Rintsch -- http:/

Re: timezones and time_t

2006-08-19 Thread Eyal Lotem
MrBlueSky wrote: > Hi, > I've got a Python application that (as well as lots of other stuff!) > has to translate time_t values into strings in the TZ of the users > choice. Looking at the Python Library Reference, I can see no platform > independent way of setting the TZ that time.localtime() ret

Zope hosting

2006-08-19 Thread Frank Krugmann
I'am searching a cheap ZPP Hoster. Some informations? Greetings Escorial2000 -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >