Hi Peter
>> language = kwargs['language']
>> del kwargs['language']
>
>Not really important, but there's a method for that:
>
>language = kwargs.pop("language")
Thanks, this looks better and I indeed think it is important. The "del ..."
line looks ugly.
>> def __init__(self, *args, **kwargs):
riginal Message-
From: Python-list [mailto:python-list-bounces+jmeile=hotmail@python.org] On
Behalf Of Peter Otten
Sent: Freitag, 8. September 2017 08:15
To: python-list@python.org
Subject: Re: Need to pass a class instance to a gettext fallback
Josef Meile wrote:
> Hi
>
> I'm worki
Hi
I'm working with gettext and need to define a language Fallback. I got this
working, but with a global variable. I don't really like this and I would like
to pass this variable to the gettext Fallback's contructor, but I don't know
how. For simplicity, I won't put the whole code here, just t
> Is there any specific reason for not using MinGW to build the official
> distribution of Python for Win32?
> A quick Google search did not reveal the answer to my question. If a
> link is available, please post it.
You may look at this thread:
* E02 - Support for MinGW Open Source Compiler
ht
> I download it from http://pycurl.sourceforge.net/
> and then extract it to D:\usr\pycurl-7.15.2
> then
> D:\usr\pycurl-7.15.2>setup.py install --curl-dir=d:\usr\pycurl-7.15.2
> Using curl directory: d:\usr\pycurl-7.15.2
> Traceback (most recent call last):
> File "D:\usr\pycurl-7.15.2\
>>Can someone post a link or email me an image of the old Python logo?
>>I'd like to save a copy of it, I rather liked it - very retro.
>
>
> the dot matrix logo ?
>
> you can get a copy from this page:
>
>
That website is down. You could try the archive as well:
http://web.archive.org/web/2005
Hi,
> I am trying to write an IM Bot, which automatically replies to a
> message, in Python.
> I was wondering If there are python modules for connecting to Yahoo!,
> msn networks ...
> ideally I would like to have a multithreaded module.
>
> This is one I found for msn, if anyone has used it ple
>>> In C++ you can overload functions and constructors. For example if I
>>> have a
>>> class that represents a complex number, than it would be nice if I can
>>> write two seperate constructors
>>
>>
>>
>> Python doesn't support this, but it does support default arguments:
>
> Yes, in part you a
>>In C++ you can overload functions and constructors. For example if I have a
>>class that represents a complex number, than it would be nice if I can
>>write two seperate constructors
>
>
> Python doesn't support this, but it does support default arguments:
Yes, in part you are right since the p
Hi Gary,
> I am trying to send an event from a Python COM server to a VB (or VB.NET)
> COM client.
> I am a newbie both in VB and in python.
> Can anyone give me a simple (but complete) code example both of the Python
> server side and the VB client side for raising a single event.
Do you mean i
Sorry, I replied to the Wrong list :-(
Josef Meile wrote:
>> su zope (or whoever your zope runs)
>> ./yourmethod.py someuser somepass
>>
>> You will see it fail (apart from the fact you need
>> the #!/path/to/python.bin and set the execution bit
&g
> su zope (or whoever your zope runs)
> ./yourmethod.py someuser somepass
>
> You will see it fail (apart from the fact you need
> the #!/path/to/python.bin and set the execution bit
> with chmod a+x before you try)
>
>
> > i tried using another user outside of zope .
>>First, is the PYTHON OpenSSL C wrapper what I need to get running.
>
>
> I think that first you have to get OpenSSL running. Only then can you
> think about wrapping it.
I think Sybren is allright here. After installing openssl, pyopenssl
won't be a problem. So, if you want to install openssl,
Hi Iain,
> Would this be a quicker/better way of doing it?
I don't know if this is faster, but it is for sure more elegant:
http://groups.google.ch/group/comp.lang.python/msg/67b8767c793fb8b0
I really like it because of its simplicity an easy use. (Thanks to
Fredrik Lundh for the script). Howev
> Anyone know of a simple ssl api in python :-)
Perhaps pow may help:
http://sourceforge.net/projects/pow
or pyopenssl:
http://pyopenssl.sourceforge.net/
Regards,
Josef
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
> I just want to test that a given website is up or not from a python
> script. I thought of using wget as an os command. Any better ideas?
Here is how I did it:
import urllib2
import socket
def checkUrl(url, timeout=1):
"""Checks an url for a python version greater
than 2.3.3.
Hi Timothy
> i'm looking for ocr librarys with reasonably free licensing and the
> ablity to use python with them. c library's that i can call from python
> are acceptable.
This thread may give you an start:
http://groups.google.ch/group/comp.lang.python/browse_frm/thread/362ac64a3c3aece2/
It m
Hi Timothy,
first at all, sorry if you receive this message twice, but I sent a
message five hours ago and I don't see it on
mail.python.org/python-list.
Now at least the OP will receive it since I included it in a CC.
This thread may give you an start:
http://groups.google.ch/group/comp.lang.py
Hi,
> I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone
> 2.0.5, OS Debian 1:3.3.6-2.
You may then ask in a zope or plone list. This is a python specific
list. But I will answer you any way.
> After import a old Plone site from the following platform
> Zope-2-7-4, Python 2.3.
Steven D'Aprano wrote:
> On Fri, 29 Jul 2005 06:37:52 +, Bengt Richter wrote:
>
>
>>I suggested in a previous thread that one could support such a syntax by
>>supporting an invisible binary operator between two expressions, so that
>>examine "string" translates to examine.__invisbinop__("stri
> "barely use python with it" and "can only be used with these two" are
> not entirely true. Zope development can be done in a through-the-web
> (TTW) fashion or via filesystem products. When developing TTW, it
> is true that you are somewhat limited in the amount of Python that
> you will be abl
Hi,
> for punctuation in punctuations:
> line=line.replace(punctuation,'')
I would use maketrans or even a regex instead. However, If you care
about speed, it is well known that in some cases regex take more
time than multiple replaces. Even the maketrans could take more time
(I don't
Hi guy,
> I'll be using COM, and I could probably make an application that
> controls Outlook (externally). But I'd also like to have this
> functionality exposed in OL itself. So I guess I'll need to use VBA,
> but I don't really like VBA - relax, please, it's just an opinion.. ;)
>
> So, ideall
ortal_catalog',None)
If at this point catalog = None, then you have to print the objects in
the plone site by doing:
>>> print ploneSite.objectIds()
Once you find the catalog object, you could try the script I post before
from the command line.
I haven't tested this, but I hope it helps.
Regards,
Josef Meile
--
http://mail.python.org/mailman/listinfo/python-list
Hi Lucasz,
> Thank you so much. I will ask our Plone administrator to test your
> script and I will write about result here.
You are wellcome. I think it is one of the easiest way of doing it.
> I thought also about Python script like
>
>
> //connect to database
> >>> from ZODB import FileSt
Hi Lukasz,
> Yes, I'm traing to escape from Zope-land, to be more clarify I want to
> migrate from Plone to PHP Application, which uses MySQL database
> engine, so I have to move all data from ZODB to MySQL. I suppose that
> python script shouldn`t be so complex. I need just iterate ZODB and
> wri
>>Circular import does not work on module level, but you can
>>import the module in a method:
>>
>>file1.py:
>>import file2
>>
>>
>>
>>file2.py:
>># import file1 # Does not work!
>>def foo():
>>import file1 # Does work
>
>
> Cool idea !
>
> It works on local namespaces, wich dont cause t
George Sakkis wrote:
> Bruno Desthuilliers wrote:
>
>>JZ a Ãcrit :
>>
>>>Probuje zainstalowac modul php pod zope i tam napisali dziwna rzecz
>
> ze
>
>>>potrzebuje "PHP CGI program" a nie PHP CLI. Kompilacja php 5.0.4
>
> pod
>
>>>linuksem daje mi w wyniku mod_php + 5 plikow binarnych: pear, p
Hi Mir,
you are asking in the wrong place. This is a python specific list. You
can find a suitable list here:
http://mail.zope.org/mailman/listinfo
Regards,
Josef
Mir Nazim wrote:
Hi,
I wanted to know what will happen to plone once Zope3 will be official
version. Is plone being ported to Zope3. I g
Is there a recommended or 'Best Practices' way of checking the version
of python before running scripts? I have scripts that use the os.walk()
feature (introduced in 2.3) and users running 2.2 who get errors.
Instead of telling them, 'Upgrade you Python Install, I'd like to use
sys.version or s
well that's nice, but I don't do blogs and certainly don't do M$
Passport logins which it seems the gotdotnet site requires.
I agree, even for reading the FAQ and the Readme you need a password :-(
--
http://mail.python.org/mailman/listinfo/python-list
my only issue with psycopg, is last time i looked they had no win32 port?
Not completely true. Since long time ago there is a website with
unofficial psycopg binaries:
http://www.stickpeople.com/projects/python/psycopg/
Regards,
Josef
--
http://mail.python.org/mailman/listinfo/python-list
Hi Joe,
Not wrong. I am aware of this, but it's not like that many development
tools can work through FTP or WebDav... Besides, how to have the
source code under source control if it's stuck in the ZODB?
I guess you are reffering to "Python Scripts" and "ZClasses", which
indeed are stuck in the ZOD
Hi Earl,
Anyone know how to capture text from GUI output? I need to process
information returned via a GUI window.
Earl
Assuming Windows, then these guys have an interesting tool:
http://www.skesoft.com/textcatch.htm
It's not free, but you can try it before you buy it.
You will need COM to cont
The most obvious case where it wouldn't work would be for a UNC path name.
Using the string split method gives two empty strings:
os.path.normpath(r'\\machine\share').split(os.path.sep)
['', '', 'machine', 'share']
whereas the splitpath function I proposed gives you:
splitpath(r'\\machine\shar
Hi Duncan,
This should work reasonably reliably on Windows and Unix:
somestring = '/foo/bar/beer/sex/cigarettes/drugs/alcohol/'
os.path.normpath(somestring).split(os.path.sep)
['', 'foo', 'bar', 'beer', 'sex', 'cigarettes', 'drugs', 'alcohol']
However a better solution is probably to call os.path.
It looks like here the only worth words are yours. Didn't
you close this thread?
I will refresh your mind with your own unpolite way:
"""
Ilias Lazaridis wrote:
[...]
closing thread
http://groups-beta.google.com/group/comp.lang.python/msg/f2ae9cdbe16676d1
"""
Anyway, I will add some comments:
The d
Zope + Formulator is a nice combination to validating and designing
forms and add some functionality. If you want a more complicated content
management framework, then you can additionally install plain CMF or
Plone, which is based on CMF. There is also something called Silva, but
it doesn't have m
Hi Achim,
I'm looking for frameworks to make testing web applications - i.e.
parsing and filling out forms - easier. I found Puffin, which looks good
but not very usable in the current state. I know that I once read about
other nice frameworks, but could not find one via google. Any hints?
Zope
Hi Peter,
Last November I posted a message asking for advice on using simple
screen handling techniques under Windows. Since then I have been
occupied with family / job /Christmas /living and trying to
understand curses under linux (it works, seems very complex, sure I'm
missing something ...).
Hi Brent,
Brent W. Hughes wrote:
The Python program won't decide whether a commercial is playing, I will. At
that point, I will run my program which will press mute, wait 20 seconds,
and then press mute again.
Actually, I could leave the program running but minimized to the task bar.
When I he
Hi Frank
I tried the psycopg site, but it does not seem to have binaries at all.
Does anyone know if either of these will be available in binary form
for Python 2.4 on Windows?
For psycopg, there is a site with binaries for windows:
http://www.stickpeople.com/projects/python/psycopg/
Regards,
Josef
Hi Brane,
I was wondering about the same thing some days
ago. I found the following alternatives:
* Curses for Windows for Python (It was previously
mentioned on a follow-up. there are some missing
features):
http://flangy.com/dev/python/curses/
* PDCurses (It looks promissing):
http://pdcurses.sou
43 matches
Mail list logo