Re: HTTP GET Explodes...

2006-09-24 Thread John Machin
Pete wrote: > > > Python 2.4.3 (#1, Jun 13 2006, 11:46:08) > > > [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2 > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> import httplib > > > >>> conn = httplib.HTTPConnection("www.python.org") > > > >>> conn.request("

Re: QuoteSQL

2006-09-24 Thread Sybren Stuvel
Lawrence D'Oliveiro enlightened us with: > Why doesn't MySQLdb provide a function like this: Because generally you're able to pass newlines and the like just fine. You can even store binary data into a BLOB column. Sybren -- Sybren Stüvel Stüvel IT - http://www.stuvel.eu/ -- http://mail.pytho

Re: License / Registration key enabled software

2006-09-24 Thread Sybren Stuvel
T enlightened us with: > We all know that there are many softwares that require some license > key or registration key to enable them. How does one implement > something like this in python? Why do you want to? I've never seen software successfully protected by such schemes. If you really want to

Re: Automatic import PEP

2006-09-24 Thread Sybren Stuvel
Connelly Barnes enlightened us with: > I wrote the 'autoimp' module [1], which allows you to import lazy modules: > > The main point of autoimp is to make usage of the interactive Python > prompt more productive by including "from autoimp import *" in the > PYTHONSTARTUP file. Sounds like a great

Re: Regular expression confusion

2006-09-24 Thread John Machin
York wrote: > Oh, that's right, the second arg is escaped by re compiler too. No, that's wrong, you [should] do the escaping, the compiler unescapes :-) Cheers, John -- http://mail.python.org/mailman/listinfo/python-list

where the hell is the run command of PyPe editor?

2006-09-24 Thread daniel
I'm trying to use PyPe, but I just got so frustrated when attempting to run a script, this is the very first feature I would use for an editor, OMG. I browsed through every single menu item and gave up... any help would be appreciated, (the most silly question ever, sounds like a new computer use

where the hell is the run command of PyPe editor?

2006-09-24 Thread daniel
I'm trying to use PyPe, but I just got so frustrated when attempting to run a script, this is the very first feature I would use for an editor, OMG. I browsed through every single menu item and gave up... any help would be appreciated, (the most silly question ever, sounds like a new computer use

Re: Difficulty with maxsplit default value for str.split

2006-09-24 Thread Fredrik Lundh
Steven D'Aprano wrote: > I'm having problems passing a default value to the maxsplit argument of > str.split. I'm trying to write a function which acts as a wrapper to > split, something like this: > > def mysplit(S, sep=None, maxsplit=None): > pre_processing() > result = S.split(sep, max

Re: A critique of cgi.escape

2006-09-24 Thread Fredrik Lundh
Lawrence D'Oliveiro wrote: > What works for attributes also works for ordinary text. attributes and ordinary text are two different things in HTML and XML. you're arguing that it's a good idea for *everyone* to bloat down ordinary text just because you're too lazy to use a piece of code in the

Re: Timeline for Python?

2006-09-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Blair P. Houghton wrote: > wesley chun wrote: >> >> 1. never write against older versions of Python... you will only >> obsolete your book even faster (well, "sooner") > > I believe there is some market for documentation of older > versions of software. Many i

Re: A critique of cgi.escape

2006-09-24 Thread Fredrik Lundh
Jon Ribbens wrote: > Making cgi.escape always escape the '"' character would not break > anything, and would probably fix a few bugs in existing code. Yes, > those bugs are not cgi.escape's fault, but that's no reason not to > be helpful. It's a minor improvement with no downside. the "improvemen

Re: newbe's re question

2006-09-24 Thread Frederic Rentsch
[EMAIL PROTECTED] wrote: > These are csound files. Csound recently added python as a scripting > language and is allowing also allowing csound calls from outside of > csound. The nice thing about csound is that instead of worrying about > virus and large files it is an interpiter and all the file

Re: Reverse a String?

2006-09-24 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > That 'foo'[::-1] is the Python reverse string idiom I'll try here > forward, thanks. > > Also '.h.e.l.l.o'[1::2] to pick out every second char, etc., thanks. > > Three footnotes: > > 1) Reverse string isn't yet in http://www.python.org/doc/faq/ so what are you waitin

Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Ingo Linkweiler
Has anyone a function/script to verify an e-mail-address? It should: a) check the syntax b) verify an existing mailserver or DNS/MX records ingo -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeline for Python?

2006-09-24 Thread Fredrik Lundh
Lawrence D'Oliveiro wrote: >> I believe there is some market for documentation of older >> versions of software. Many installations are constrained >> by the cost of upgrading and can not migrate to a newer >> version. > > And they can afford to buy books?? > > If they're that strapped for cash

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Bjoern Schliessmann
Ingo Linkweiler wrote: > b) verify an existing mailserver or DNS/MX records "Or"? That's two different things. If you don't know already: Even if you test all this, it is still possible that - the target mail account doesn't exist - the sender's IP is filtered by the server so he'll reject - th

Re: parsing java files

2006-09-24 Thread stéphane bard
i use javaclass and it's great !! this is what i need. thank's paul gabriel thank's too for advice Paul Boddie a écrit : > stéphane bard wrote: >> hello >> i would like to parse java files an detect >> class name's, attributes name's type's and visibility (and or list of >> methods). >> >> is th

Re: A critique of cgi.escape

2006-09-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Fredrik Lundh wrote: > Jon Ribbens wrote: > >> Making cgi.escape always escape the '"' character would not break >> anything, and would probably fix a few bugs in existing code. Yes, >> those bugs are not cgi.escape's fault, but that's no reason not to >> be helpfu

Re: Automatic import PEP

2006-09-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Connelly Barnes wrote: > The main point of autoimp is to make usage of the interactive Python > prompt more productive by including "from autoimp import *" in the > PYTHONSTARTUP file. The main problem I have with your idea is that any kind of import statement with

Ideal python idle

2006-09-24 Thread James Stroud
Hello, I decided that the ultimate python IDE would basically be a vim editor with a hotkey or button that ran the currently edited module as "__main__", allowing gui (tkinter, wx) windows to spawn etc. That's it. I tried the "runscript.vim" plugin which basically promises this, but it seems

Re: QuoteSQL

2006-09-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Sybren Stuvel wrote: > Lawrence D'Oliveiro enlightened us with: >> Why doesn't MySQLdb provide a function like this: > > Because generally you're able to pass newlines and the like just fine. > You can even store binary data into a BLOB column. Yes, I have done bl

Re: A critique of cgi.escape

2006-09-24 Thread Fredrik Lundh
Lawrence D'Oliveiro wrote: > Attributes can be quoted with either single or double quotes. That's what > the HTML spec says. cgi.escape doesn't correctly allow for that. Ergo, > cgi.escape is broken. QED. do you ever think before you post? -- http://mail.python.org/mailman/listinfo/python-lis

Re: webbrowser module's Firefox support

2006-09-24 Thread Georg Brandl
Dustan wrote: > MonkeeSage wrote: >> Dustan wrote: >> > I did do a search here, but came up empty-handed. Can anyone tell me >> > how to get the webbrowser module to recognize firefox's existence, >> > given this information? >> >> Looks like it is checking %PATH% for firefox.exe. Try: >> >> >>> im

Re: A critique of cgi.escape

2006-09-24 Thread Georg Brandl
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Fredrik > Lundh wrote: > >> Jon Ribbens wrote: >> >>> Making cgi.escape always escape the '"' character would not break >>> anything, and would probably fix a few bugs in existing code. Yes, >>> those bugs are not cgi.escape's fault, bu

Re: assignment hook

2006-09-24 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > Kind people, > Is there any way one can, within Python, intercept the act of > assignment. For instance, suppose that I was obsessed with > FORTRAN II, and decided that I wanted to print a warning, > or raise an exception any time someone assigned an int to a > variable

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Ingo Linkweiler
Bjoern Schliessmann schrieb: > Ingo Linkweiler wrote: > >> b) verify an existing mailserver or DNS/MX records > > "Or"? That's two different things. > > If you don't know already: Even if you test all this, it is still > possible that > > - the target mail account doesn't exist > - the sender's

Re: Tkinter button not working as expected

2006-09-24 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Thank you Fredrik. It makes total sense now that you've explained it > this way. I frustrated at my ignorance on the assignment issue :) well, it's one of those "you'll only do this once" mistakes that *everyone* does (mutable default arguments and unexpected integer

Re: A critique of cgi.escape

2006-09-24 Thread Fredrik Lundh
Georg Brandl wrote: > A function is broken if its implementation doesn't match the documentation. or if it doesn't match the designer's intent. cgi.escape is old enough that we would have noticed that, by now... -- http://mail.python.org/mailman/listinfo/python-list

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Ingo Linkweiler wrote: > The script will be used as part auf a user registration page to avoid > dummy-inputs like "[EMAIL PROTECTED]" The usual way to cope with this is sending out confirmation mails. No need to check if the address is syntactically correct beforehand.

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Ingo Linkweiler
> The usual way to cope with this is sending out confirmation mails. No > need to check if the address is syntactically correct beforehand. yes, I do this allready. But it would be nice to do some checks before to avoid wrong user inputs. -- http://mail.python.org/mailman/listinfo/python-list

Re: grabbing random words

2006-09-24 Thread MonkeeSage
Steven D'Aprano wrote: > That isn't 5.75e30 words, it is the number of possible haikus. There > aren't that many words in all human languages combined. Doh! This is why _I'm_ not a computer scientist. I'm kinda slow. ;) > (Note however that there are languages like Finnish which allow you to > st

Re: assignment hook

2006-09-24 Thread Fredrik Lundh
Georg Brandl wrote: > This is not possible. Assignments in the form > > name = value > > (also called "binding a name") are not overloadable. footnote: unless you execute the code in a controlled environment: class mydict(dict): def __setitem__(self, key, value): pri

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Bjoern Schliessmann
Ingo Linkweiler wrote: > yes, I do this allready. But it would be nice to do some checks > before to avoid wrong user inputs. What do you do if the user inputs a "wrong" address? If you reject with an error message, the medium intelligent user will enter something like [EMAIL PROTECTED] as next

Re: Regular expression confusion

2006-09-24 Thread Fredrik Lundh
York wrote: > I have two backslash - a. and I want to replace them with one backslash, > but I failed: > > >>> import re > >>> a = '' > >>> re.sub(r'', '\\', '') John has already sorted the RE-specific part of the problem, but it's also worth noting that using the RE engine for

Re: HTTP GET Explodes...

2006-09-24 Thread MonkeeSage
Pete wrote: > So, I looked at my search path under the account that was experiencing > the problem. That wasn't it... Then I'm thinking there's an > environmental variable causing this. Too many to work right now. Will > investigate later. You can see all environment variables with the declare com

Re: What is the best way to "get" a web page?

2006-09-24 Thread Wolfgang Keller
> Can anyone point me to a tutorial or other reference on how to "get" all > of the html contents at a particular page? Why not use httrack? http://www.satzbau-gmbh.de/staff/abel/httrack-py/ Sincerely, Wolfgang Keller -- My email-address is correct. Do NOT remove ".nospam" to reply. -- ht

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Ben Finney
Bjoern Schliessmann <[EMAIL PROTECTED]> writes: > Ingo Linkweiler wrote: > > > yes, I do this allready. But it would be nice to do some checks > > before to avoid wrong user inputs. > > What do you do if the user inputs a "wrong" address? If you reject > with an error message, the medium intellige

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Bjoern Schliessmann
Ben Finney wrote: > I believe Ingo is checking for the case where the user intended to > enter a valid email address, and made a typing error resulting in > a trivially invalid one. Ah. Good intention, but the same applies: Typos in the localpart are not detectable. Typos in the domain part could

Question about decorators (with context?)

2006-09-24 Thread Oliver Andrich
Hi, sorry for the vague subject, but I can't come up with a better one so far. I am currently writing a wrapper around ImageMagicks MagickWand library using the ctypes module. During this development i have to handle exceptions in an slightly different way, then python normally handles them. I a

Re: Strange __future__ behavior in Python 2.5

2006-09-24 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > My understanding of the __future__ statement is that you may say > something like: > > from __future__ import foo, bar > > to enable more than one feature. However, this does not seem to be > working properly in 2.5; it behaves as expected when typed into the > interac

Re: Question about decorators (with context?)

2006-09-24 Thread Duncan Booth
"Oliver Andrich" <[EMAIL PROTECTED]> wrote: > I will have to wrap a lot of methods to get all the functionality I > need. And the checking for an exception looks always the same. So I > want to write short methods, which are decorated by my_funky_decorator > which handles the error checking and ex

PersistenceDict Question

2006-09-24 Thread Javier Subervi
Hi;I'm trying to get a module to work in a Plone product. I am running Python 2.3.5. Here is the error I'm getting:2006-09-23T14:11:43 ERROR(200) Zope Could not import Products.ExternalSiteCatalogTraceback (most recent call last):  File "/usr/local/zope/278/lib/python/OFS/Application.py", line 673,

AttributeError Question

2006-09-24 Thread Javier Subervi
Hi;I'm new to troubleshooting scripts. This came up when trying to load a Zope product:    * Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__  __traceback_info__: field.Vocabulary(here)    * Module Python _expression_ "field.Vocabulary(here)", line 1, in <_expression_>    * Modu

CSV mailing list moved to python.org

2006-09-24 Thread skip
The csv mailing list originally hosted on mojam.com has been moved intact to a new home on mail.python.org. Thanks to Brad Knowles for turning the necessary knobs on mail.python.org. The list info page is at: http://mail.python.org/mailman/listinfo/csv For a fairly short period of time the

RSS aggregator with curses and feedparser

2006-09-24 Thread Roberto Bechtlufft
Hi, I'm new around here... I'm a Python hobbyist, and I'm far from being a professional programmer, so please be patient with me... I'm working on my first Python program: a curses based RSS Aggregator. It's basically a clone of snownews, one of my very favorite programs. But I want to add some fu

gtk.Entry Colors

2006-09-24 Thread Tuomas
I would like to manipulate PyGTK Entry widget's background and foreground colors. Is it possible? How? Tuomas -- http://mail.python.org/mailman/listinfo/python-list

Re: QuoteSQL

2006-09-24 Thread Sybren Stuvel
Lawrence D'Oliveiro enlightened us with: > Yes, I have done blobs. Still need a quoting function for the > specials, though. Why? What makes your data so different from mine? I can store newlines and the likes just fine in a regular text field. Sybren -- Sybren Stüvel Stüvel IT - http://www.st

Re: QuoteSQL

2006-09-24 Thread Anders J. Munch
Robert Kern wrote: > Anders J. Munch wrote: > >> Always sad to see an SQL DBMS willfully violate the SQL standard. > > You must be a constantly depressed person, then. :-) Nah, I just look the other way most of the time *g* - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: QuoteSQL

2006-09-24 Thread Anders J. Munch
Lawrence D'Oliveiro wrote: >>> elif Ch == "'" or Ch == "\"" or Ch == "\\" : >>> Ch = "\\" + Ch >> Always sad to see an SQL DBMS willfully violate the SQL standard. > > Why is that a violation of SQL? Taking another look, I might be wrong: Your code uses double quotes, and sin

Re: RSS aggregator with curses and feedparser

2006-09-24 Thread Roberto Bechtlufft
And another thing: feedparser returns the result entries as dictionaries. What's the best approach to create my cache file? I see that the cache file in liferea is an xml file. Should I try to create my own xml file based on the results from feedparser? Thanks for your help. Roberto Bechtlufft wr

Re: Verify an e-mail-adress - syntax and dns

2006-09-24 Thread Tim Williams
On 24/09/06, Ingo Linkweiler <[EMAIL PROTECTED]> wrote: > Has anyone a function/script to verify an e-mail-address? > > It should: > a) check the syntax > b) verify an existing mailserver or DNS/MX records > b) is problematical. A domain with MX records may not really have a mail server at all.

Re: Strange __future__ behavior in Python 2.5

2006-09-24 Thread Avizoa
Georg Brandl wrote: > This is a bug and has now been fixed in the SVN repo. > Thanks for bringing it up. Ouch, I feel bad now. I've been noticing this behavior since 2.5B1 but I didn't realize it was a bug. -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module's Firefox support

2006-09-24 Thread Dustan
> > This is a bug, and has now been fixed in SVN. As a workaround, you can > edit the webbrowser.py file and remove the close_fds and preexec_fn arguments > to Popen. > > Georg Finally! It's working. Thank you so much! -- http://mail.python.org/mailman/listinfo/python-list

python-list@python.org

2006-09-24 Thread Nigel
from Tkinter import * import pyTTS Hi i am trying to get a button so that when i click on it i hear a voice say "Hi Molly" this is my code so far.Can any one shed any light on this for please. Thanks Nige. class MyApp: def __init__(self, parent): self.myContainer1 = Frame(p

ctypes question about call by reference

2006-09-24 Thread Oliver Andrich
Hi, hopefully someone with some ctypes experience can help me. I guess this is a trivial task again, but I have been googling, reading, experimenting the whole afternoon without any success. I have a given C function signature: char *MagickGetException(MagickWand *wand,ExceptionType *severity)

Re: ctypes question about call by reference

2006-09-24 Thread Lawrence Oluyede
Oliver Andrich <[EMAIL PROTECTED]> wrote: > - ExceptionType is an enum > - MagickWand is somewhat strange, but so far it works fine without any > type mangling. > > How would I wrap this thing using ctypes? Can anybody help me with that? First thing first: you have to identify how ExceptionType a

Re: HTTP GET Explodes...

2006-09-24 Thread Pete
> > > > Python 2.4.3 (#1, Jun 13 2006, 11:46:08) > > > > [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2 > > > > Type "help", "copyright", "credits" or "license" for more information. > > > > >>> import httplib > > > > >>> conn = httplib.HTTPConnection("www.python.org") > > > > >>> conn.request("G

Re: Re: ctypes question about call by reference

2006-09-24 Thread Oliver Andrich
On 9/24/06, Lawrence Oluyede <[EMAIL PROTECTED]> wrote: > Oliver Andrich <[EMAIL PROTECTED]> wrote: > > - ExceptionType is an enum > > - MagickWand is somewhat strange, but so far it works fine without any > > type mangling. > > > > How would I wrap this thing using ctypes? Can anybody help me with

Re: What is the best way to "get" a web page?

2006-09-24 Thread Pete
> > The file "temp.html" is definitely different than the first run, but > > still not anything close to www.python.org . Any other suggestions? > > If you mean that the page looks different in a browser, for one thing > you have to download the css files too. Here's the relevant extract > from the

Re: What is the best way to "get" a web page?

2006-09-24 Thread Pete
> > Can anyone point me to a tutorial or other reference on how to "get" all > > of the html contents at a particular page? > > Why not use httrack? > > http://www.satzbau-gmbh.de/staff/abel/httrack-py/ > > Sincerely, > > Wolfgang Keller > > -- > My email-address is correct. > Do NOT remove ".nospa

Re: RSS aggregator with curses and feedparser

2006-09-24 Thread James Graham
Roberto Bechtlufft wrote: > And another thing: feedparser returns the result entries as > dictionaries. What's the best approach to create my cache file? I see > that the cache file in liferea is an xml file. Should I try to create > my own xml file based on the results from feedparser? Well you c

Re: Ideal python idle

2006-09-24 Thread Rainy
James Stroud wrote: > Hello, > > I decided that the ultimate python IDE would basically be a vim editor > with a hotkey or button that ran the currently edited module as > "__main__", allowing gui (tkinter, wx) windows to spawn etc. [snip] Hi James, I'm sure I'm missing something here, but doesn't

Re: Ideal python idle

2006-09-24 Thread Rainy
Rainy wrote: > [snip] Oh, I see now that F9 designates output buffer. I usually use vim with a log file and open the log file in a new Vim tab. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ideal python idle

2006-09-24 Thread Rainy
Rainy wrote: > [snip] Oh, I see now that F9 designates output buffer. I usually use vim with a log file and open the log file in a new Vim tab. -Rainy -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeline for Python?

2006-09-24 Thread Blair P. Houghton
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Blair P. > Houghton wrote: > > > wesley chun wrote: > >> > >> 1. never write against older versions of Python... you will only > >> obsolete your book even faster (well, "sooner") > > > > I believe there is some market for documentat

Re: +1 QOTW

2006-09-24 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Did anyone else crack up when Larry Wall described python with the > > statement: > > > > Python, as the "anti-Perl," is heavily invested in maintaining Or

Re: What is the best way to "get" a web page?

2006-09-24 Thread Rainy
Pete wrote: > > > The file "temp.html" is definitely different than the first run, but > > > still not anything close to www.python.org . Any other suggestions? > > > > If you mean that the page looks different in a browser, for one thing > > you have to download the css files too. Here's the rele

Re: What is the best way to "get" a web page?

2006-09-24 Thread Felipe Almeida Lessa
24 Sep 2006 10:09:16 -0700, Rainy <[EMAIL PROTECTED]>: > Functionally they are the same, but third line included in Firefox. > Opera View Source command produces the same result as Python. [snip] It's better to compare with the result of a downloader-only (instead of a parser), like wget on Unix.

Re: How to close the DOS Shell when starting a python script

2006-09-24 Thread Wildemar Wildenburger
Paddy wrote: > Rename the .py file with extension .pyw. > - Paddy. > To elaborate: This works because, by default, .py files are associated with python.exe and .pyw files are associated with pythonw.exe, the latter not opening a console window. You can actually run a .py file with pythonw.exe wi

Re: +1 QOTW

2006-09-24 Thread Georg Brandl
Michael J. Fromberger wrote: > In article <[EMAIL PROTECTED]>, > "Terry Reedy" <[EMAIL PROTECTED]> wrote: > >> <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > Did anyone else crack up when Larry Wall described python with the >> > statement: >> > >> > Python, as the "anti-Per

Re: gtk.Entry Colors

2006-09-24 Thread MonkeeSage
Tuomas wrote: > I would like to manipulate PyGTK Entry widget's background and > foreground colors. Is it possible? How? Yes, it is possible: # widget color entry.modify_base(gtk.STATE_NORMAL, gtk.gdk.color_parse("#FF")) # frame color entry.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#00

Re: Running Python script from C++ code(.NET)

2006-09-24 Thread Mc Osten
volcano <[EMAIL PROTECTED]> wrote: > A trivial question - I have a working Python script that I have to > invoke from C++ code. No fancy stuff - just run the whole script with > its parameters. No callbacks, no signalling - nada, just > stupid,primitive, straightforward call. In a unix based env

Re: ctypes question about call by reference

2006-09-24 Thread Lawrence Oluyede
Oliver Andrich <[EMAIL PROTECTED]> wrote: > Well, what I learned so far from the documentation, which I already > have read more then once today, is that there is no example for an > enum in this situation. But looking at pygame-sdl and another project, > it looks like the enum is just an c_int or

python-list@python.org

2006-09-24 Thread Rob Williscroft
Nigel wrote in news:[EMAIL PROTECTED] in comp.lang.python: > from Tkinter import * > import pyTTS > Hi i am trying to get a button so that when i click on it i hear a > voice say "Hi Molly" this is my code so far.Can any one shed any light > on this for please. > Thanks Nige. Your problem appear

Re: Re: ctypes question about call by reference

2006-09-24 Thread Oliver Andrich
After a walk outside, some fresh air around my nose and some time to relax, I finally found out how to do, what I want to do. First, define the argument types and the result type. _dll.MagickGetException.argtypes = (c_long, POINTER(c_long)) _dll.MagickGetException.restype = c_char_p Seco

Re: IDLE - Customizing output format

2006-09-24 Thread Ilias Lazaridis
Ilias Lazaridis wrote: > IDLE has an output format like this: > > >>> object > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > > How can I customize it to become like that: > > >>> object > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > >

Re: One program in different GUI Toolkits

2006-09-24 Thread metaperl . etc
Franz Steinhaeusler wrote: > Hello NG, > > I have a suggestion. > > For simplifying learning or switching between different GUI > Toolkits, I could imagine to have one short clearly presented > program in different GUI Toolkits. > > What about for example wxProject? > > http://wiki.wxpython.org/in

Re: One program in different GUI Toolkits

2006-09-24 Thread metaperl . etc
Actually due to lack of documentation and feedback from the mailing list, I am fallen out of love with Pythoncard and in love with Kiwi/Pygtk. Given the large groundswell support for pygtk, i dont think I will be disappointed. PyQT looks ultra-slick, but the commercial nature of QT and the design

newbie IronPython compiled scripts speed question

2006-09-24 Thread dtlog
Hello, and sorry if this has been asked before... I searched the faqs at python.org and didn't find an answer: does using IronPython, instead of CPython, and compiling the scripts into native windows executables (I heard IronPython can do that) result in faster execution times? Or is it just a matt

Re: +1 QOTW

2006-09-24 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > Did anyone else crack up when Larry Wall described python with the > statement: > > Python, as the "anti-Perl," is heavily invested in maintaining Order. > > In the state of the onion address? > > http://www.perl.com/pub/a/2006/09/21/onion.html Think he's just too charmi

Re: help with debugging a ctypes problem

2006-09-24 Thread gap
[EMAIL PROTECTED] wrote: >> help figuring out how to debug ... ctypes ... >> a commercial dll. A certain function takes five arguments, foo(a, b, c, d, >> e). >> Can I view the appropriate stack? ... Any other ideas or advice? etc? > > Did you call the foo of _cdecl ctypes.cdll or the foo of _s

Re: What is the best way to "get" a web page?

2006-09-24 Thread Pete
> > Functionally they are the same, but third line included in Firefox. > > Opera View Source command produces the same result as Python. > [snip] > > It's better to compare with the result of a downloader-only (instead > of a parser), like wget on Unix. That way you'll get exactly the same > bytes

Re: Automatic import PEP

2006-09-24 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Connelly > Barnes wrote: > >> The main point of autoimp is to make usage of the interactive Python >> prompt more productive by including "from autoimp import *" in the >> PYTHONSTARTUP file. > > The main problem I have with your idea i

Re: newbe's re question

2006-09-24 Thread [EMAIL PROTECTED]
Frederic Rentsch wrote: > [EMAIL PROTECTED] wrote: > > These are csound files. Csound recently added python as a scripting > > language and is allowing also allowing csound calls from outside of > > csound. The nice thing about csound is that instead of worrying about > > virus and large files i

Re: QuoteSQL

2006-09-24 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Sybren Stuvel > wrote: > > >>Lawrence D'Oliveiro enlightened us with: >> >>>Why doesn't MySQLdb provide a function like this: >> >>Because generally you're able to pass newlines and the like just fine. >>You can even store binary data i

Re: IDLE - Customizing output format

2006-09-24 Thread Steve Holden
Ilias Lazaridis wrote: > Ilias Lazaridis wrote: > >>IDLE has an output format like this: >> >> >>> object >> >> >>> type >> >> >>> object.__class__ >> >> >>> object.__bases__ >> >>How can I customize it to become like that: >> >> >>> object >> >> >>> type >> >> >>> object.__class__ >>

installation of python-dev

2006-09-24 Thread Dominik Müller
Hi !I am running Python2.4.3; I need to install Python-dev (or does anybody know an easier way to get distutils.core ? that's what I actually need...). All the versions of python-dev I can find don't match. I get always error message "error: Failed dependencies:    python = 2.4 is needed by py

Re: IDLE - Customizing output format

2006-09-24 Thread Ilias Lazaridis
Steve Holden wrote: > Ilias Lazaridis wrote: > > Ilias Lazaridis wrote: > > > >>IDLE has an output format like this: > >> > >> >>> object > >> > >> >>> type > >> > >> >>> object.__class__ > >> > >> >>> object.__bases__ > >> > >>How can I customize it to become like that: > >> > >> >>> object > >>

SQL reports like in MS Access

2006-09-24 Thread [EMAIL PROTECTED]
Hi, what is the best unit for creating reports like in Microsoft Access, i.e. with page header / footer, grouping, group headers / footers etc., with Wysiwyg editor? Thanks a lot, Jakub -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie IronPython compiled scripts speed question

2006-09-24 Thread Lawrence Oluyede
dtlog <[EMAIL PROTECTED]> wrote: > I searched the faqs at python.org and didn't find an answer: > does using IronPython, instead of CPython, and compiling the > scripts into native windows executables (I heard IronPython > can do that) result in faster execution times? I don't know what you heard

Daemonizing python

2006-09-24 Thread NinjaZombie
Hi! I was wondering if it is possible to turn the current python proccess into a unix daemon, but not doing it like this: python myscript.py & but from code programaticaly. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting Perl Web Report to Python

2006-09-24 Thread [EMAIL PROTECTED]
Dennis, I was able to execute the Mysql command line code you created in "script1.py". I was not able to test the "preferred" method used in script2.py. I will do this later this week when I have more time to download and install the required MySQLdb module. In any event, I would like to know ho

Re: Daemonizing python

2006-09-24 Thread Paul Rubin
NinjaZombie <[EMAIL PROTECTED]> writes: > I was wondering if it is possible to turn the current python proccess into > a unix daemon, but not doing it like this: > python myscript.py & > but from code programaticaly. Yeah, os.fork and the parent process exits. -- http://mail.python.org/mailman/

Re: IDLE - Customizing output format

2006-09-24 Thread Diez B. Roggisch
>> And I am wondering at your continual surprise when the rest of the world >> fails to share your perceptions. Doesn't this carry *any* information? > > not the rest of the world, but the rest of the python community. > > That's a big difference. > > So it looks that I have to code to change th

Re: Daemonizing python

2006-09-24 Thread Bjoern Schliessmann
Paul Rubin wrote: > NinjaZombie <[EMAIL PROTECTED]> writes: >> I was wondering if it is possible to turn the current python >> proccess into a unix daemon, but not doing it like this: >> python myscript.py & >> but from code programaticaly. > Yeah, os.fork and the parent process exits. Or littl

Re: Daemonizing python

2006-09-24 Thread NinjaZombie
Na dan Sun, 24 Sep 2006 23:19:12 +0200, Bjoern Schliessmann je napisao: > Paul Rubin wrote: >> NinjaZombie <[EMAIL PROTECTED]> writes: > >>> I was wondering if it is possible to turn the current python >>> proccess into a unix daemon, but not doing it like this: >>> python myscript.py & >>> but f

Re: newbie IronPython compiled scripts speed question

2006-09-24 Thread bearophileHUGS
dtlog: > So the question is, should I switch to IronPython and compile > my scripts, or learn to use something like pyinline or Psyco? Learning to use Psyco is very easy, for a basic usage you just have to put in your code: import psyco psyco.full() For a better usage you can do: psyco.bind(funct

Re: Daemonizing python

2006-09-24 Thread Paul Rubin
NinjaZombie <[EMAIL PROTECTED]> writes: > Thanks guys, but I'm a little new to this. Take a look at this very simple > code: > > import os > print "Entering program" > os.fork() > while (1): > pass# some other work Try it this way: import os, sys print "Entering program"

Re: Daemonizing python

2006-09-24 Thread NinjaZombie
Na dan Sun, 24 Sep 2006 14:35:31 -0700, Paul Rubin je napisao: > Try it this way: > > import os, sys > print "Entering program" > > if os.fork(): > sys.exit() # parent process exits so shell returns > > while (1): # child process continues

Re: Daemonizing python

2006-09-24 Thread Diez B. Roggisch
NinjaZombie schrieb: > Hi! > > I was wondering if it is possible to turn the current python proccess into > a unix daemon, but not doing it like this: > python myscript.py & > but from code programaticaly. There is a good daemonization recipe on activstate: http://aspn.activestate.com/ASPN/Coo

  1   2   >