sive compared to (python needs to spawn an external process to execute
the command)
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
Enrico 'Henryx' Bianchi wrote:
> cmd2 = subprocess.Popen(['gzip' '-c'],
> shell=False,
> stdout=filename)
Doh, my fault:
cmd2 = subprocess.Popen(['gzip' '-c'],
shell=False,
stdout=
nformation_schema', 'db_dev']:
filename = "/backups/mysql/%s-%s.sql" % (database, filestamp)
cmd1 = subprocess.Popen(['mysqldump', '-u ' + username,
'-p' + password, '-h ' + hostname,
'-e', '--opt', '-c ' + database],
shell=False,
stdout=subprocess.PIPE)
cmd2 = subprocess.Popen(['gzip' '-c'],
shell=False,
stdout=filename)
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
Wanderer wrote:
> How
> do you handle this sort of thing in Python?
I believe that the best thing to do is a Union-Find algorithm.
Depending on the exact nature of your problem, you may also want to
check out the Hoshen-Kopelman Algorithm. Although the algorithm itself
is rather efficient, it
3 on a
production environment which doesn't support it, I have to prepare at least
a development environment similar to production (ok, ok, with a VM is
simple, but I need to track the exception)
Enrico
P.S. an alternative may be cx_freeze, but I don't know exactly hot it works
P.P.S. I
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Tobiah wrote:
> Use the newer version and don't look back.
Interesting reply, but if I have a platform wich doesn't support Python 3
(e.g. RHEL 5.x)? ]:)
Enrico
P.S. note that: I *don't* want to recompile Python in prod
I am trying to pass a multi-dimensional ndarray to C as a multi-
dimensional C array for the purposes of passing it to mathematica.
They already have a wrapper for a 1-D Python list. where the list is
copied to "list". Shown below:
static PyObject * mathlink_PutIntegerList(mathlink_Link *self,
PyO
hon.org/py2exe (related to wxPython but look at the
manifest)
An other solution is to run the vcredist on the target machine and the
application will run. This is the suggested solution if you cannot
distibute the DLLs.
Bye, Enrico
--
http://mail.python.org/mailman/listinfo/python-list
hon
and other packages installed you need to "build" the application. Look at
py2exe and friends (freeze, py2app,...). You can prepare an application with
everything needed to run it and install/copy it on the user machine.
Regards, Enrico
--
http://mail.python.org/mailman/listinfo/python-list
c_ulong)]
>
> I'm not sure what needs to go in the above empty tuple for
> "PPS_POST_PROCESS_INIT_ROUTINE PostProcessInitRoutine" (in Original
> PEB).
>
> Please suggest.
PostProcessInitRoutine should be a callback function or something similar.
It should be enough to define a type
PostProcessInitRoutine = WINFUNCTYPE(...parameters...)
and use this.
Regards,
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
n this case self is not needed.
>
> But as been mentioned in this thread before, there might be no reason to
> use the class anyway.
I agree but the code is not very clear about the use of this class as
ancestor of MC.
>>class MC(Funcoes, type):
?
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
atribdescripto = Funcoes.CifradorDeCesar (atribcripto,
3, 2)
Best regards,
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
ld install
I never used libxml2 but version 2.6.9 seems quite old, according to this
page:
http://users.skynet.be/sbi/libxml-python/
Bye, Enrico
--
http://mail.python.org/mailman/listinfo/python-list
despeak.net/lxml/validation.html
With this package is quite simple (code not tested):
from lxml import etree
dtd = etree.DTD('mydtd.dtd')
f = file('mydoc.xml')
xml = etree.XML(f.read())
dtd.validate(xml)
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
<[EMAIL PROTECTED]> wrote:
> A programming language is a tool to solve problems, so first of all:
> do you have problems to solve? You can create some visualizations,
> some program with GUI, some networked code to download things and
> process them, etc.
It's surprising how hard is this part. I
Simon Strobl <[EMAIL PROTECTED]> wrote:
> Well, as I was using Python, I did not expect to have to care about
> the language's internal affairs that much. I thought I could simply do
> always the same no matter how large my files get. In other words, I
> thought Python was really scalable.
It's n
A and B are
> ordinary Python classes (ie: not builtin types, not C extensions, etc),
> you can monkeypatch them. But that's not necessarily the best thing to
> do (it would require more work than your actual solution).
I know that I can do whatIwant with class A and class B (monkeypatc
gt;>> class C(A,B):
def __getattr__(self, name):
try:
return A.__getattr__(self, name)
except AttributeError:
return B.__getattr__(self, name)
>>> c=C()
>>> c.a
A.__getattr__
1
>>> c.b
A.__getattr__
B.__getattr__
1
A better solution is welcome.
Many thanks, Enrico
--
http://mail.python.org/mailman/listinfo/python-list
sible.
I suggest you to try
>>> from wx import *
or better
>>> import wx
(I don't think that importing everything is a good choice)
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
ansformed name is extremely long (longer than 255 characters),
implementation defined truncation may happen. If the class name consists
only of underscores, no transformation is done.
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
<[EMAIL PROTECTED]> wrote:
> But I think in some situations Ruby allows to omit them, solving some
> of the "impossibile" problems shown in this thread. This makes Ruby a
> bit better than Python to create application-specific mini languages,
> that are quite useful in some situations.
Yes. Howev
Srikanth <[EMAIL PROTECTED]> wrote:
> All I need is a good IDE, I can't find something like Eclipse (JDT).
> Eclipse has a Python IDE plug-in but it's not that great.
Have you tried the 'full' plugin (you have to pay about 30 $ IIRC or
something like that)?
My favourite Python editor is TextMate
or client code can set an attribute of this
name on instances to affect this behavior. Setting this to str(), for
example, would make option names case sensitive.
Bye,
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
pprint import pprint
pprint(object)
bye,
e.
--
Enrico Sirola <[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo/python-list
neat :)
python:
"""
print 10
"""
and
#"""
print 10
#"""
C++:
/*
print(10);
*/
and
///*
print(10);
//*/
?
Bye,
Enrico
--
http://mail.python.org/mailman/listinfo/python-list
25 matches
Mail list logo