Re: Language Semantics: @ symbol??

2006-01-30 Thread Steven D'Aprano
James Stroud wrote: > http://www.google.com/search?q=@ Doesn't work for me, I just get an (almost) empty Google page. Doesn't even say "No results were found", just a Google logo, some standard links in the footer, text box, etc. Even if Google did search for bare @ signs, surely the first b

Re: Python vs C for a mail server

2006-01-30 Thread Steven D'Aprano
Volker Grabsch wrote: > Any programming language allows you to do strange/stupid stuff. But none > of them encourages it. One word: Intercal. :-) -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: Mouse manipulation

2006-01-30 Thread fraca7
arkestra a écrit : > I am writing a script that interacts with the computer screen. > > Is there a module (either built in or add on) that would allow the > script to manipulate the mouse pointer ? -- eg right click, move two > pixels to the right, left click etc? Under Windows, see the SendInpu

Re: python success story

2006-01-30 Thread Tim Parkin
Alex Martelli wrote: > Max M. Stalnaker <[EMAIL PROTECTED]> wrote: > > >>I urged a friend from Boeing to use python on a personal project. He liked it >>and repeatedly urged a Boeing developer to use it. Python is on the list of >>approved languages at Boeing. The developer wrote a thousand li

Using of a certain Type Library/Running app - corresponding COM object

2006-01-30 Thread Udo
Hello, I want to use COM for automating an app via Python. On my PC are two versions of that app installed, therefore I have two type libraries. My questions are: 1. I had to manually create the two type libraries because they haven't been listed in "Select Library"-dialog of the "COM Makepy util

LDAPUserFolder mapping roles

2006-01-30 Thread Marcel Hartmann
I'm using LDAPUserFolder for Zope 2.7.6 and it works fine. Is it possible to do the mapping to zope roles by the _value_ of the group and not the group name? We defined in LDAP many groups to define access to different applications - one is named "zope". I want to map the values of this group "

Re: socket and lost data

2006-01-30 Thread Ben Sizer
le dahut wrote: > Thanks for this answer. > Client do: > size1, passed1 = envoyer(conn, 50) > size2, passed2 = envoyer(conn, int(size1/passed1)) > size3, passed3 = recevoir(conn) > size4, passed4 = recevoir(conn) > print size2/passed2 > print size4/passed4 > > Server do: > recevoir(conn) > recevoir

Re: LDAPUserFolder mapping roles

2006-01-30 Thread bruno at modulix
Marcel Hartmann wrote: > I'm using LDAPUserFolder for Zope 2.7.6 and it works fine. > > Is it possible to do the mapping to zope roles by the _value_ of the > group and not the group name? > We defined in LDAP many groups to define access to different > applications - one is named "zope". I want t

Re: Server side newbie

2006-01-30 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Someone should invent a way to automate all this. My python app fully > describes the UI and behaviour so it seems possible. Or at least the > sites should learn how to write to a broader audience so they can be > understood by newbies. Here's hoping for an easier future

Re: Server side newbie

2006-01-30 Thread jimlewis
Thanks for the various replies. They all seem to lead to a lot more learning. I thought Python was supposed to make it easy to build web apps. It appears after going thru the learning curve for Python I need to learn unix, a framework, brush up on HTML and so on. It's like being caught in a spider

Re: reportlab - ttf justify

2006-01-30 Thread maeckle
hi, no success at the reportlab-users list. i also applied the 'spaces patch to fix para splitting'-patch but it's still not justifying the text... is there an other solution? thanks alot!! jm >> maeckle wrote: >>> hi, >>> >>> i'm working with reportlab since a couple of weeks and i managed t

Re: Mouse manipulation

2006-01-30 Thread Rinzwind
arkestra schreef: > I am writing a script that interacts with the computer screen. > > Is there a module (either built in or add on) that would allow the > script to manipulate the mouse pointer ? -- eg right click, move two > pixels to the right, left click etc? > > thank you. pygame is able t

Re: LDAPUserFolder mapping roles

2006-01-30 Thread spamgamgee
cool, thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Language Semantics: @ symbol??

2006-01-30 Thread Peter Hansen
Steven D'Aprano wrote: > James Stroud wrote: >>http://www.google.com/search?q=@ > > Doesn't work for me, I just get an (almost) empty > Google page. Doesn't even say "No results were found", > just a Google logo, some standard links in the footer, > text box, etc. FWIW, same here. Also the sa

seperating directories from files

2006-01-30 Thread raj
i'm surely a newbie in python and on the go, I just tried to write a small app to change the gnome desktop background daily. It's working now making use of listdir() to find the contents of each dir I encounter. But I'm sure that my code won't go that smooth forever. How can I find if the content

Re: seperating directories from files

2006-01-30 Thread adam
Check out the os.path (http://docs.python.org/lib/module-os.path.html) module. It has the functions you are looking for. -adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Python module for LX200 telescope command set

2006-01-30 Thread Neil Benn
RayS wrote: >I've begun a Python module to provide a complete interface to the Meade >LX200 command set: >http://rjs.org/Python/LX200.py >and would like input from potential users or people interested in >developing it further. > > Hello, I know nothing about telescopes and spendin

Re: Server side newbie

2006-01-30 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > Thanks for the various replies. They all seem to lead to a lot more > learning. I thought Python was supposed to make it easy to build web > apps. It appears after going thru the learning curve for Python I need > to learn unix, a framework, brush up on HTML and so on. It

Re: Find directory name of file?

2006-01-30 Thread ngw
-veracon <[EMAIL PROTECTED]>: > I'm pretty new at Python, so I have no idea how to do this: How do I > find the name of the directory that contains the application currently > being executed (e.g. if the file is /home/user/file.py, I want to get > the /home/user part)? Try os.path.dirname (__file_

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

2006-01-30 Thread Peter Hansen
Blair P. Houghton wrote: > 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-test.py

Re: Mouse manipulation

2006-01-30 Thread Peter Hansen
Rinzwind wrote: > arkestra schreef: >>I am writing a script that interacts with the computer screen. >> >>Is there a module (either built in or add on) that would allow the >>script to manipulate the mouse pointer ? -- eg right click, move two >>pixels to the right, left click etc? >> >>thank you.

mod_python installation

2006-01-30 Thread treelife
I am having real difficulties just installing mod_python on my server which runs Debian 3.1 and Apache 2.0.x ( I believe x=.54) Firstly, Debian 3.1 does not have a python2.4 version of the software for Apache2.0( I run python 2.4.1) and when I install the python2.3 version, Apache is giving me s

Re: Find directory name of file?

2006-01-30 Thread Fuzzyman
Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > > also the function os.cwd() > > ;-) > > I'm not sure how os.cwd() helps, but generally the solution to this > starts with pointing out that sys.argv[0] usually contains the path to > the main script, which is often the answer needed. > > Recipes ha

Re: seperating directories from files

2006-01-30 Thread Fuzzyman
For checking the contents of a directory : for entry in os.listdir(this_dir): if os.path.isdir(os.path.join(this_dir, entry)); continue You could use splitext to get the extension of a the filename, and *assume* that '.jpg', '.png', '.ico' and friends are images. I'm sure PIL will h

Re: Server side newbie

2006-01-30 Thread jimlewis
Thanks for the comments. I do know basic HTML although it seems like writing in assembly language. Filling in the blanks you outlined: my ISP is pair.com and they show python as available. My site is quirkle.com. True I did not think much about hooking my app to the web but I had, I think, a reason

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

2006-01-30 Thread Fuzzyman
It sounds like you're running on windows *and* that webbrowser.py just uses ``os.startfile``. For html files (associated with your default browser) this will *do the right thing*. For everything else, it will *do the wrong thing*. I could well be wrong though... All the best, Fuzzyman http://w

Re: Python loading library containing embedded python...

2006-01-30 Thread Brennus
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >Brennus wrote: >> I have solved my problem, or at least part of it by downgrading >> to Visual Studio 2003. For whatever reason, the same steps applied >> to Visual Studio 2005 result in massive problems. >> >> Even the python.exe compiled by VS 2005

Re: seperating directories from files

2006-01-30 Thread raj
Thanx adam 'n' fuzzyman! got that 'isdir'. But how the other thing? Can't find anything suitable. I'll be happy on getting atleast something like the file command in Unix -- http://mail.python.org/mailman/listinfo/python-list

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

2006-01-30 Thread [EMAIL PROTECTED]
Does that only happen when you open file:// urls? You already have local access from Python, so it'd be more concerning if it happened with Python files on remote servers. - Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Print dict in sorted order

2006-01-30 Thread Wolfgang Grafen
Use the seqdict.py package: What is it? http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/seqdict/ Downloads: http://home.arcor.de/wolfgang.grafen/Python/Modules/seqdict/seqdict-0.3.zip http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/HTML/HTMLDoc.zip http://home.arcor.de

Re: How do I dynamically create functions without lambda?

2006-01-30 Thread Antoon Pardon
Op 2006-01-27, Russell schreef <[EMAIL PROTECTED]>: > I want my code to be Python 3000 compliant, and hear > that lambda is being eliminated. The problem is that I > want to partially bind an existing function with a value > "foo" that isn't known until run-time: > >someobject.newfunc = lambda

HTTP Session Issue

2006-01-30 Thread Rodolfo S. Carvalho
Hi, I'm working with a 100% dependecy-free web app for python, and I'm taking an overview about HTTPServer and CGIHTTPRequestHandler. In my researches, I don't found anything about  HTTP Sessions... Can python natively hadle http sessions, or I'll must write with by hand? Rodolfo. -- http://mail

Re: Server side newbie

2006-01-30 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > Thanks for the comments. I do know basic HTML although it seems like > writing in assembly language. Filling in the blanks you outlined: my > ISP is pair.com and they show python as available. My site is > quirkle.com. True I did not think much about hooking my app to the

Re: HTTP Session Issue

2006-01-30 Thread Peter Hansen
Rodolfo S. Carvalho wrote: > I'm working with a 100% dependecy-free web app for python, and I'm > taking an overview about HTTPServer and CGIHTTPRequestHandler. In my > researches, I don't found anything about HTTP Sessions... Can python > natively hadle http sessions, or I'll must write with b

Re: mod_python installation

2006-01-30 Thread Ravi Teja
I have Ubuntu which uses the Debian package tree. I see libapache2-mod-python2.4 with "apt-cache search mod_python" Perhaps you don't have all the repositories enabled? -- http://mail.python.org/mailman/listinfo/python-list

Re: python success story

2006-01-30 Thread Steve Holden
Tim Parkin wrote: > Alex Martelli wrote: > >>Max M. Stalnaker <[EMAIL PROTECTED]> wrote: >> >> >> >>>I urged a friend from Boeing to use python on a personal project. He liked >>>it >>>and repeatedly urged a Boeing developer to use it. Python is on the list of >>>approved languages at Boeing.

HTML parsing bug?

2006-01-30 Thread g_no_mail_please
Python 2.3.5 seems to choke when trying to parse html files, because it doesn't realize that what's inside is a comment in HTML, even if this comment is inside , especially if it's a comment inside that script code too. The html file: Choke on this