Re: Decorator for Enforcing Argument Types

2006-12-21 Thread John Machin
George Sakkis wrote: > John Machin wrote: > > Bruno Desthuilliers wrote: > > > > > > > > Python is dynamic, and fighting against the language is IMHO a really > > > bad idea. The only places where theres a real need for this kind of > > > stuff are when dealing with the "outside world" (IOW : inpu

Re: Confusion with calling function of a subclass

2006-12-21 Thread Adonis Vargas
Pyenos wrote: > class TREE: > def gettree(self):print self > TREE.gettree() # I get an error saying ># TypeError: unbound method gettree() must be called ># with TREE instance as first argument (got nothing instead > > > I still don't understand how to solve t

Re: def index(self):

2006-12-21 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Gert Cuykens wrote: > On 21 Dec 2006 09:44:48 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: >> "George Sakkis" <[EMAIL PROTECTED]> wrote: >> >> @expr >> def fn(...): ... >> >> is exactly equivalent to: >> >> def fn(...): ... >> fn = (expr)(fn) >> > > ok i did my homework re

Confusion with calling function of a subclass

2006-12-21 Thread Pyenos
class TREE: def gettree(self):print self TREE.gettree() # I get an error saying # TypeError: unbound method gettree() must be called # with TREE instance as first argument (got nothing instead I still don't understand how to solve this simple code. -- http://m

Re: Script Error

2006-12-21 Thread Forced_Ambitions
Guys any suggestions ? Could it be because of a MS patch or something as i believe i had some patching on the windows box i was running this script on. Forced_Ambitions wrote: > Hi Guys, > > I am facing a problem with a script that i had written to automate > opening a website and signing on to

Re: removing the header from a gzip'd string

2006-12-21 Thread Fredrik Lundh
Gabriel Genellina wrote: > Using the default options ("deflate", default compression level, no > custom dictionary) will make those first two bytes 0x78 0x9c. > > If you want to encrypt a compressed text, you must remove redundant > information first. encryption? didn't the OP say that he *d

Re: How a script can know if it has been called with the -i command lineoption?

2006-12-21 Thread Michele Simionato
Hendrik van Rooyen wrote: > "Michele Simionato" <[EMAIL PROTECTED]> wrote: > > > > The subject says it all, I would like a script to act differently when > > called as > > $ python script.py and when called as $ python -i script.py. I looked > > at the sys module > > but I don't see a way to retrie

Re: Problem in using Pulp

2006-12-21 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > GLPK("C:\Documents and > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\").solve(prob) ^* * This is a no no - the backslash escapes the last quote... - Hendrik -- http://mail.python.o

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread George Sakkis
John Machin wrote: > Bruno Desthuilliers wrote: > > > > > Python is dynamic, and fighting against the language is IMHO a really > > bad idea. The only places where theres a real need for this kind of > > stuff are when dealing with the "outside world" (IOW : inputs and > > outputs). And then packa

Re: Question about Tkinter windows

2006-12-21 Thread Hendrik van Rooyen
Manuel Malo de Molina wrote: >Hi everyone, this is the first time I use Python. I'm working on an application >using Tkinter and I would like that >the windows could only be opened once, is >there any option to get that? > >I don't know if I've explained myself: what I want is that if the user cl

Re: How a script can know if it has been called with the -i command lineoption?

2006-12-21 Thread Hendrik van Rooyen
"Michele Simionato" <[EMAIL PROTECTED]> wrote: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should

Re: tuple.index()

2006-12-21 Thread Hendrik van Rooyen
"Nick Maclaren" <[EMAIL PROTECTED]> wrote: > "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: > |> When I looked at the above, I went "tilt" - > > Yes, you are confused :-) Neither the agents nor strings take the > other as 'arguments', but are effectively methods of the I/O object. > Let's co

Weekly Python Patch/Bug Summary

2006-12-21 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 420 open ( +6) / 3510 closed (+12) / 3930 total (+18) Bugs: 944 open ( -5) / 6391 closed (+15) / 7335 total (+10) RFE : 249 open ( +2) / 245 closed ( +0) / 494 total ( +2) New / Reopened Patches __ cp720 enc

Re: Need Simple Way To Determine If File Is Executable

2006-12-21 Thread Tim Roberts
Sebastian 'lunar' Wiesner <[EMAIL PROTECTED]> wrote: > >Fredrik Lundh <[EMAIL PROTECTED]> schrieb > >> Sebastian 'lunar' Wiesner wrote: >> you're confusing the shell's "is this file executable" check with the loader's "can I execute this file" check: >... >Well, that doesn't tell us anyt

Re: Problem in using Pulp

2006-12-21 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Thanks, now I am not getting that error, but now I am getting a > different error: > -error--- >GLPK("C:\Documents and > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob) > File "C:\Documents and Setting

Re: Problem in using Pulp

2006-12-21 Thread [EMAIL PROTECTED]
Thanks, now I am not getting that error, but now I am getting a different error: -error--- GLPK("C:\Documents and Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob) File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line 11

Re: Problem in using Pulp

2006-12-21 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, > I am trying to run the following example which uses PULP for linear > optimization. But I am getting this error in the last line: "EOL while > scanning single quoted string". > GLPK("C:\Documents and > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\").solve(prob)

RE: [python-win32] Displaying contents of a file using PyWin

2006-12-21 Thread Mark Hammond
Hi Gabriel, > [Forwarded from [EMAIL PROTECTED] > > At Thursday 21/12/2006 13:51, MiguelS wrote: > > >import win32ui > >from pywin.mfc import docview > > > >t = docview.DocTemplate() > >t.OpenDocumentFile("d:/temp/music.log", True) > > > >This caused windows to close PythonWin. > > This appears to

Problem in using Pulp

2006-12-21 Thread [EMAIL PROTECTED]
Hi, I am trying to run the following example which uses PULP for linear optimization. But I am getting this error in the last line: "EOL while scanning single quoted string". Can anyone help me with this? thanks Amit --Code from pulp imp

Re: Is there any python-twisted tutorial or texts?

2006-12-21 Thread Damjan
>> I want to study twisted of python . But I donot know how to start. >> Any suggistions? >> > > There is a book about using Twisted. It's called 'Twisted Network > Programming Essentials.' It is an entry-level book at best, but it does go > over quite a lot of things that the Twisted library is

Re: I am taking a programming performance match!

2006-12-21 Thread [EMAIL PROTECTED]
I'm sure it could do the job, but if the sole function is to be an IO relay, I would use a lower level language like C. Cheers, -T 一首诗 wrote: > Hi all, > > The question is like this: > > = > > One computer, 2 ethernet adapter. Receving UDP packages and send them > out th

I am taking a programming performance match!

2006-12-21 Thread 一首诗
Hi all, The question is like this: = One computer, 2 ethernet adapter. Receving UDP packages and send them out throught another adapter. The one who's program could support the heavies traffic could win a little bonus. = I am considerring tryin

Re: removing the header from a gzip'd string

2006-12-21 Thread Gabriel Genellina
At Thursday 21/12/2006 18:32, Fredrik Lundh wrote: > Hi, I have some code that takes a string and obtains a compressed > version using zlib.compress > > Does anybody know how I can remove the header portion of the compressed > bytes, such that I only have the compressed data remaining? what mak

Re: PythonCard Auto Placement

2006-12-21 Thread John Henry
Brandon McGinty wrote: > Hi All, > I'm getting started with pythoncard. > I'm wondering if there is any way to auto-place the gui elements that I > use, so that they are all visible, and aligned? > I would use the "layout/resource" editors, but I'm blind, so I can't see > where the elements end up

Re: Displaying contents of a file using PyWin

2006-12-21 Thread Gabriel Genellina
[Forwarded from [EMAIL PROTECTED] At Thursday 21/12/2006 13:51, MiguelS wrote: import win32ui from pywin.mfc import docview t = docview.DocTemplate() t.OpenDocumentFile("d:/temp/music.log", True) This caused windows to close PythonWin. This appears to be a problem with pywin32. Using releas

Re: tkFileDialog closes main application

2006-12-21 Thread mdmdmd
Thanks for the reply. I used your modified code to test. I ran the code on Windows Python 2.4 tcl/tk 8.4. When I opened the ui I: 1) click browse button 2) file dialog opens and I double click the file. When I do this, the selected file path is entered in Entry field. I don't need to close d

Re: Building python C++ extension modules using MS VC++ 2005?

2006-12-21 Thread weir
Sure you can build extensions for Python2.4 with VS2005, I've always done this way. And with Pyrex it is very very easy. Make sure to have a look at Pyrex: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression

2006-12-21 Thread aejw.com
Also regular expressions are (pretty much) universal accross a ton of languages... even search engines now provide some support for regular expressions... I know its a bit of a headache, but keep trying to learn it mate. Once you have it wrapped you will never look back. Adam - http://www.aejw.

Re: Why can't you use varargs and keyword arguments together?

2006-12-21 Thread Sandra-24
On Dec 21, 5:59 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >You just need to turn things around: > >>> def foo(a, b, c): > ... return a, b, c > ... > >>> args = range(2) > >>> foo(c=2, *args) > (0, 1, 2) > >>> You know, I feel like a real shmuck for not trying that... Th

Re: Building python C++ extension modules using MS VC++ 2005?

2006-12-21 Thread Sandra-24
You can use 2005 to build extensions for Python 2.5. I've done this with several extensions, both my own and others. I do not know if you can use it for Python 2.4, so I won't advise you on that. I thought Microsoft made its C/C++ compiler, version 7.1 (2003) freely available as a command line tool

Re: regular expression

2006-12-21 Thread Roman
Asper Faner wrote: > I seem to always have hard time understaing how this regular expression > works, especially how on earth do people bring it up as part of > computer programming language. Natural language processing seems not > enough to explain by the way. Why no eliminate it ? > It has very

Re: [ANN] PyInstaller 1.3 released

2006-12-21 Thread Giovanni Bajo
Robin Becker wrote: > OK I found the problem. First off I still see this message about > msvcr71.dll could not be extracted! > > in the debug output. > > Secondly I found that the icon I specified in the Makespec.py invocation > is actually being added to the distribution exe. I actually want t

Re: list1.append(list2) returns None

2006-12-21 Thread Gabriel Genellina
At Thursday 21/12/2006 14:50, Matimus wrote: The following will do exactly the same thing as the above: [code] def enlargetable(table,col): table.append(col) return table [/code] Which, by the way, was one of the first answers he got, by Edward Kozlowski. -- Gabriel Genellina Softla

Re: python-hosting.com projects: dead?

2006-12-21 Thread John J. Lee
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: [...] > As of this morning my project is back online, so my thanks to python > hosting/webfaction for that. I'm very grateful to them for the great > free service they have provided. I'm sorry that they are getting killed > with spam, but I'm also sor

RE: Fall of Roman Empire

2006-12-21 Thread Delaney, Timothy (Tim)
Hendrik van Rooyen wrote: > naaah - you don't have to worry - for real control He uses assembler. > with jump statements. > so the loops are closed. > > Unfortunately its not open source. Yet. People are working hard on reverse-engineering it though. I hope no one slaps them with a DMCA-style l

Re: def index(self):

2006-12-21 Thread Gert Cuykens
On 21 Dec 2006 09:44:48 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: > "George Sakkis" <[EMAIL PROTECTED]> wrote: > > @expr > def fn(...): ... > > is exactly equivalent to: > > def fn(...): ... > fn = (expr)(fn) > ok i did my homework reading about decorators http://www.python.org/doc/2.4.4/whatsn

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread John Machin
Bruno Desthuilliers wrote: > > Python is dynamic, and fighting against the language is IMHO a really > bad idea. The only places where theres a real need for this kind of > stuff are when dealing with the "outside world" (IOW : inputs and > outputs). And then packages like formencode can do much

Re: Why can't you use varargs and keyword arguments together?

2006-12-21 Thread Jean-Paul Calderone
On 21 Dec 2006 14:51:15 -0800, Sandra-24 <[EMAIL PROTECTED]> wrote: >I've always wondered why I can't do: > >def foo(a,b,c): >return a,b,c > >args = range(2) >foo(*args, c = 2) > >When you can do: > >foo(*args, **{'c':2}) You just need to turn things around: >>> def foo(a, b, c): ...

Why can't you use varargs and keyword arguments together?

2006-12-21 Thread Sandra-24
I've always wondered why I can't do: def foo(a,b,c): return a,b,c args = range(2) foo(*args, c = 2) When you can do: foo(*args, **{'c':2}) Whenever I stub my toe on this one, I always just use the second approach, which seems less readable. As with most things in Python, I've suspected the

Building python C++ extension modules using MS VC++ 2005?

2006-12-21 Thread Bo Peng
Dear list, I have been using mingw to build a python extension module. I had to jump through a number of hooks like the _ctype problem caused by the use of msvcr71.dll, but the module was mostly usable. Things become complicated when I use more and more boost libraries and mingw can not work w

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread Bruno Desthuilliers
Chris a écrit : > I'm not sure if this has been done before, It has... > but I couldn't easily find > any prior work on Google, so here I present a simple decorator for > documenting and verifying the type of function arguments. > Feedback/suggestions/criticism is welcome. Python is dynamic, an

13 second delay using select() with Popen3()

2006-12-21 Thread Jonathan Mark
hi all... I wrote a seemingly simple function (below) to use Popen3() and select() to run a program and capture its exit status, stdout output, and stderr output. It worked fine until the box was upgraded to Debian sarge. Now the call to select() always takes about 13 seconds before returning

Re: removing the header from a gzip'd string

2006-12-21 Thread Bjoern Schliessmann
Rajarshi wrote: > Does anybody know how I can remove the header portion of the > compressed bytes, such that I only have the compressed data > remaining? (Obviously I do not intend to perform the > decompression!) Just curious: What's your goal? :) A home made hash function? Regards, Björn --

Re: tkFileDialog closes main application

2006-12-21 Thread James Stroud
Eric Brunel wrote: > BTW, why do you create a sub-class of Frame for your application? Why > not create a sub-class of Tk instead? > The short answer is that inhereting from Frame will allow embedding of the application in another application. A Tk() can not be embedded like this. Tk is appro

Re: removing the header from a gzip'd string

2006-12-21 Thread Fredrik Lundh
Rajarshi wrote: > Hi, I have some code that takes a string and obtains a compressed > version using zlib.compress > > Does anybody know how I can remove the header portion of the compressed > bytes, such that I only have the compressed data remaining? what makes you think there's a "header porti

How to distribute an additional DLL to site-packages?

2006-12-21 Thread Bo Peng
Dear Python experts, I am writing a python extension module that needs to link with a third-party DLL. How can I copy this DLL to the site-packages directory along with my extension modules? It seems that data_files parameter can do this, but I do not know how to get the absolute destination d

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread bearophileHUGS
Chris wrote: > I'm not sure if this has been done before, I think this is the best implementation: http://oakwinter.com/code/typecheck/ I have never used it, but it seems well done. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

removing the header from a gzip'd string

2006-12-21 Thread Rajarshi
Hi, I have some code that takes a string and obtains a compressed version using zlib.compress Does anybody know how I can remove the header portion of the compressed bytes, such that I only have the compressed data remaining? (Obviously I do not intend to perform the decompression!) Thanks, --

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread Chris
On Dec 21, 3:57 pm, "Paul McGuire" <[EMAIL PROTECTED]> wrote: > "Chris" <[EMAIL PROTECTED]> wrote in messagenews:[EMAIL PROTECTED] > > > I'm not sure if this has been done before, but I couldn't easily find > > any prior work on Google, so here I present a simple decorator for > > documenting and v

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread Fredrik Lundh
Chris wrote: > I'm not sure if this has been done before see example 4 in the original specification: http://www.python.org/dev/peps/pep-0318/#examples -- http://mail.python.org/mailman/listinfo/python-list

GNUmed - new version released

2006-12-21 Thread Sebastian Hilbert
Hello, Today we are releasing a new GNUmed version. GNUmed is a package to manage medical offices. Version is up to 0.2.3 Version features and bug fixes are explained in our Wiki http://wiki.gnumed.de/bin/view/Gnumed/ReleaseStatus http://wiki.gnumed.de/bin/view/Gnumed/RoadMap Packages avail

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread Paul McGuire
"Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm not sure if this has been done before, but I couldn't easily find > any prior work on Google, so here I present a simple decorator for > documenting and verifying the type of function arguments. > Feedback/suggestions/critic

Decorator for Enforcing Argument Types

2006-12-21 Thread Chris
I'm not sure if this has been done before, but I couldn't easily find any prior work on Google, so here I present a simple decorator for documenting and verifying the type of function arguments. Feedback/suggestions/criticism is welcome. ''' 2006.12.21 Created. ''' import unittest import inspect

Re: query

2006-12-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > can anyone help me on indentation in python and tell me some nice text > editors used for a beginner in python? http://effbot.org/pyfaq/tutor-whats-the-best-editor-ide-for-python -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib.unquote and unicode

2006-12-21 Thread Martin v. Löwis
>>> The way that uri encoding is supposed to work is that first the input >>> string in unicode is encoded to UTF-8 and then each byte which is not in >>> the permitted range for characters is encoded as % followed by two hex >>> characters. >> Can you back up this claim ("is supposed to work") by

Re: How a script can know if it has been called with the -i command line option?

2006-12-21 Thread Carsten Haese
On Thu, 2006-12-21 at 11:22 -0800, [EMAIL PROTECTED] wrote: > Michele Simionato wrote: > > The subject says it all, I would like a script to act differently when > > called as > > $ python script.py and when called as $ python -i script.py. I looked > > at the sys module > > but I don't see a way t

Re: query

2006-12-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: > can anyone help me on indentation in python and tell me some nice text > editors used for a beginner in python? > You MUST tell us what platform you run on for us to make a recommendation. Remember Python runs on Windows, Linux, Mac, ... On Windows my current favorite i

Re: How a script can know if it has been called with the -i command line option?

2006-12-21 Thread commander . coder
Michele Simionato wrote: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should > I look? In the optpar

query

2006-12-21 Thread libintr
can anyone help me on indentation in python and tell me some nice text editors used for a beginner in python? -- http://mail.python.org/mailman/listinfo/python-list

Re: How a script can know if it has been called with the -i command line option?

2006-12-21 Thread Thomas Heller
Michele Simionato schrieb: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should > I look? > TIA, > >

PythonCard Auto Placement

2006-12-21 Thread Brandon McGinty
Hi All, I'm getting started with pythoncard. I'm wondering if there is any way to auto-place the gui elements that I use, so that they are all visible, and aligned? I would use the "layout/resource" editors, but I'm blind, so I can't see where the elements end up, and the controls for moving don'

Re: merits of Lisp vs Python

2006-12-21 Thread Rob Thorpe
Anders J. Munch wrote: > Rob Thorpe wrote: > > Anders J. Munch wrote: > >> Let u(t) be the actual memory used by the program at time t. > >> Let r(t) be the size of reachable memory at time t. > >> > >> Require that u(t) is a member of O(t -> max{t'<=t: r(t')}) > >> > >> There. That wasn't so hard,

python-list@python.org

2006-12-21 Thread Roman Yakovenko
On 21 Dec 2006 07:30:41 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a lot of functions returning "const std::string&". Every time I > wrap one of those I have to do it like this: > > class_.def("name", &someclass::bla, > boost::python::return_value_policy() > ); > > Is there a way

Re: list1.append(list2) returns None

2006-12-21 Thread Matimus
Pyenos wrote: > def enlargetable(table,col): > table.append(col) # the code won't return sorted lists :-o > return_the_fucking_table_bitch=table # assign it to a new variable to > return it > return return_the_fucking_table_bitch # :-| Maybe you were just trying to be funny, but ass

Re: merits of Lisp vs Python

2006-12-21 Thread Anders J. Munch
Rob Thorpe wrote: > Anders J. Munch wrote: >> Let u(t) be the actual memory used by the program at time t. >> Let r(t) be the size of reachable memory at time t. >> >> Require that u(t) is a member of O(t -> max{t'<=t: r(t')}) >> >> There. That wasn't so hard, was it? > > That's quite a clever def

[ANNOUNCE] pygtkmvc version 1.0.0 has been released

2006-12-21 Thread Roberto Cavada
Hi all, I'm proud to announce that the first stable release 1.0.0 of pygtkmvc has been released. ** pygtkmvc version 1.0.0 ** pygtkmvc is a fully Python-based implementation of the Model-View-Controller (MVC) and Observer p

Windows upgrade incomplete

2006-12-21 Thread Pete Forman
I've a few versions of Python on my XP PC, most recently Python 2.5. The file associations appear not to have been upgraded. Executing a .py file turned out to still be using 2.3. >assoc .py .py=Python.File >ftype Python.file Python.file=D:\PROGRA~1\Python23\python.exe "%1" %* Presumably if I'd

are there Tomboy and F-Spot equivalents?

2006-12-21 Thread Tshepang Lekhonkhobe
Hi, I dislike installing the entire Mono stack simply to take notes and manage photos, and am totally biased towards Python. At least for search I got Tracker, instead of Beagle. Are there equvalents applications for Tomboy and F-Spot which are written in Python. -- http://mail.python.org/mailman/

Re: Is there a way to push data into Microsoft Excel & Word from Python ?

2006-12-21 Thread Caleb Hattingh
Hi Paul > Thanks for the kind words! No, thank _you_ for taking the time to write such a useful document. regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

How a script can know if it has been called with the -i command line option?

2006-12-21 Thread Michele Simionato
The subject says it all, I would like a script to act differently when called as $ python script.py and when called as $ python -i script.py. I looked at the sys module but I don't see a way to retrieve the command line flags, where should I look? TIA, Michele Simionato -- http://mail.

Re: Displaying contents of a file using PyWin

2006-12-21 Thread MiguelS
Sorry, the code I posted was wrong. I tried import win32ui from pywin.mfc import docview t = docview.DocTemplate() t.OpenDocumentFile("d:/temp/music.log", True) This caused windows to close PythonWin. -- http://mail.python.org/mailman/listinfo/python-list

Strong Unix Developers wanted to work on OO-Database at Major Bank

2006-12-21 Thread Peter Isaacs
A premier bank in New York City is looking for strong unix developers to work on their homegrown OO-database. The ideal developer will have significant experience with one or more of a variety of languages including, Python, Perl, C++ or C. It is very important to have deep knowledge of u

Re: [ANN] Py++ - 0.8.5

2006-12-21 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Felix Benner wrote: > Roman Yakovenko schrieb: >> Hello! >> >> I'm pleased to announce the 0.8.5 release of Py++. > > I'm just wondering why there is a comp.lang.python.announce newsgroup. > Could it be for making announcements or would that be too obvious? Yes that's fo

Re: Displaying contents of a file using PyWin

2006-12-21 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, MiguelS wrote: > import win32ui > from pywin.mfc import docview > > t = object_template() > d = t.OpenDocumentFile("d:/temp/music.log", True) > > Crashes PythonWin What do you mean by `crashes`? Any chance you get a name error like:: NameError: name 'object_template'

Re: Displaying contents of a file using PyWin

2006-12-21 Thread MiguelS
import win32ui from pywin.mfc import docview t = object_template() d = t.OpenDocumentFile("d:/temp/music.log", True) Crashes PythonWin -- http://mail.python.org/mailman/listinfo/python-list

python-list@python.org

2006-12-21 Thread [EMAIL PROTECTED]
I have a lot of functions returning "const std::string&". Every time I wrap one of those I have to do it like this: class_.def("name", &someclass::bla, boost::python::return_value_policy() ); Is there a way to register a return value conversion for "const std::string&" so I can omit it every time

Question about Tkinter windows

2006-12-21 Thread Manuel Malo de Molina
Hi everyone, this is the first time I use Python. I'm working on an application using Tkinter and I would like that the windows could only be opened once, is there any option to get that? I don't know if I've explained myself: what I want is that if the user clicks on "Options", for example, and

Re: [ANN] Py++ - 0.8.5

2006-12-21 Thread Felix Benner
Roman Yakovenko schrieb: > Hello! > > I'm pleased to announce the 0.8.5 release of Py++. I'm just wondering why there is a comp.lang.python.announce newsgroup. Could it be for making announcements or would that be too obvious? -- http://mail.python.org/mailman/listinfo/python-list

Re: Stani's Python Editor - questions

2006-12-21 Thread Franz Steinhaeusler
On Thu, 21 Dec 2006 07:09:54 -0500, "Peter Decker" <[EMAIL PROTECTED]> wrote: >On 12/21/06, Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: > >> >Does not work for me! I'm getting messages like this: >> > >> >python:3255): Gtk-CRITICAL **: gtk_container_remove: assertion >> >`GTK_IS_TOOLBARcontaine

Re: [ANN] PyInstaller 1.3 released

2006-12-21 Thread Robin Becker
Robin Becker wrote: > Giovanni Bajo wrote: > >> yeah that's pretty cryptic. It's a known bug which I need to come around >> and fix it. Anyway, the message itself is harmless: if the program then >> exits, there is *another* problem. >> >> If you want to help with that, you could enable

treating MIME messages

2006-12-21 Thread Sergey Dorofeev
Hello all. Anybody who has idle time, please look at my version of MIME tools at http://www.fidoman.ru/prog/mime/. Questions and critical notes are welcome. If somebody will consider that interesting, I will refine these modules and put to pypi. -- http://mail.python.org/mailman/listinfo/pyth

Re: Good Looking UI for a stand alone application

2006-12-21 Thread Chris Mellon
On 12/20/06, Vincent Delporte <[EMAIL PROTECTED]> wrote: > On Tue, 19 Dec 2006 08:15:18 -0600, "Chris Mellon" <[EMAIL PROTECTED]> > wrote: > >There's a few more caveats I haven't addressed, and there are places > >where wx isn't perfect. > > BTW, do you know of a good article/book on writing cross-

Displaying contents of a file using PyWin

2006-12-21 Thread MiguelS
How do I display the contents of a file in a window using PyWin? Thanks, MS -- http://mail.python.org/mailman/listinfo/python-list

Re: What am I supposed to do with an egg?!

2006-12-21 Thread Sebastian 'lunar' Wiesner
Stephan Kuhagen <[EMAIL PROTECTED]> wrote > Sebastian 'lunar' Wiesner wrote: > >> Morpheus <[EMAIL PROTECTED]> wrote >> >>> So, what am I supposed to do here now? >> >> That's easy: Breed it... > > Since two days I'm fighting with myself not to make this joke. Thanks > for relieving me... No

[ANN] Py++ - 0.8.5

2006-12-21 Thread Roman Yakovenko
Hello! I'm pleased to announce the 0.8.5 release of Py++. What is Py++? = Py++ is an object-oriented framework for creating a code generator for Boost.Python library. Where is Py++? == Site: http://language-binding.net/pyplusplus/pyplusplus.html Download: http://langua

Re: an hex number problem

2006-12-21 Thread Eric Brunel
On Thu, 21 Dec 2006 13:33:51 +0100, <[EMAIL PROTECTED]> wrote: > Hello, > I got a number 19968: > > 1. how can I change it to the hex form 0x4e00, '0x%x' % 19968 > 2. and how can I change 0x4e00 to a python unicode character u"\u4e00"? unichr(19968) > thank you! HTH -- python -c "print ''.jo

[ANN] pygccxml - 0.8.5

2006-12-21 Thread Roman Yakovenko
Hello! I'm pleased to announce the 0.8.5 release of pygccxml. What is pygccxml? = "...The purpose of the GCC-XML extension is to generate an XML description of a C++ program from GCC's internal representation. " -- Introduction to GCC-XML The purpose of pygccxml is to read a ge

Re: What am I supposed to do with an egg?!

2006-12-21 Thread Stephan Kuhagen
Sebastian 'lunar' Wiesner wrote: > Morpheus <[EMAIL PROTECTED]> wrote > >> So, what am I supposed to do here now? > > That's easy: Breed it... Since two days I'm fighting with myself not to make this joke. Thanks for relieving me... Regards Stephan -- http://mail.python.org/mailman/listinfo/

Re: an hex number problem

2006-12-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I got a number 19968: >>> x = 19968 > 1. how can I change it to the hex form 0x4e00, >>> hex(x) '0x4e00' > 2. and how can I change 0x4e00 to a python unicode character u"\u4e00"? >>> unichr(x) u'\u4e00' also see: http://effbot.org/pyfaq/how-do-i-convert-a-

an hex number problem

2006-12-21 Thread could . net
Hello, I got a number 19968: 1. how can I change it to the hex form 0x4e00, 2. and how can I change 0x4e00 to a python unicode character u"\u4e00"? thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Simple Way To Determine If File Is Executable

2006-12-21 Thread Fredrik Lundh
Sebastian 'lunar' Wiesner wrote: >> no, I'm showing that a local file marked as executable overrides a >> shared one, even if the local file isn't actually an executable. > > Only if you have your system set up badly. The current directory > should not be in the search path, a

Re: What am I supposed to do with an egg?!

2006-12-21 Thread Sebastian 'lunar' Wiesner
Morpheus <[EMAIL PROTECTED]> wrote > So, what am I supposed to do here now? That's easy: Breed it... -- Freedom is always the freedom of dissenters. (Rosa Luxemburg) -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Simple Way To Determine If File Is Executable

2006-12-21 Thread Sebastian 'lunar' Wiesner
Fredrik Lundh <[EMAIL PROTECTED]> schrieb > Sebastian 'lunar' Wiesner wrote: > >>> you're confusing the shell's "is this file executable" check with >>> the loader's "can I execute this file" check: >>> >>> $ export PATH=.:$PATH >>> $ dd if=/dev/zero of=ls count=1 >>> 1+0 records in >>> 1+0 recor

Re: Need Simple Way To Determine If File Is Executable

2006-12-21 Thread Sebastian 'lunar' Wiesner
Fredrik Lundh <[EMAIL PROTECTED]> schrieb > Sebastian 'lunar' Wiesner wrote: > > no, I'm showing that a local file marked as executable overrides a > shared one, even if the local file isn't actually an executable. > >>> Only if you have your system set up badly. The current direct

Re: urllib.unquote and unicode

2006-12-21 Thread Walter Dörwald
Martin v. Löwis wrote: > Duncan Booth schrieb: >> The way that uri encoding is supposed to work is that first the input >> string in unicode is encoded to UTF-8 and then each byte which is not in >> the permitted range for characters is encoded as % followed by two hex >> characters. > > Can you

Re: Stani's Python Editor - questions

2006-12-21 Thread Peter Decker
On 12/21/06, Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: > >Does not work for me! I'm getting messages like this: > > > >python:3255): Gtk-CRITICAL **: gtk_container_remove: assertion > >`GTK_IS_TOOLBARcontainer) || widget->parent == GTK_WIDGETcontainer)' failed > >python:3255): Gtk-CRITICAL **

Re: Stani's Python Editor - questions

2006-12-21 Thread Franz Steinhaeusler
On Thu, 21 Dec 2006 11:58:48 +0100, Laszlo Nagy <[EMAIL PROTECTED]> wrote: > >>> 1. How can I navigate between opened files? Usually I open 10 or more >>> files at the same time. There is no way to quickly scroll the tabs and >>> select the one that I want. Tabs simply run out of my screen. >>>

Re: Regexp Neg. set of chars HowTo?

2006-12-21 Thread Paul McGuire
On Dec 20, 7:40 am, durumdara <[EMAIL PROTECTED]> wrote: > Hi! > > I want to replace some seqs. in a html. > Let: > a- > b > = ab > > but: > xxx - > b > must be unchanged, because it is not word split. > > I want to search and replace with re, but I don't know how to neg. this > set ['\ \n\t']. >

Re: rsync for python?

2006-12-21 Thread sam1
nienfeng wrote: > Hi, everyone > >I want to build rsync server that can run in linux and windows, and > configure by python. So I'm looking for something like rsync for python. >I find rsync.py and pysync. But rsync.py looks like a client mode, it > can't be a rsync server, is it? Can py

Re: Stani's Python Editor - questions

2006-12-21 Thread Laszlo Nagy
>> 1. How can I navigate between opened files? Usually I open 10 or more >> files at the same time. There is no way to quickly scroll the tabs and >> select the one that I want. Tabs simply run out of my screen. >> > > Normally with ctrl-tab, ctrl-shift-tab, ctrl-f6 ctrl-shift-f6 (at least

  1   2   >