Re: FAQ: How do I calculate what quoted strings and numbers mean?

2006-11-15 Thread p . lavarre
> A FAQ that discusses good ways to handle Python-like literals and > expressions would definitely be a useful addition to the FAQ. if nobody > else does anything about it, I'll get there sooner or later. Thank you. > > eval(source, {'builtins': {}}) works enough like an evaluator of > > liter

Tkinter Problems on MAC OS 10.3.9 & python2.5

2006-11-16 Thread Thomas P.
Hello folks, my name is Thomas, and I am new to this newsgroup. So first I want to say hello. :-) ...done! Now, I have a problem concerning my new python2.5 install. With python2.3 and 2.4, Tkinter was no problem. Now, when I try to import it, the folowing happens: iPimpG4:~/Python-Dev/example

SAX2 Download

2006-11-28 Thread Mike P
Does anyone know where i can download acopy of the SAX2 module? Cheers Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: SAX2 Download

2006-11-28 Thread Mike P
Fredrik Lundh wrote: > Mike P wrote: > > > Does anyone know where i can download acopy of the SAX2 module? > > the built-in xml.sax module implements the SAX 2 protocol, if that's > what you're looking for: > > http://docs.python.org/lib/module-xml.sax

win32 com problem

2006-12-05 Thread Mike P
I've got a slight problem when running an excel macro from python using the win32.com.client module, in that it says it can't load the DLL file (it doesn't say which one) and gives me the following error message Traceback (most recent call last): File "", line 93, in ? File ">", line 14, in R

Re: win32 com problem

2006-12-05 Thread Mike P
Thanks for the quick reply, the code i am running is the following import win32com.client xl = win32com.client.Dispatch("Excel.Application") ppt = win32com.client.Dispatch("PowerPoint.Application") ppt.Visible = 1 #open MS Powerpoint xl.Visible = 1 #open MS Excel xl.Workbooks.Open('%s/working_out

Re: win32 com problem

2006-12-05 Thread Mike P
No Problem, Thanks for your help so far, i've sent this problem off to SPSS as it seems it doesn't work on a work colleagues machine either Thanks for your time though Mike -- http://mail.python.org/mailman/listinfo/python-list

Invalid pointer when accessing DB2 using python scripts

2007-05-21 Thread P. Adhia
ially supports only PHP, ruby and perl, does IBM have any plans to support python bindings for DB2? Thanks P Adhia Environment: Ubuntu : Fiesty Fawn Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) DB2 9.1.2 Error: *** glibc detected *** python: free(): invalid pointer: 0xppp *** A s

Invalid pointer when accessing DB2 using python scripts

2007-05-21 Thread P. Adhia
ially supports only PHP, ruby and perl, does IBM have any plans to support python bindings for DB2? Thanks P Adhia Environment: Ubuntu : Fiesty Fawn Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) DB2 9.1.2 Error: *** glibc detected *** python: free(): invalid pointer: 0xppp *** A s

Python 2.5 and WXPython demo's

2007-05-30 Thread Andrew P
Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows XP and it can't find a program to run the demo. Any advice? (apologies if this has been posted before). --

Re: Python 2.5 and WXPython demo's

2007-05-30 Thread Andrew P
On May 30, 12:24 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Andrew P wrote: > > Hello, > > > I am new (very) to Python and have just down loaded the latest version > > of Python (2.5) and WXPython (2.8). > > > For some reason I cannot get the WXPython d

FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
How do I vary the byte offset of a field of a ctypes.Structure? How do I "use the dynamic nature of Python, and (re-)define the data type after the required size is already known, on a case by case basis"? \\\ For example, suppose sometimes I receive the value '\x03hi' + \x04bye' for the struct:

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
ctypes.sizeof(a) is still zero, as if ctypes.Structure.__init__ fetches a.__class__._fields_ rather than a._fields_ -- http://mail.python.org/mailman/listinfo/python-list

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
""" Thomas, Ouch ouch I must have misunderstood what you meant by "use the dynamic nature of Python, and (re-)define the data type after the required size is already known, on a case by case basis". Do you have an example of what you meant? I searched but did not find. Are those your words? Yes,

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
I see that changing self._fields_ doesn't change ctypes.sizeof(self). I guess ctypes.Structure.__init__(self) fetches self.__class__._fields_ not self._fields_. -- http://mail.python.org/mailman/listinfo/python-list

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-06-01 Thread p . lavarre
> Often it helps to ask yourself the question: How would I do this in C? ... > > *Not* by using a structure. A structure is fine if the definition is fixed, > or at most has *one* variable sized field at the very end. http://docs.python.org/lib/module-pickle.html might be near where I'll find conc

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-06-04 Thread p . lavarre
> > http://docs.python.org/lib/module-pickle.html > > ... concise Python ways of pickling and unpickling > > the (0xFF ** N) possible ways of > > packing N strings of byte lengths of 0..xFE together ... Aye, looks like an exercise left open for the student to complete: >>> pickle.dumps("") "S''\n

Re: Cool Ebooks Site

2006-07-13 Thread Michael P.
Hey, pretty impressive list. I downloaded a few myself. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting HTTP responses - a python linkchecking script.

2006-05-08 Thread p-d-p=pas-de-spam
[EMAIL PROTECTED] a écrit : > Hi Folks, > > I'm thinking about writing a script that can be run over a whole site > and produce a report about broken links etc... > > I've been playing with the urllib2 and httplib modules as a starting > point and have found that with urllib2 it doesn't seem poss

xml parsing escape characters

2005-01-19 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I only know a little bit of xml and I'm trying to parse a xml document in order to save its elements in a file (dictionaries inside a list). When I access a url from python 2.3.3 running in Linux with the following lines: resposta = urllib.u

Re: xml parsing escape characters

2005-01-20 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 this is the xml document: http://www..";> ~ ~ 439 (... others ...) ~ When I do: print xmldoc.toxml() it prints: http://www...";> ~ ~439

Re: xml parsing escape characters

2005-01-20 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would like to thank everyone for your answers, but I'm not seeing the light yet! When I access the url via the Firefox browser and look into the source code, I also get: ~ ~439 ~ should

Re: xml parsing escape characters

2005-01-21 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ~From your experience, do you think that if this wrong XML code could be meant to be read only by somekind of Microsoft parser, the error will not occur? I'll try to explain: xml producer writes the code in Windows platform and 'thinks' that every clie

Re: xml parsing escape characters

2005-01-21 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ~From your experience, do you think that if this wrong XML code could be meant to be read only by somekind of Microsoft parser, the error will not occur? I'll try to explain: xml producer writes the code in Windows platform and 'thinks' that every clie

An interesting python problem using Zope 2.7.3

2005-02-05 Thread ranjith g p
Greetings!!! I ran the following simple string commands in Linux + Python and the results are: [EMAIL PROTECTED] root]# python Python 2.2.2 (#1, Feb 24 2003, 19:13:11) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>

Re: Web framework

2005-03-13 Thread andre . p . meyer
Gianluca Sartori wrote: > Hi guys, > > What web framework do you suggest to develop with? I had a look both at > Nevow and Quixote. These seemes to be the most appreciated by the > community. Anyway, I had no luck looking for a complete and coherent > documentation. > > Thanks for any suggestion,

Re: Web framework

2005-03-13 Thread andre . p . meyer
You should definitely have a look at Zope 3. There is good documentation available and it can do a lot of good stuff. -- http://mail.python.org/mailman/listinfo/python-list

Re: BitKeeper for Python?

2005-05-02 Thread John P. Speno
In <[EMAIL PROTECTED]> Ville Vainio <[EMAIL PROTECTED]> writes: >> "Bruce" == Bruce Stephens <[EMAIL PROTECTED]> writes: >Bruce> Nick Craig-Wood <[EMAIL PROTECTED]> writes: >Bruce> [...] >>> You could try Mercurial >>> >>> http://www.selenic.com/mercurial/ >Bruce> Or

Dive into Python java equivalent

2005-05-13 Thread Luis P. Mendes
Hi, do you know if is there any 'Dive into Python' equivalent for the java language? DiP is the best I've seen and I would need to learn some basics of Java and also ways to interact between the two languages. (I'm already aware of Jpype and Jython) Luis -- http://mail.python.org/mailman/lis

speeding up Python

2005-05-17 Thread Luis P. Mendes
Hi, I have a 1000 line python script that takes many hours to finish. It is running with six inside 'for' loops. I've searched the net for ways to speed up the proccess. Psyco improves performance around 3% in this case which is not good enough. How can I dramatically improve speed? I tried

speeding up Python script

2005-05-17 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a 1000 line python script that takes many hours to finish. It is running with six inside 'for' loops. I've searched the net for ways to speed up the proccess. Psyco improves performance around 3% in this case which is not good enough. H

A Specific PyGame

2005-05-17 Thread Michael P. Nugent
I am looking for a specific "game" that is really a programming environment for young kids. I believe it implements PyGame, and presents two windows: one is a grid with some obstacles, and a character that must traverse the grid; another is an interactive editor that encourages a learner to wri

Re: A Specific PyGame

2005-05-17 Thread Michael P. Nugent
Greg Krohn wrote: > Michael P. Nugent wrote: > >> I am looking for a specific "game" that is really a programming >> environment for young kids. >> >> I believe it implements PyGame, and presents two windows: one is a >> grid with some obstacle

Re: speeding up Python script

2005-05-18 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The reason why I'm using six nested for loops is because I need to find the best output using those six variables as input. Here's the simplified code: for per in range(): ~for s in range(): ~for t in range(): for v in range()

Re: speeding up Python script

2005-05-18 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I appreciate everyone's help! I got some ideas that I'll try to put into practice. Regards, Luis -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCi7QQHn4UHCY8

Pyrex: TypeError: unsubscriptable object

2005-05-24 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm just transforming a Python module into Pyrex, and I get the following error: File "indicadorPyrex.pyx", line 37, in indicadorPyrex.volatilidade ~h1 = precoMax[barra] I made no changes to this module except including 'int' for two variable

Pyrex: step in for loop

2005-05-26 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to improve speed in a module and substituted the pythonic 'for in range()' for 'for i from min < i < max:' But, I need to define a step for the i variable. How can I do it? for example, how do I iterate through 8 to 14 with s

Re: Pyrex: step in for loop

2005-05-26 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | so it's | | for i in range(8, 14, 1): ... | | http://enigmail.mozdev.org iD8DBQFClkmlHn4UHCY8rB8RAlUqAKCxSEkEKVIcoshTwmL7GQNK6d/j0wCgoC67 jOhuXQpnDt23SEAM9huKTQA= =8XO0 -END PGP SIGNATURE- -- http://mail.python.org/mailman/

Re: Daisy Daisy, give me your answer do

2005-10-09 Thread Martin P. Hellwig
Michael Goettsche wrote: > You're asking "tech geekers" and "morons" to do this job? Isn't that a task > for somebody more professional like you? I think he's doing a shot to the position of open-source leader, judging on the replies he has got till so far, that shot was not really effective.

Re: Microsoft Hatred FAQ

2005-10-15 Thread Martin P. Hellwig
Jeroen Wenting wrote: > > Without Microsoft 90% of us would never have seen a computer more powerful > than a ZX-81 and 90% of the rest of us would never have used only dumb > mainframe terminals. At the time you "PC" guys where hacking around monochrome green and a bit lighter green screens

Re: Microsoft Hatred FAQ

2005-10-15 Thread Martin P. Hellwig
John Bokma wrote: > You mean like the lamp that keeps burning forever, like Philips has? > No more like all the hydrogen technologies that shell has in their possession for the last decades and only recently has begun to restart those projects. >> Although Commodore where never serious compet

pyHook example.py brakes windows dead keys mechanisme

2005-10-22 Thread Martin P. Hellwig
Hi all, I noticed that the "dead keys"* mechanism (XPSP2 NL, keyboard map US, input language Dutch) doesn't work when running the pyHooks (python 241) example. Instead of ö ("o) I immediately get ""o. If I close the pyHooks example the expected behavior returns. Is there a way how I can get bot

Re: Microsoft Hatred FAQ

2005-10-25 Thread Martin P. Hellwig
Not Bill Gates wrote: > [EMAIL PROTECTED] wrote... >> On Tue, 25 Oct 2005 15:35:47 +, Not Bill Gates wrote: >> >>> Heck, I dunno. Like you, I don't even really care all that much. >> You don't care that innovation in desktop software has been crippled by >> the actions of the monopoly player

Re: Microsoft Hatred FAQ

2005-10-25 Thread Martin P. Hellwig
David Schwartz wrote: > It's easy to point to things you think are mistakes and claim that if > you had been in charge of the world, those mistakes would not have been > made. If you are trying to balance completely different possible paths the > universe might have taken, you need to make

Re: Python Linked list?

2005-10-31 Thread Michael P. Soulier
simply make one via references in a class? class MyNode(object): next = None Should do it, no? Mike -- Michael P. Soulier <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: I need Motivation

2005-11-03 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: > I m not a python Expert or anythin > i need help, i m losin my motivation to continue with python > can anyone inspire me again.??? Ooh that is easy, start learning other programming languages, you'll go back continuing with python very soon after that! ;-) -- mph --

Re: I need Motivation

2005-11-04 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: > Martin P. Hellwig wrote: >> [EMAIL PROTECTED] wrote: >>> I m not a python Expert or anythin >>> i need help, i m losin my motivation to continue with python >>> can anyone inspire me again.??? >> Ooh that is easy, start learn

Re: Can't instantiate class

2005-11-06 Thread Michael P. Soulier
Util, and by calling DataUtil(), you're trying to call the module, hence the error. I think you want db = DataUtil.DataUtil() Or, from DataUtil import DataUtil And then your code will work. Mike -- Michael P. Soulier <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: web interface

2005-11-07 Thread Charl P. Botha
rvers and web frameworks is that it's natively multi-processing vs. multi-threading. [1] http://www.skunkweb.org/ [2] http://wiki.skunkweb.org/sw/ExampleOfMonitoringLongRunningProcess -- charl p. botha - http://cpbotha.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython Licence vs GPL

2005-11-24 Thread Martin P. Hellwig
Steven D'Aprano wrote: > I'm FREE to use the software, FREE to redistribute it, FREE to give it > away, FREE to make derivative works, FREE to transfer the licence, *and* > I got it FREE of cost as well, but that doesn't make it free. > Indeed, when I explain GPL to non-techies and what their (

Re: wxPython Licence vs GPL

2005-11-24 Thread Martin P. Hellwig
Mike Meyer wrote: > "Martin P. Hellwig" <[EMAIL PROTECTED]> writes: >> If the non-techie is still interested, I'll rave on about that I >> understand why GPL is a good way to ensure availability of IP >> especially if the software is a collaborated

Re: wxPython Licence vs GPL

2005-11-24 Thread Martin P. Hellwig
Mike Meyer wrote: > > Is that software really unavailable, or just unavailable for free? If > the latter, then it's not unavailabe. If the former, the it didn't > become unavailable, as it was never available in the first place. > In the latter case, you could also use those examples to similarly

Re: wxPython Licence vs GPL

2005-11-24 Thread Martin P. Hellwig
Mike Meyer wrote: > > Well, they chose to make it available to others for reuse. But > software "unavailable to those who can't afford it" is better than "no > software at all" That I do not agree with, I think it depends on which your side of the fence you are. For instance I have a specific

Re: wxPython Licence vs GPL

2005-11-26 Thread Martin P. Hellwig
Steven D'Aprano wrote: > On Thu, 24 Nov 2005 23:26:38 +0100, Martin P. Hellwig wrote: > >> BSD/MIT style license is a >> good substitute of no license at all. > > But that's not true: "no licence at all" means that nobody has the right > to u

Re: wxPython Licence vs GPL

2005-11-26 Thread Martin P. Hellwig
Steven D'Aprano wrote: > On Thu, 24 Nov 2005 17:43:22 +0100, Martin P. Hellwig wrote: > >> if I owned a company >> making profit on software sales (sale =! support) you sign a death wish >> for using GPL > > Apart from Microsoft, and possibly Quark (makers o

Re: wxPython Licence vs GPL

2005-11-26 Thread Martin P. Hellwig
Steven D'Aprano wrote: > > > I think you are over-estimating both the numbers and profitability of such > niche software distributors, and misunderstanding the business models of > them. Coincidently, I worked at a software company making a "standard" administration software for primary school

Re: wxPython Licence vs GPL

2005-11-27 Thread Martin P. Hellwig
Steven D'Aprano wrote: > On Sat, 26 Nov 2005 21:39:13 +0100, Martin P. Hellwig wrote: > >> The software was sold in 3 separates modules requiring a yearly renewal, > > The software is hardly sold if you have to renew that "sale" every year. > That's mo

need reading file in binary mode

2005-12-01 Thread Sergey P. Vazulia
this part of my code: f = file(work_dir + filename,'r') n = int(totalSize/recordLenth) i = 0 while i < n: buf = f.read(recordLenth); sometime (when find something like \0A\00\00 in data) returm less bytes then file have. Q: how-to read all data from bi

Re: need reading file in binary mode

2005-12-01 Thread Sergey P. Vazulia
Problem solved. "Sergey P. Vazulia" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:[EMAIL PROTECTED] > this part of my code: > > f = file(work_dir + filename,'rb') ^ >

Re: Detect character encoding

2005-12-04 Thread Martin P. Hellwig
Mike Meyer wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: >> Michal wrote: >>> is there any way how to detect string encoding in Python? >>> I need to proccess several files. Each of them could be encoded in >>> different charset (iso-8859-2, cp1250, etc). I want to detect it, >>> and enco

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread Martin P. Hellwig
Xah Lee wrote: Nice rant, btw in most EU countries the software creator can not withdraw the responsibility of his/her/it creation, regardless of what the disclaimer says. The law is the leading authority and not some Disclaimer/EULA, that's why most US EULA's are unauthoritative in the EU. --

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread Martin P. Hellwig
Ulrich Hobelmann wrote: > > The piece that a European programmer can never withdraw responsibility > could be a big problem to open-source software, though. I'm not sure > I'd want to freely publish anything that could result in liability for me. > Not that big of a problem, in EU a user is s

Easiest way to calculate number of character in string

2005-12-21 Thread P. Schmidt-Volkmar
Hi there, I have a string in which I want to calculate how often the character ';' occurs. If the character does not occur 42 times, the ";" should be added so the 42 are reached. My solution is slow and wrong: for Position in range (0, len(Zeile)): if Zeile[Position]==';': AnzahlS

Re: Guido at Google

2005-12-21 Thread Martin P. Hellwig
rbt wrote: > Alex Martelli wrote: >> I don't think there was any official announcement, but it's true -- he >> sits about 15 meters away from me;-). > > For Americans: 15 meters is roughly 50 feet. Well they could have used google for that ;-) http://www.google.com/search?hl=en&q=15+meter+in+feet

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-27 Thread Martin P. Hellwig
Ilias Lazaridis wrote: So I guess you volunteer http://www.python.org/psf/volunteer.html ? -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Martin P. Hellwig
Ilias Lazaridis wrote: > Martin P. Hellwig wrote: >> Ilias Lazaridis wrote: >> >> So I guess you volunteer http://www.python.org/psf/volunteer.html ? > > I volunteer and contribute already (with a general validity and python > specific analysis) > > A medi

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Martin P. Hellwig
Ilias Lazaridis wrote: >> The only thing that holds "you" theoretically back is "acknowledged >> authority by the participating group _and_ yourself" and of course the >> resource for "restricted" information. > > what do you mean by "resource for "restricted" information"? > Well, I mean that

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Martin P. Hellwig
Ilias Lazaridis wrote: I'm suspecting that we have different definitions (or at least the implications of that) of used terms. I think it's important to first define these definition in a form acceptable to both of us. In the link you gave, the title was "Efficiency Management". Now I believe t

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Martin P. Hellwig
Ilias Lazaridis wrote: > Martin P. Hellwig wrote: >> Ilias Lazaridis wrote: >> >> I'm suspecting that we have different definitions (or at least the >> implications of that) of used terms. >> I think it's important to first define these definition in a

Re: Application architecture (long post - sorry)

2006-01-01 Thread Martin P. Hellwig
Mike Meyer wrote: > [EMAIL PROTECTED] writes: >> I have looked at the options for developing the client for these >> "electronic job sheets" and have decided upon Microsoft Pocket PC and >> the .net compact framework. It seems the easiest environment for >> developing and the PDA's can be obtained

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-02 Thread Martin P. Hellwig
Anton Vredegoor wrote: > > Most people can survive (without damaging their souls so to speak) when > working for corruption themselves in this way, but sooner or later one > is asked to corrupt others (defending one's title during a promotion, > leading a community and so on). This is the crucial

how to operate the excel by python?

2005-06-17 Thread Kevin P. Coffey
Question please:   In the post, "How to operate the excel by python," where did you find the codes for HorizontalAlignment and VerticalAlignment (Center = -4108 and Bottom = -4107)?  I need the code for HorizontalAlignment = xlRight.  Is there a table somewhere that shows these codes?   Tha

oddness in super()

2005-06-18 Thread Michael P. Soulier
nit__ super(RemGuiFrame, self).__init__(*args, **kwds) TypeError: super() argument 1 must be type, not classobj Why the difference? Is Python portability overrated? Is this a bug? I'm confused. Mike -- Michael P. Soulier <[EMAIL PROTECTED]> http://www.digitaltorque.ca http://opag

Re: oddness in super()

2005-06-18 Thread Michael P. Soulier
the 2.3 cruft seems to have fixed something. Thanks, Mike -- Michael P. Soulier <[EMAIL PROTECTED]> http://www.digitaltorque.ca http://opag.ca python -c 'import this' Jabber: [EMAIL PROTECTED] pgpoH6WnRonmw.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

oddness in shelve module

2005-06-21 Thread Michael P. Soulier
self.partitions = doc.children elif doc.type == 'siloShowMaxFree': self.free = doc.scalar else: raise AssertionError, "Unknown document type: %s" % doc.type -- Michael P. Soulier <[EMAIL PROTECTED]> http://www.digitaltorque.ca http://opag.ca python -c 'import this' Jabber: [EMAIL PROTECTED] pgpscuURQeKCo.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system(cmd) isn't working

2005-06-23 Thread Michael P. Soulier
On 23/06/05 Tim Golden said: > This is only half an answer, but I personally find faffing > about with the double-quote / double-backslash stuff between > Python and Windows a pain in the neck, so where I can I avoid it. Indeed. I believe this is why Python has os.sep. Mike --

getting tracebacks from traceback objects

2005-06-23 Thread Michael P. Soulier
; assert(False) None Pretty sure this worked in 1.5.2. Am I doing something wrong here? I want format_exe especially, since I don't want to print to stdout, I want to provide the traceback in a popup dialog. Thanks, Mike -- Michael P. Soulier <[EMAIL PROTECTED]> http://www.digi

PostgreSQL & Python vs PHP

2005-07-23 Thread Luis P. Mendes
Hi, I don't know anything about PHP and I'm initiating right now with PostgreSQL. Could someone tell me the pros and cons of assessing the PostgreSQL databases with Python vs. PHP? I will need to build a database that has to be assessed by a dozen clients via a web page in an intranet (possibly

Re: PostgreSQL & Python vs PHP

2005-07-23 Thread Luis P. Mendes
gene tani wrote: > To be honest, this is a pretty open-ended question. Are there specific > issues (SQL injection/security, minimizing db connections, simplest > code, etc, your'e concerned with?) Simplest code with be an important factor, since the db will be used far from max capabilities. Eas

Re: PostgreSQL & Python vs PHP

2005-07-23 Thread Luis P. Mendes
gene tani wrote: > ok, to make this less open-ended, you should mention what O/S and web > server you have in mind, whether the web and DB servers will be under > your admin (big diff betw python and PHP, as far as finding shared > server accounts at web hosts), what kinds of queries, concurrent >

Re: Friend wants to learn python

2005-07-23 Thread Martin P. Hellwig
EnderLocke wrote: > I have a friend who wants to learn python programming. I learned off > the internet and have never used a book to learn it. What books do you > recommend? > > Any suggestions would be appreciated. > I recommend "Learning Python 2nd Edition" by Mark Lutz & David Ascher (O'Rei

FAQ?

2005-07-24 Thread Keith P. Boruff
Hello, Is there an FAQ available specific to this NG as I'm sure some of the list slicing questions I have have been asked before. Thanks, KPB -- http://mail.python.org/mailman/listinfo/python-list

Re: FAQ?

2005-07-24 Thread Keith P. Boruff
Michael Hoffman wrote: > Keith P. Boruff wrote: > >> Is there an FAQ available specific to this NG as I'm sure some of the >> list slicing questions I have have been asked before. > > > Try Google for . I tried and didn't find one. That's why I aske

Re: FAQ?

2005-07-24 Thread Keith P. Boruff
gene tani wrote: > Here's my trove of FAQ/Gotcha lists > > http://www.ferg.org/projects/python_gotchas.html > http://zephyrfalcon.org/labs/python_pitfalls.html > http://zephyrfalcon.org/labs/beginners_mistakes.html > > > http://www.onlamp.com/pub/a/python/2004/02/05/learn_python.html > http://ww

Re: PostgreSQL & Python vs PHP

2005-07-25 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would like to thank all of you. For what I've read, I'll be using python instead of Php. Luis -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC5RQ5Hn4UHCY8r

Re: Why Tcl/Tk?

2005-08-01 Thread Michael P. Soulier
d get all of the versions right. Java does this better. Mike -- Michael P. Soulier <[EMAIL PROTECTED]> "Those who would give up esential liberty for temporary safety deserve neither liberty nor safety." --Benjamin Franklin pgph4uE4YTLTz.pgp Description: PGP signature -- http://

Re: Secure email

2005-08-04 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: > I need to write a .cgi that will take the content of an https GET or > POST and send it securely as email to an Outlook client. > > I think that OpenSSL is somewhere in this, but I'm not even sure how to > create the right certificate, how to use it to encrypt mail and

Re: pain

2005-08-04 Thread Martin P. Hellwig
Mage wrote: >> > Thank you, I will check this out. My company will switch to a jsp site. Well I don't know your company and how many developers there are but I know this; a manager telling me what tools to use to do my job is a bad manager by definition because he should realize that the peopl

Re: Secure email

2005-08-04 Thread Martin P. Hellwig
Michael Ströder wrote: > Martin P. Hellwig wrote: > >>I think you want this more common approach for mail encryption: >> >>server: >>https CGI form --> mail wrapper --> PGP encryption/signing --> send >> >>client: >>recieve mail --> pgp

Re: Why it doesn't work?

2006-01-09 Thread Martin P. Hellwig
Lad wrote: > I have a list > L={} > Now I can assign the value > L['a']=1 > and I have > L={'a': 1} > > but I would like to have a dictionary like this > L={'a': {'b':2}} > > so I would expect I can do > L['a']['b']=2 > > but it does not work. Why? > > Thank you for reply > Rg, > L. > Hi, Pe

Re: How to get Windows system information?

2006-01-13 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: > Does anybody know how to get the: > > Free hard disk space > Amount of CPU load > and Amount of RAM used > > on windows? I am making an artificial intelligence program that has > "moods" based on how much stress the system is under, based on these > param

Re: How to get Windows system information?

2006-01-14 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: > thank you! > > from what I can see from the second website you listed, there is a way > to get harddisk space information, but is there any way to get CPU load > and RAM usage? > Have a look at the snippet: #>>> import wmi #>>> t = wmi.WMI() #>>> for i in t.Win32_Perf

webbrowser module + urls ending in .py = a security hole?

2006-01-29 Thread Blair P. Houghton
I'm just learning Python, so bear with. I was messing around with the webbrowser module and decided it was pretty cool to have the browser open a URL from within a python script, so I wrote a short script to open a local file the same way, using the script file as an example target: # browser-tes

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-29 Thread Blair P. Houghton
Oh, uh, Python version 2.4.2, in case you're wondering. --Blair -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Blair P. Houghton
I'm going to try it out on a remote server later today. I did use this script to fetch remote HTML (url='http://www.python.org') before I tired the remote file, and it opened the webpage in Firefox. I may also try to poke around in webbrowser.py, if possible, to see if I can see whether it's sele

Re: Find directory name of file?

2006-01-30 Thread Blair P. Houghton
Grant Edwards wrote: > Try something like this at the beginning of your program and > see if it does what you want: > > print os.path.abspath(sys.argv[0]) Wanna see something freaky? In IDLE, I type the following: >>> import sys >>> import os.path >>> os.path.abspath(sys.argv[0])

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Blair P. Houghton
Sorry...should read: "I did use the script to fetch remote HTML (url='http://www.python.org') before I tried the local file, and it opened the webpage in Firefox." Too many chars, too few fingers. --Blair -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-01 Thread Blair P. Houghton
>Would it be sufficient in your case merely to allow only .html files to >be loaded? Or URLs without .extensions? Or even just permit only the >http: protocol? Personally, I'm just noodling around with this right now. So "my case" is the abstract case. I think the solution if one was needed wou

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Blair P. Houghton
Peter Hansen wrote: > It appears the correct approach might be something along the lines of > reading the registry to find what application is configured for the > "HTTP" protocol (HKCR->HTTP->shell->open->command) and run that, passing > it the URL. I think that would do what most people expect,

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Blair P. Houghton
Blair P. Houghton wrote: > Which makes it no security hole at > all, it would seem... Well, no, that's a little strong. No *new* security hole, maybe. It would be on the order of having ./ in the PATH for root, and getting trapped by a hacker who named his rootkit "ls" or

<    1   2   3   4   >