The code below works (in linux), but I'm wondering if there is a
better/easier/cleaner way? It works on directory trees that don't
have a lot of "."s in them or other special characters. I haven't
implemented a good handler for that yet, so if you run this in your
system, choose/make a simple dire
On 3 Dec, 16:41, Philip Semanchuk <[EMAIL PROTECTED]> wrote:
> On Dec 3, 2008, at 10:29 AM, Astley Le Jasper wrote:
>
> > I've included a switch to include or exclude theloggingto console.
> > Whenloggingonly to file, the script runs fine.
>
> > Of course, I still don't understand whyduallogging, a
Hi all,
Can anyone please help me. i need to parse the content of my csv excel file
and run the unix command chown.
test.csv:
"/dev/trunk/admin/sql/ADBPOS_CMSI_NATIONALITY.syn",814
"/dev/trunk/bin/ADBPOSCMSDICED.ctl",405
"/dev/trunk/discoverer/ADBPOS_BUSINESS_AREA.eex",215
Please help me parse
Hello, there.
I am looking for a concise working example of Python script calling COM
compliant .dll.
Regards.
David
--
http://mail.python.org/mailman/listinfo/python-list
cont...
Take in consideration
/** Hashtable of URLClassLoaders for each of the jars loaded */
private Hashtable classLoaders;
Here's an example:
org.python.core.PySystemState pySys = new
org.python.core.PySystemState();
//classLoad
I've managed to solve this problem.
I can now run a python script that lives inside a Jar. The python
script is now able to import other scripts within the same jar, and
it's also able to import java classes that live within the jar.
The problem was solved by giving the Jython Interpreter the pro
[EMAIL PROTECTED] wrote:
> azrael> is it possible to save a python object into a sqlite database as
> azrael> an atribute of type BLOB
>
> Sure. Just pickle the object and save the resulting string.
Be sure to save it as BLOB, not TEXT.
Suppose you have serialized your object as Python
Bruno> Or if you want something more portable, serialize the object to
Bruno> json. At least you'll have a chance to deserialize it with some
Bruno> other language.
Assuming json can serialize more-or-less arbitrary Python objects. Can
it serialize class instances?
Skip
--
http://ma
[EMAIL PROTECTED] a écrit :
azrael> is it possible to save a python object into a sqlite database as
azrael> an atribute of type BLOB
Sure. Just pickle the object and save the resulting string.
Or if you want something more portable, serialize the object to json. At
least you'll have
Martin v. Löwis wrote:
What changes are made to the registry?
For a complete list, see Tools/msi/msi.py in the source tree.
I have scanned the file:
http://svn.python.org/projects/python/branches/py3k/Tools/msi/msi.py
I don't find anything that addresses this issue.
Read the add_registry fu
azrael> is it possible to save a python object into a sqlite database as
azrael> an atribute of type BLOB
Sure. Just pickle the object and save the resulting string.
--
Skip Montanaro - [EMAIL PROTECTED] - http://smontanaro.dyndns.org/
--
http://mail.python.org/mailman/listinfo/python-
Martin v. Löwis wrote:
In one has both 2.x and 3.0 installed, would it easy to install 'lib.py'
for both?
It's currently not possible to install something for 2.x; you have to
specifically install it for every value of x (e.g. 2.5 or 2.6).
That is what I meant.
It's the same for 3.0: you ha
is it possible to save a python object into a sqlite database as an
atribute of type BLOB
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
> On Dec 2, 5:13 pm, Jon Harrop <[EMAIL PROTECTED]> wrote:
>> The Mathematica code is 700,000x slower so a 50% improvement will be
>> uninteresting. Can you make my Mathematica code five orders of magnitude
>> faster or not?
>
> Pay me $10 thru paypal, i'll can increase the speed so
On Wed, 3 Dec 2008 07:08:52 -0800 (PST) Janto Dreijer
<[EMAIL PROTECTED]> wrote:
> I'd like to point out that since your where thinking in terms of
> matplotlib, you might actually find numpy's own transpose useful,
> instead of using zip(*seq) :)
>
This was, of course, to be expected. :)
Whenev
In article <[EMAIL PROTECTED]>,
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>In message <[EMAIL PROTECTED]>, Cameron Laird wrote:
>
>>def shell_escape(Arg) :
>>"""returns Arg suitably escaped for use as a command-line argument
>>to Bash."""
>>
>>pattern = r"[\<\>\"\
check winpdb / rpdb2,
cheers,
Stef
On 12/3/08, alex23 <[EMAIL PROTECTED]> wrote:
> On Dec 3, 2:19 am, Kevin D. Smith <[EMAIL PROTECTED]> wrote:
>> I have a fairly large python program that, when a certain combination
>> of options is used, hangs. I have no idea where it is hanging, so
>> simply p
On Dec 3, 2008, at 10:29 AM, Astley Le Jasper wrote:
I've included a switch to include or exclude the logging to console.
When logging only to file, the script runs fine.
Of course, I still don't understand why dual logging, and specifically
to the console, causes a problem and if anyone has a
I've included a switch to include or exclude the logging to console.
When logging only to file, the script runs fine.
Of course, I still don't understand why dual logging, and specifically
to the console, causes a problem and if anyone has any comments about
the dual output logging code above then
"Davy" <[EMAIL PROTECTED]> wrote:
> while(data_queue.full() == False):
This will fill the queue and stop.
Use while true and if queue not full...
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Simply put, we want to see the profile info dynamically. Is that
possible?
To clarify again,
Is there some function like profile.PrintStats() which dynamically
shows the stats before stopping the Profiler?
Regards,
--
http://mail.python.org/mailman/listinfo/python-list
I'd like to point out that since your where thinking in terms of
matplotlib, you might actually find numpy's own transpose useful,
instead of using zip(*seq) :)
untested:
t = linspace(0,2*pi*3)
seq = asarray(zip(t, sin(t)))
t, y = seq.T # or seq.transpose() or numpy.transpose(seq)
pylab.plot(t,y
This has nothing to do with Python. Please take this thread to
cares.who.someone.
--
http://mail.python.org/mailman/listinfo/python-list
2008/12/3 Yves Dorfsman <[EMAIL PROTECTED]>:
> Is there any built in way to generate a list of characters, something
> along the line of range('a'-'z') ?
>
> Right now I am using:
>
> chars = [ chr(l) for l in range(0x30, 0x3a) ] # 0 - 9
> chars += [ chr(l) for l in range(0x41, 0x5b) ] # A - Z
Slaunger <[EMAIL PROTECTED]> wrote:
> On 3 Dec., 11:30, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> > > ? ? ? ? ?cls = self.__class__
> > > ? ? ? ? ?if attr_name in cls.data_attr_names:
> >
> > self.data_attr_names should do instead of cls.data_attr_names unless
> > you are overriding it in the i
import string
alphabet=list(string.letters[0:26])
print alphabet
Yves Dorfsman wrote:
Is there any built in way to generate a list of characters, something
along the line of range('a'-'z') ?
Right now I am using:
chars = [ chr(l) for l in range(0x30, 0x3a) ] # 0 - 9
chars += [ chr(l)
On Thu, Dec 4, 2008 at 12:18 AM, Yves Dorfsman <[EMAIL PROTECTED]> wrote:
> Is there any built in way to generate a list of characters, something
> along the line of range('a'-'z') ?
>
> Right now I am using:
>
> chars = [ chr(l) for l in range(0x30, 0x3a) ] # 0 - 9
> chars += [ chr(l) for l i
Is there any built in way to generate a list of characters, something
along the line of range('a'-'z') ?
Right now I am using:
chars = [ chr(l) for l in range(0x30, 0x3a) ] # 0 - 9
chars += [ chr(l) for l in range(0x41, 0x5b) ] # A - Z
chars += [ chr(l) for l in range(0x61, 0x7b) ] # a
I'm looking for a Python3-compatible way to sort a list of PIL image objects
based on a computed difference between the two images. In 2.x, this would
work:
imagelist.sort(cmp=image_diff(a,b))
Maybe this could be done by creating a new class with the appropriate __lt__,
gt__, __eq__ metho
Hi,
tarun wrote:
Hello All,
I've a .xml file (saved as .xls) that can be opened in Microsoft excel.
Well if its an xml file then just attach a style to it and you can
just view it in a browser w/o involving excel in the first place.
Also there are lots of xml libraries coming with python
Hi all,
I am using thread and tkinter to write some simple programs and
solidify my understanding of Python thread/GUI programing. The scheme
is thread + queue + GUI. One child thread (gen_board_thread) generate
board and insert data into queue infinitely. Meanwhile, the main
thread canvas widget
Do you have styles attached to the text of the document in the xls? (bold,
italic, etc)
if not, then you can just do the mapping by creating table and cells by
yourself... (or xslt)
{^(00)^} LiNdA OcTaLiNa
---GeEeEee---
From: Jeremiah Dodds <[EMAIL PROTECTED
Hi,
what about numpy?
import numpy
a = numpy.ones((10,),dtype=numpy.bool)
I = [1,3,8]
a[I]=False
print a
gives: [ True False True False True True True True False True]
Almar
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Dec 3, 2008 at 5:54 AM, tarun <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I've a .xml file (saved as .xls) that can be opened in Microsoft excel. I
> want to write python code that converts this excel file into .html (so that
> it can be viewed as is in an explorer).
>
> Can any one help?
On Wed, Dec 3, 2008 at 6:23 AM, Lawrence D'Oliveiro
<[EMAIL PROTECTED]> wrote:
>
> So why is that better?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
I personally think that it looks marginally cleaner (indentation issues
aside).
Do you think it's substantially worse? If so, why
Hello all,
I've a problem with Jython and importing .py inside a jar.
I'm putting .class and .py files inside .jar files.
myjar.jar
MyJar\SomeClass.class
MyJar\main.py
MyJar\otherModule.py
So I add the myjar.jar to Jython's sys.path
org.python.core.PySystemState p
On 3 Dec., 11:30, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> > cls = self.__class__
> > if attr_name in cls.data_attr_names:
>
> self.data_attr_names should do instead of cls.data_attr_names unless
> you are overriding it in the instance (which you don't appear to be).
Yeah, I
In message <[EMAIL PROTECTED]>, Cameron Laird wrote:
>def shell_escape(Arg) :
>"""returns Arg suitably escaped for use as a command-line argument
>to Bash."""
>
>pattern = r"[\<\>\"\'\|\&\$\#\;\(\)\[\]\{\}\`\!\~\ \\]"
>def f1(Match):
> return "\\" + Match.group
Tim provided a correct-looking answer, albeit somewhat
complex, as it doesn't reuse the logic in the ConfigParser.
It didn't start out very complex, but it was so easy to make it a
bit more robust with such a scant few lines of code that I went
ahead. The original just looked like
options
In message
<[EMAIL PROTECTED]>, Astley
Le Jasper wrote:
> The trouble is that obviously I get no console when using crontab so
> can't see any traceback.
Cron normally sends you mail if a cron task generated any output (this
should include error messages).
--
http://mail.python.org/mailman/listin
In article <[EMAIL PROTECTED]>,
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>Cameron Laird wrote:
>
>>def f1(Match):
>>return
>
>Something missing here?
Ugh; yes, sorry:
def shell_escape(Arg) :
"""returns Arg suitably escaped for use as a command-line argument
On Dec 3, 10:16 am, [EMAIL PROTECTED] wrote:
> On Dec 3, 12:53 am, Bryan Olson <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > This message is not about the meaningless computer printout called
>
> > More importantly, it's not about Python. I'm setting follow-ups to
> > talk.pol
Duncan Booth wrote:
Helmut Jarausch <[EMAIL PROTECTED]> wrote:
Chris Rebert wrote:
On Mon, Dec 1, 2008 at 1:01 PM, Helmut Jarausch <[EMAIL PROTECTED]>
wrote:
Hi,
I am looking for an elegant way to solve the following problem:
Within a function
def Foo(**parms)
I have a list of names, say
Hello All,
I've a .xml file (saved as .xls) that can be opened in Microsoft excel. I
want to write python code that converts this excel file into .html (so that
it can be viewed as is in an explorer).
Can any one help?
Regards,
Tarun
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 03 Dec 2008 12:40:30 +0200, srinivasan srinivas
<[EMAIL PROTECTED]> wrote:
HI,
I would like to send an email message with body-content 'test' and an
attachment.
The snippet i used is:
outer = email.mime.multipart.MIMEMultipart()
msg1 = email.mime.text.MIMEText(, _subtype = 'text')
On Wed, 3 Dec 2008 02:11:51 -0800 (PST) alex23 <[EMAIL PROTECTED]>
wrote:
> On Dec 3, 6:51 pm, Andreas Waldenburger <[EMAIL PROTECTED]> wrote:
> > On Tue, 02 Dec 2008 18:16:13 -0800 Bryan Olson
> > > zip as its own inverse might be even easier to comprehend if we
> > > call zip by its more traditi
HI,
I would like to send an email message with body-content 'test' and an
attachment.
The snippet i used is:
outer = email.mime.multipart.MIMEMultipart()
msg1 = email.mime.text.MIMEText(, _subtype = 'text')
msg1.add_header('Content-Disposition', 'attachment')
outer.attach(msg1)
body = email.mime.
Slaunger <[EMAIL PROTECTED]> wrote:
> Just wanted to show the end result in its actual implementation!
>
> I ended up *not* making a decorator, as I already had a good idea
> about how to do it
> using __getattr__
>
> class PayloadDualFrqIQOnDemand(PayloadDualFrqIQ):
> """
> This c
Ok ... this is odd.
I tried gregory's suggestion of redirecting the stdout & stderr to a
text file. This worked. I could see all the logging information.
However, there was no error to see this time ... the application
worked completely without any problems.
I also then tried Jon's suggestion of
On Dec 3, 12:53 am, Bryan Olson <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > This message is not about the meaningless computer printout called
>
> More importantly, it's not about Python. I'm setting follow-ups to
> talk.politics.
>
> > "Certification of Live Birth" that Obama propaga
On Dec 3, 6:51 pm, Andreas Waldenburger <[EMAIL PROTECTED]> wrote:
> On Tue, 02 Dec 2008 18:16:13 -0800 Bryan Olson
> > zip as its own inverse might be even easier to comprehend if we call
> > zip by its more traditional name, "transpose".
>
> Sounds like a Py4k change to me.
Nah, just add the fol
On Wed, Dec 3, 2008 at 4:54 AM, Banibrata Dutta
<[EMAIL PROTECTED]> wrote:
> Amazing concept, and glad that someone thought of this and implemented this.
> The book's formatting on IE and Chrome looked a bit unusual. Content wise it
> is already firly decent (i.e. enough to get a programmer started
On Tue, Dec 02, 2008 at 10:53:47PM -0500, Steve Holden wrote:
> Pardon me for intruding, but timings here are entirely the wrong focus
> for a Python newcomer. Given that imports are super-optimized (i.e. the
> code in the module is only performed once) such a small difference in
> timing is incons
pieter <[EMAIL PROTECTED]> writes:
> I want to use a Python function that returns a double array in C++.
Return an array.array('d') object, and use the buffer protocol (for
example PyObject_AsReadBuffer()) to get the address of the underlying
array of native doubles.
--
http://mail.python.org/mai
On Tue, 02 Dec 2008 18:16:13 -0800 Bryan Olson
<[EMAIL PROTECTED]> wrote:
> zip as its own inverse might be even easier to comprehend if we call
> zip by its more traditional name, "transpose".
>
Sounds like a Py4k change to me.
/W
--
My real email address is constructed by swapping the domain
I want to use a Python function that returns a double array in C++.
I don’t have a problem if the Python function returns a single
variable of type double, using the following lines in my C++ code:
myPythonObjectPointer = PyObject_CallObject(pFunc, pArgs);
myCppDoubleVariable = PyF
On Wed, Dec 3, 2008 at 1:01 AM, Sambo <[EMAIL PROTECTED]> wrote:
> Peter Pearson wrote:
>
>
> In slackware one needs "./" before the filename if you executing
> files in current dir.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Umm, only if you're running files marked as executabl
Cameron Laird wrote:
>def f1(Match):
>return
Something missing here?
--
http://mail.python.org/mailman/listinfo/python-list
> In one has both 2.x and 3.0 installed, would it easy to install 'lib.py'
> for both?
It's currently not possible to install something for 2.x; you have to
specifically install it for every value of x (e.g. 2.5 or 2.6).
It's the same for 3.0: you have to install it separately.
Doing so is fairl
101 - 159 of 159 matches
Mail list logo