ANN: uuid-0.1 Released

2006-03-27 Thread Jürgen Urner
uuid is a python module to generate RFC 4122 compatible UUIDs Somehow this module was missing in python, so I took over the struggle with the C sources and all those quirky bits and bytes. Most of them should now be in place to form one of these handy 128 bit identifiers. The module is capable

[ANN] Firedrop 0.2.0 - The Python Blog Client

2006-03-27 Thread Fuzzyman
It has finally happened, the release of `Firedrop 0.2.0 http://www.voidspace.org.uk/python/firedrop2/`_. The impatient can download the new release here : `Firedrop 0.2.0 (1.3mb) http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=firedrop2-0.2.0.zip`_ .. note:: The first

PyPy Tokyo sprint 23/4 - 29/4

2006-03-27 Thread Anders Chrigström
Tokyo PyPy Sprint: 23rd - 29th April 2006 The next PyPy sprint is scheduled to take place 23rd- 29th April 2006 (Sunday-Saturday) in Akihabara, Tokyo, Japan. We will together with FSIJ (Free Software Initiative of Japan) aim to promote

COM object pointer cast

2006-03-27 Thread Axel Bock
Hi, I am fooling around with the Python-COM bridge, and I have a little question with that. In the component I am using is a method which will return an Entry object - basically. In truth it returns some object which inherits from entry, and I know which one, but - as said - the method will only

Re: (not really) randon ideas

2006-03-27 Thread Tim Roberts
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: regarding the constants, this is more for the vm (and type safety). actually enums, constants and symbols can prolly be implemented more or less the same. Ewww. For some reason, there's just something about the vulgar construct prolly that really irks

Re: HIRING: PHP Developer

2006-03-27 Thread HiringDivision
I apologize. Google groups has restricted our contact email. To reach us, please send your quote to hiringdivision @ gmail.com. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: sending emails to a list of recipients

2006-03-27 Thread Tim Roberts
Gerard Flanagan [EMAIL PROTECTED] wrote: Kun wrote: i have the following code: -- import smtplib ... msg['Subject'] = 'Purchase Confirmation' msg ['From'] = From msg['To'] = emails s = smtplib.SMTP('.xxx.xxx.edu') s.login('x','')

Override default signal handler in interactive shell

2006-03-27 Thread pkassianidis
Hello everybody, I have written a python script which executes some functions and then returns to the python interactive shell prompt (In other words I use the command #!/usr/bin/python -i in the script's header. In this script I register my own handler for the SIGINT and SIGTERM handlers but

Re: sending emails to a list of recipients [update]

2006-03-27 Thread Tim Roberts
Kun [EMAIL PROTECTED] wrote: Kun wrote: i have the following code: -- import smtplib from email.MIMEText import MIMEText fp = open('confirmation.txt', 'rb') msg = MIMEText(fp.read()) From = '[EMAIL PROTECTED]' msg['Subject'] = 'Purchase

Re: HIRING: PHP Developer

2006-03-27 Thread Simon
I apologize. Google groups has restricted our contact email. To reach us, please send your quote to hiringdivision @ gmail.com. Thank you. Apologize to whom? Who/What are you replying to? Please note that we don't all use Google groups format your replies properly. Simon --

Re: __slots__

2006-03-27 Thread Antoon Pardon
Op 2006-03-25, John J. Lee schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] (Alex Martelli) writes: [...] you should be using pychecker or pylint [...] I'm curious, as somebody who doesn't regularly use these tools: How do they fit into your workflow? Do you run them every few hours, every

XMLRPCServer issues

2006-03-27 Thread looping
Hi, I had some issues with XMLRPCServer and I try to validate my workaround. My first try was this (somewhat self explaining code): from DocXMLRPCServer import DocXMLRPCServer from cx_Oracle import connect def get_task_list(user): sql = select ISS.ISS_ISSUE_NUMBER

Re: Menu For The Command Line?

2006-03-27 Thread Phoe6
Michael Sperlle wrote: When I bring up the command line interface, it looks like: [EMAIL PROTECTED] Then I type in some command, and it works! But there are lots of commands to type in, and I find it more and more difficult to remember them. This question is not for comp.lang.python.

Re: __slots__

2006-03-27 Thread Georg Brandl
Antoon Pardon wrote: Op 2006-03-25, John J. Lee schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] (Alex Martelli) writes: [...] you should be using pychecker or pylint [...] I'm curious, as somebody who doesn't regularly use these tools: How do they fit into your workflow? Do you run them

Re: Python multithreading problem

2006-03-27 Thread abhinav
thanks guys.I solved the problem by moving self.stdmutex.acquire() before if c5: -- http://mail.python.org/mailman/listinfo/python-list

python -U problem for 2.4.3c1 on Windows 2000 (was Does -U option really exist?)

2006-03-27 Thread Petr Prikryl
I did observe the problem when using the -U option on Windows 2000. Seems like some infinite recursion in cp1250.py -- see below. I did not try it with earlier versions of Python. Can this be reproduced on your computer? Thanks for your time and experience, pepr P.S. Thanks, Martin, for

Difference between 'is' and '=='

2006-03-27 Thread mwql
Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~ -- http://mail.python.org/mailman/listinfo/python-list

Re: datetime iso8601 string input

2006-03-27 Thread Rubic
Could [RFC 3339] be a candidate for a default consumption format for date-time strings? +1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between 'is' and '=='

2006-03-27 Thread Rene Pijlman
mwql: Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? http://docs.python.org/ref/comparisons.html -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between 'is' and '=='

2006-03-27 Thread Max M
mwql wrote: Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? is is like id(obj1) == id(obj2) 100+1 == 101 True 100+1 is 101 False They don't have the same id. (Think of id as

Re: __slots__

2006-03-27 Thread Antoon Pardon
Op 2006-03-27, Georg Brandl schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2006-03-25, John J. Lee schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] (Alex Martelli) writes: [...] you should be using pychecker or pylint [...] I'm curious, as somebody who doesn't regularly use these tools:

Re: XMLRPCServer issues

2006-03-27 Thread Brian Quinlan
1. Is there on option to get cx_Oracle to return string data as unicode rather than strings objects? XML-RPC aside, dealing with unicode objects might be better than dealing with encoded strings. 2. You might want to transmit integers as strings rather than use the XML-RPC integer type (which

Re: Difference between 'is' and '=='

2006-03-27 Thread Fuzzyman
mwql wrote: Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~ '==' is the equality operator. It is used to test if two objects are 'equal'. 'is' is the identity operator,

Properties

2006-03-27 Thread Ronny Mandal
Is there a way of checking whether the call to a set-function is called from within the class, e.g. the __init__() contra object.set()? Thanks. Ronny Mandal -- http://mail.python.org/mailman/listinfo/python-list

Re: New development windows, IronPython or PythonWin

2006-03-27 Thread Dan
Thanks to all, my main concern about anything Microsoft picks up and runs with is that they vear off just slightly from the standard and freeze everyone else out like they have done with their browser, javascript etc.. etc... etc... So for now I will try to use Python / PythonWin with the COM

Re: New development windows, IronPython or PythonWin

2006-03-27 Thread Fuzzyman
Dan wrote: Thanks to all, my main concern about anything Microsoft picks up and runs with is that they vear off just slightly from the standard and freeze everyone else out like they have done with their browser, javascript etc.. etc... etc... So for now I will try to use Python / PythonWin

Re: PIL image size reduction script

2006-03-27 Thread Philippe Martin
nikie wrote: Philippe Martin wrote: Hi, Thanks to the NG, I got the script hereunder working. 1) I am not certain that the call to convert does much (checking the doc) I think you only need it if your source image comes in a format that can't be stored into a jpeg file (e.g. 8-bit

Re: PIL image size reduction script

2006-03-27 Thread Philippe Martin
PS: where can I find those extra parameters in the doc (ex: quality) ... I must be blind. Philippe nikie wrote: Philippe Martin wrote: Hi, Thanks to the NG, I got the script hereunder working. 1) I am not certain that the call to convert does much (checking the doc) I think you only

Re: Difference between 'is' and '=='

2006-03-27 Thread Joel Hedlund
is is like id(obj1) == id(obj2) snip (Think of id as memory adresses.) Which means that is comparisons in general will be faster than == comparisons. According to PEP8 (python programming style guidelines) you should use 'is' when comparing to singletons like None. I take this to also include

Re: Difference between 'is' and '=='

2006-03-27 Thread Roy Smith
In article [EMAIL PROTECTED], Joel Hedlund [EMAIL PROTECTED] wrote: Which means that is comparisons in general will be faster than == comparisons. I thought that == automatically compared identify before trying to compare the values. Or am I thinking of some special case, like strings? --

Re: For loop and list comprehension similarity

2006-03-27 Thread s . lipnevich
I think I like generator comprehension in this case better than either list comprehension or a filter because both of the latter create a new full result list before the loop even begins. At least I suppose they do. Also, I think Mitja's suggestion if not test: continue and Terry's filter function

Re: Difference between 'is' and '=='

2006-03-27 Thread Peter Hansen
Roy Smith wrote: In article [EMAIL PROTECTED], Joel Hedlund [EMAIL PROTECTED] wrote: Which means that is comparisons in general will be faster than == comparisons. I thought that == automatically compared identify before trying to compare the values. Or am I thinking of some special

Re: Properties

2006-03-27 Thread bruno at modulix
Ronny Mandal wrote: Is there a way of checking whether the call to a set-function is called from within the class, e.g. the __init__() contra object.set()? import inspect help(inspect.stack) -- bruno desthuilliers python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in

Re: Difference between 'is' and '=='

2006-03-27 Thread Clemens Hepper
Roy Smith wrote: In article [EMAIL PROTECTED], Joel Hedlund [EMAIL PROTECTED] wrote: Which means that is comparisons in general will be faster than == comparisons. I thought that == automatically compared identify before trying to compare the values. Or am I thinking of some special

Re: PIL image size reduction script

2006-03-27 Thread nikie
Philippe Martin wrote: PS: where can I find those extra parameters in the doc (ex: quality) ... I must be blind. In the http://www.pythonware.com/library/pil/handbook/formats.htm page. Look in the JPEG section. Different file formats support different options. --

Re: What's the best way to learn perl for a python programmer?

2006-03-27 Thread Mirco Wahab
Hello vj I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggestions on what is the best way to get upto speed on perl? Perl is (imho) much more complex and somehow more powerful than Python (if you can handle it) - it has more development

Re: Advice for Python and Web Server/Services?

2006-03-27 Thread Ronald Davis
On Sunday 26 March 2006 5:00 pm, Dennis Lee Bieber wrote: Any possibility you need to specify an option on the socket connections to reuse-sockets without the normal time-out? The problem turned out to be keep-alive. Apparently, Comcast is limiting my inbound connections. Apache keeps the

Re: Nevow LivePage tutorial

2006-03-27 Thread Jean-Paul Calderone
On 26 Mar 2006 23:12:33 -0800, Mir Nazim [EMAIL PROTECTED] wrote: Hello, Can any one direct me to some tutorials for: 1. Nevow LivePage http://divmod.org/trac/wiki/DivmodNevow/Athena http://divmod.org/trac/browser/trunk/Nevow/examples/athenademo 2. Form handling in Nevow

Python, equivalent of set command

2006-03-27 Thread loial
In unix shell script I can do the following to get the status and values returned by a unix command OUTPUT=`some unix command` STATUS=$? if [ $STATUS -ne 0 ] then exit 1 else set $OUTPUT VAL1=$1 VAL2=$2 VAL3=$3 fi How can I achieve the same in python? I know how to run it via the

Re: Difference between 'is' and '=='

2006-03-27 Thread Dan Sommers
On Mon, 27 Mar 2006 14:52:46 +0200, Joel Hedlund [EMAIL PROTECTED] wrote: ... According to PEP8 (python programming style guidelines) you should use 'is' when comparing to singletons like None. I take this to also include constants and such ... This does *not* also mean constants and such:

Re: Python types

2006-03-27 Thread bruno at modulix
Dennis Lee Bieber wrote: On Mon, 27 Mar 2006 01:34:14 +0200, Bruno Desthuilliers [EMAIL PROTECTED] declaimed the following in comp.lang.python: Ok, so even if Python itself declares b and b2 (read: objects that names b and b2 are bound to) to be of the same type, you cannot apply the

Re: Difference between 'is' and '=='

2006-03-27 Thread mwql
It's really strange, if a = 1 b = 1 a is b == True the same thing applies for strings, but not for dict, lists or tuples I think the 'is' operator is useful for objects only, not for primitive types, I think I solved the mystery behind my bugged code =) --

Re: PIL image size reduction script

2006-03-27 Thread Philippe Martin
Many thanks nikie wrote: Philippe Martin wrote: PS: where can I find those extra parameters in the doc (ex: quality) ... I must be blind. In the http://www.pythonware.com/library/pil/handbook/formats.htm page. Look in the JPEG section. Different file formats support different options. --

Re: Nevow LivePage tutorial

2006-03-27 Thread Tim Parkin
Jean-Paul Calderone wrote: On 26 Mar 2006 23:12:33 -0800, Mir Nazim [EMAIL PROTECTED] wrote: 2. Form handling in Nevow http://divmod.org/trac/browser/trunk/Nevow/examples/formbuilder http://forms-project.pollenation.net/cgi-bin/trac.cgi Jean-Paul And

Re: Difference between 'is' and '=='

2006-03-27 Thread Benji York
mwql wrote: It's really strange, if a = 1 b = 1 a is b == True the same thing applies for strings Not quite: 'abc' is 'abc' True 'abc' is 'ab' + 'c' False -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Re: XMLRPCServer issues

2006-03-27 Thread looping
Brian Quinlan wrote: 1. Is there on option to get cx_Oracle to return string data as unicode rather than strings objects? XML-RPC aside, dealing with unicode objects might be better than dealing with encoded strings. I don't think cx_Oracle can return unicode string, so my code to convert

Re: Python, equivalent of set command

2006-03-27 Thread skip
loial In unix shell script I can do the following to get the status and loial values returned by a unix command loial OUTPUT=`some unix command` loial STATUS=$? loial if [ $STATUS -ne 0 ] loial then loial exit 1 loial else loial set $OUTPUT loial

Re: Difference between 'is' and '=='

2006-03-27 Thread Clemens Hepper
Dan Sommers wrote: This does *not* also mean constants and such: Python 2.4.2 (#1, Feb 22 2006, 08:02:53) [GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin Type help, copyright, credits or license for more information. a = 123456789 a == 123456789 True

Re: MVC in Python for web app dev

2006-03-27 Thread Don Taylor
[EMAIL PROTECTED] wrote: I'm aware that Pylons is trying to compete with Rails in the near future but I'm just not clear on how directly they are trying to compete...will Pylons have the same generation functions and other time saving goodies that RoR has or am I barking up the wrong tree?

Re: Module documentation

2006-03-27 Thread msoulier
Bruno Desthuilliers wrote: In the python shell, typing 'help(symbol)' should get you started most of the time. And honestly, it should work all of the time. If it doesn't, file a bug report. I can't stand it when that doesn't work. Some of us don't do all of our work with a browser handy, and a

Re: For loop and list comprehension similarity

2006-03-27 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Do you think this discussion is a proof that the following principle got violated, or do you think that loop with condition is not such an atomic thing to be subject to this: There should be one -- and preferably only one -- obvious way to do it. Mitja's suggestion

Re: Difference between 'is' and '=='

2006-03-27 Thread Felipe Almeida Lessa
Em Seg, 2006-03-27 às 08:23 -0500, Dan Sommers escreveu: On Mon, 27 Mar 2006 14:52:46 +0200, Joel Hedlund [EMAIL PROTECTED] wrote: ... According to PEP8 (python programming style guidelines) you should use 'is' when comparing to singletons like None. I take this to also include constants

Re: Difference between 'is' and '=='

2006-03-27 Thread Diez B. Roggisch
mwql wrote: It's really strange, if a = 1 b = 1 a is b == True the same thing applies for strings, but not for dict, lists or tuples I think the 'is' operator is useful for objects only, not for primitive types, I think I solved the mystery behind my bugged code =) The reason that

Next PyPy Sprint: Tokyo 23/4 - 29/4

2006-03-27 Thread Carl Friedrich Bolz
Tokyo PyPy Sprint: 23rd - 29th April 2006 The next PyPy sprint is scheduled to take place 23rd- 29th April 2006 (Sunday-Saturday) in Akihabara, Tokyo, Japan. We will together with FSIJ (Free Software Initiative of Japan) aim to promote

Re: determine file type

2006-03-27 Thread Steven D'Aprano
On Sun, 26 Mar 2006 19:52:32 -0700, Mark Gibson wrote: import os def test_file(filename, maxread=1024): if os.path.isdir(filename): return 'directory' afile = open(filename) # open as text for achar in afile.read(maxread): if ord(achar) 127: return

Re: XMLRPCServer issues

2006-03-27 Thread Fredrik Lundh
looping wrote: 2. You might want to transmit integers as strings rather than use the XML-RPC integer type (which is limited to numbers between -2147483648 and 2147483647). Is it a limit of XML-RPC RFC or a limit (probably with a good reason) of the python xmlrpclib ? the specification

Re: COM Client / Server creation?

2006-03-27 Thread Dan
Thanks, I am going to try to implement with Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: adding a new line of text in Tk

2006-03-27 Thread Fredrik Lundh
Ben Cartwright wrote: w =Label(root, text=Congratulations you have made it this far,just a few more questions then i will be asking you some) The problem i have is where i have started to write some textCongratulations you have made it this far,just a few more questions then i

Re: XMLRPCServer issues

2006-03-27 Thread looping
Fredrik Lundh wrote: looping wrote: 2. You might want to transmit integers as strings rather than use the XML-RPC integer type (which is limited to numbers between -2147483648 and 2147483647). Is it a limit of XML-RPC RFC or a limit (probably with a good reason) of the python

Re: access mbx files?

2006-03-27 Thread David Isaac
Donn Cave, [EMAIL PROTECTED] I suppose it isn't supported by the mailbox module basically because it isn't all that commonly encountered. It may be more common on mail servers, but there it's email net protocol data, POP or IMAP. If Mahogany has been using this format for `local' folders

DELETE an image

2006-03-27 Thread ChengGong
hi guys, could u tell me how to delete images ( files) from a folder by using dtml tags in zope? Because I upload images there and test whether it is meet size requirment and then upload it to the folder it supposed to be. Pls help me, thanks. Cheng --

tkinter+matplotlib

2006-03-27 Thread Giacomo Boffi
i have coded some progs that use the Pmw.Blt.Graph widgets, embedded in a simple Tkinter GUI , | from Tkinter import * | import Pmw | ... | frame=Frame(root) | ... | graph=Pmw.Blt.Graph(frame,...) | graph.line_create(...) | graph.pack(...) ` now i'd like to port those progs to an

Re: Python, equivalent of set command

2006-03-27 Thread Jeffrey Schwab
loial wrote: In unix shell script I can do the following to get the status and values returned by a unix command OUTPUT=`some unix command` STATUS=$? if [ $STATUS -ne 0 ] then exit 1 else set $OUTPUT VAL1=$1 VAL2=$2 VAL3=$3 fi How can I achieve the same in python? I

COM server / COM client

2006-03-27 Thread Dan
Does the COM server created with python have to be compiled? I have the need to integrate database access but, I can not have any proprietary software. Meaning no compiled programs built by me. So, if python can do com clients and servers without compiling, Im good. But I don't know if that is

Re: a problem to solve

2006-03-27 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: And furthermore, having Python's bitwise operators is nice, but it's not nice enough. I need the bitwise functionality gmpy provides that's not available in Python: scan for position of least significant 1 or 0, Cute tricks (artifact of two's complement notation):

Re: access mbx files?

2006-03-27 Thread Donn Cave
Quoth David Isaac [EMAIL PROTECTED]: | Donn Cave, [EMAIL PROTECTED] | I suppose it isn't supported by the mailbox module basically because | it isn't all that commonly encountered. It may be more common on mail | servers, but there it's email net protocol data, POP or IMAP. If | Mahogany has

Re: maximum() efficency

2006-03-27 Thread Arne Ludwig
Just for completeness: The functions in Steve's original post named maximum calculate the minimum. Also, timing-wise, on my machine with a random list of 20 integers Steve's iteration version and Mitja's version are about equal, the system built-in is equal or slightly slower, and Paul's

Re: COM server / COM client

2006-03-27 Thread Larry Bates
Dan wrote: Does the COM server created with python have to be compiled? I have the need to integrate database access but, I can not have any proprietary software. Meaning no compiled programs built by me. So, if python can do com clients and servers without compiling, Im good. But I don't know

encode short string as filename (unix/windows)

2006-03-27 Thread robert
want to encode/decode an arbitrary short 8-bit string as save filename. is there a good already builtin encoding to do this (without too much inflation) ? or re.sub expression? or which characters are not allowed in filenames on typical OS? robert --

Re: Accessing func_name from inside a function

2006-03-27 Thread Scott David Daniels
Eyal Lotem wrote: By the way, the real problem here is referencing by name, rather than using true references. Which is the result of using a textual language. The real solution would be to store real-references to the function and only present the name in a graphical interface. There is a

Re: encode short string as filename (unix/windows)

2006-03-27 Thread Grant Edwards
On 2006-03-27, robert [EMAIL PROTECTED] wrote: want to encode/decode an arbitrary short 8-bit string as save filename. is there a good already builtin encoding to do this (without too much inflation) ? or re.sub expression? or which characters are not allowed in filenames on typical OS?

Re: encode short string as filename (unix/windows)

2006-03-27 Thread nikie
want to encode/decode an arbitrary short 8-bit string as save filename. is there a good already builtin encoding to do this (without too much inflation) ? or re.sub expression? or which characters are not allowed in filenames on typical OS? On Windows, / \ : * ? | are forbidden, and the

Re: encode short string as filename (unix/windows)

2006-03-27 Thread Diez B. Roggisch
robert wrote: want to encode/decode an arbitrary short 8-bit string as save filename. is there a good already builtin encoding to do this (without too much inflation) ? or re.sub expression? Yuu could use the base64-encoder. Disadvantage is clearly that you can't easily read your original

Re: maximum() efficency

2006-03-27 Thread Paul McGuire
Arne Ludwig [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Just for completeness: The functions in Steve's original post named maximum calculate the minimum. Also, timing-wise, on my machine with a random list of 20 integers Steve's iteration version and Mitja's version are

Re: encode short string as filename (unix/windows)

2006-03-27 Thread Jean-Paul Calderone
On Mon, 27 Mar 2006 18:13:17 +0200, Diez B. Roggisch [EMAIL PROTECTED] wrote: robert wrote: want to encode/decode an arbitrary short 8-bit string as save filename. is there a good already builtin encoding to do this (without too much inflation) ? or re.sub expression? Yuu could use the

Re: COM object pointer cast

2006-03-27 Thread Simon Brunning
On 27 Mar 2006 00:19:09 -0800, Axel Bock [EMAIL PROTECTED] wrote: I am fooling around with the Python-COM bridge, and I have a little question with that. In the component I am using is a method which will return an Entry object - basically. In truth it returns some object which inherits from

Re: object references

2006-03-27 Thread Steven D'Aprano
On Sat, 25 Mar 2006 21:33:24 -0800, DrConti wrote: Dear Python developer community, I'm quite new to Python, so perhaps my question is well known and the answer too. I need a variable alias ( what in other languages you would call a pointer (c) or a reference (perl)) Others have given

Re: COM server / COM client

2006-03-27 Thread Dan
Sounds like you are walking a fine line on the no compiled programs written by me thing. Yeah, I hate it. I could have written a C++ server, client application etc.. very easily. Instead, I have had to write javascript on the client to embed in an html page to view, insert,delete etc.. SQL server

Re: encode short string as filename (unix/windows)

2006-03-27 Thread Steven D'Aprano
On Mon, 27 Mar 2006 08:14:07 -0800, nikie wrote: want to encode/decode an arbitrary short 8-bit string as save filename. is there a good already builtin encoding to do this (without too much inflation) ? or re.sub expression? or which characters are not allowed in filenames on typical OS?

Re: encode short string as filename (unix/windows)

2006-03-27 Thread robert
Jean-Paul Calderone wrote: punycode is used by dns. A commonly used email codec is quoted-printable. Here's an example of each: u'Helló world'.encode('utf-8').encode('quopri') 'Hell=C3=B3=20world' u'Helló world'.encode('punycode') 'Hell world-jbb' Note the extra

using a perl mod

2006-03-27 Thread David Bear
almost 41 million hits from google about using perl mod's in python was a bit discouraging...So, I thought about asking humans. There are some perl modules written to manage files, acls, etc in afs. Rather than wrapping the c-compiled versions of afs commands in sys.popen and parsing the output,

Re: encode short string as filename (unix/windows)

2006-03-27 Thread robert
Steven D'Aprano wrote: On Mon, 27 Mar 2006 08:14:07 -0800, nikie wrote: want to encode/decode an arbitrary short 8-bit string as save filename. is there a good already builtin encoding to do this (without too much inflation) ? or re.sub expression? or which characters are not allowed in

front end GUI

2006-03-27 Thread DataSmash
I'm looking for software to create a simple GUI to execute python code for users in the office. The GUI would need a couple text boxes for user input and some option buttons and check boxes. Can anyone recommend free software that doesn't require a huge learning curve? My python skills are

Where does Python look for libraries?

2006-03-27 Thread ACB
I have been trying to get the gdmodule installed and have run into an issue. When I import gd I get the following error. import gd Traceback (most recent call last): File stdin, line 1, in ? File /usr/local/lib/python2.3/site-packages/gd.py, line 10, in ? import _gd ImportError:

CGI redirection: let us discuss it further

2006-03-27 Thread Sullivan WxPyQtKinter
I am now programming python scripts for CGI environment. The redirection has been discussed in this forum for over one hundred times. I have seen most of them, but still have some questions: 1. Are there any method (in python of course) to redirect to a web page without causing a Back button

Re: Difference between 'is' and '=='

2006-03-27 Thread filipwasilewski
Clemens Hepper wrote: It's strange: python seem to cache constants from 0 to 99: That's true. The Python api doc says that Python keeps an array of integer objects for all integers between -1 and 100. See http://docs.python.org/api/intObjects.html. This also seems to be true for integers from -5

Re: using a perl mod

2006-03-27 Thread Paddy
Don't know if there is a way to call perl from Python but the perl inline python module allows you to call perl from python from within an outer perl interpreter. Thts what I make of the following anyway: http://aspn.activestate.com/ASPN/CodeDoc/Inline-Python/Python.html - Paddy. --

Re: using a perl mod

2006-03-27 Thread Paddy
There is also:PyPerl at: http://search.cpan.org/dist/pyperl/perlmodule.pod But you need to check if it is current. - Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between 'is' and '=='

2006-03-27 Thread Donn Cave
In article [EMAIL PROTECTED], Diez B. Roggisch [EMAIL PROTECTED] wrote: ... So - your conclusion is basically right: use is on (complex) objects, not on numbers and strings and other built-ins. The exception from the rule is None - that should only exist once, so foo is not None is

Re: front end GUI

2006-03-27 Thread Diez B. Roggisch
DataSmash schrieb: I'm looking for software to create a simple GUI to execute python code for users in the office. The GUI would need a couple text boxes for user input and some option buttons and check boxes. Can anyone recommend free software that doesn't require a huge learning curve? My

pysqlite

2006-03-27 Thread abcd
anyone have v2.x of pysqlite that I could download? the website is down for a hardware upgrade with no date as to when it will be back. I checked sourceforge but there are no files there to download. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI redirection: let us discuss it further

2006-03-27 Thread Sybren Stuvel
Sullivan WxPyQtKinter enlightened us with: 1. Are there any method (in python of course) to redirect to a web page without causing a Back button trap(ie, when user click the back button on their web browser, they are redirect to their current page, while their hope is probably to go back to

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-27 Thread funkyj
Going in a slightly different direction ... There has been lots of published work on how to create efficient FSMs from regexps. Generally these FSMs are used for pattern matching (i.e. does string 's' match regexp 'e'?). Is there any corresponding literature on the topic addressed by the OP's

Re: pysqlite

2006-03-27 Thread abcd
Dennis Lee Bieber wrote: On 27 Mar 2006 10:17:21 -0800, abcd [EMAIL PROTECTED] declaimed the following in comp.lang.python: anyone have v2.x of pysqlite that I could download? the website is down for a hardware upgrade with no date as to when it will be back. Source or binary (or

problems with looping, i suppose

2006-03-27 Thread John Salerno
Here's an exercise I was doing to guess a number from 1-100. Just for fun (ha ha) I decided to add some error checking too, and now when I run it, the DOS prompt flashes real quick and disappears. At first, I had just the top try/except block and not the second one, and that worked (as far as

Re: problems with looping, i suppose

2006-03-27 Thread John Salerno
John Salerno wrote: Here's an exercise I was doing This might help: import random number = random.choice(range(1, 100)) tries = 0 while True: try: guess = input('Enter a number between 1 and 100: ') break except NameError: print 'Invalid number\n'

Re: object references

2006-03-27 Thread bruno at modulix
Steven D'Aprano wrote: On Sat, 25 Mar 2006 21:33:24 -0800, DrConti wrote: Dear Python developer community, I'm quite new to Python, so perhaps my question is well known and the answer too. I need a variable alias ( what in other languages you would call a pointer (c) or a reference (perl))

Re: problems with looping, i suppose

2006-03-27 Thread John Salerno
John Salerno wrote: Here's an exercise I was doing to guess a number from 1-100. Here's another question that is related: while True: year = raw_input('Enter year (or other character to quit): ') try: year = int(year) except NameError: break if (year % 4

Re: problems with looping, i suppose

2006-03-27 Thread [EMAIL PROTECTED]
Just barely looked the code answer: check you scope on the second try block. if that doesn't work... I'll read it for real :) Try PyDev plugin with eclipse - it's served me fairly well, but I did come from Java - so I'm an eclipse fan already. --

Re: object references

2006-03-27 Thread Scott David Daniels
DrConti wrote: I need a variable alias ( what in other languages you would call a pointer (c) or a reference (perl)) Or, you think you need it. I read some older mail articles and I found that the offcial position about that was that variable referencing wasn't implemented because it's

  1   2   3   >