Mico Siahaan | 2 May 12:22
Picon
Favicon

Like sqlite3?


Hi all,

are there any modules that I can use as replacement of sqlite3 module (in C-Python)?

thanks,

MS

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
Mayne, Peter | 2 May 14:43
Picon
Favicon

Problems with python.cachedir

I’m having problems getting the registry entry python.cachedir working with Jython 2.5 beta 4.
 
Jython is installed in /usr/local/jython25b4, writeable only by root. There’s a cachedir directory under jython25b4. I have a jar file nsutils.jar on my class path.
 
My $HOME/.jython contains
 
python.cachedir=/home/pxmayne/.jython.cachedir
 
The .jython registry file is being found by Jython, because if I add “python.verbose=debug”, I get debugging messages. The directory /home/pxmayne/.jython.cachedir exists and is empty.
 
Running my Jython script gives
 
*sys-package-mgr*: processing new jar, '/home/pxmayne/nsutils.jar'
*sys-package-mgr*: can't write cache file for '/home/pxmayne/nsutils.jar'
*sys-package-mgr*: can't write index file
 
but the script works.
 
If (as root) I rename /usr/local/jython25b4/cachedir to something else and rerun my script:
 
*sys-package-mgr*: can't create package cache dir, '/usr/local/jython25b4/cachedir/packages'
Traceback (most recent call last):
  File "./jmeas.py", line 20, in <module>
    import com.hp.nonstop.guardian as guardian
ImportError: No module named hp
 
and the script fails.
 
If I change the permissions of /usr/local/jython25b4/cachedir (and directories and files below that) to be world writeble, packages are correctly cached, but that isn’t an acceptable workaround.
 
If I change the definition of python.home in the Jython startup shell script from /usr/local/jython25b4 to $HOME (/home/pxmayne), then the packages are correctly cached in $HOME/.jython.cachedir and my script works. I’m not sure that that Is the right thing to do, though.
 
I’m using a custom simplified Jython startup shell script (due to the lack of bash on this system), so I may be missing something. (This doesn’t appear to be new to beta 4: our beta 3 install had “chmod 777 cachedir” to make things work, but it slipped my mind until now.)
 
Why isn’t my definition of python.cachedir being used?
 
Thanks.
 
PJDM
--
Peter Mayne
Hewlett-Packard
Canberra, ACT, Australia
 
 
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Wizzzard | 2 May 19:05
Picon

Re: Problems with python.cachedir

Mayne, Peter schrieb:
> I’m having problems getting the registry entry python.cachedir working
> with Jython 2.5 beta 4.
>  
> Jython is installed in /usr/local/jython25b4, writeable only by root.
> There’s a cachedir directory under jython25b4. I have a jar file
> nsutils.jar on my class path.
>  
> My $HOME/.jython contains
>  
> python.cachedir=/home/pxmayne/.jython.cachedir
>  
> The .jython registry file is being found by Jython, because if I add
> “python.verbose=debug”, I get debugging messages. The directory
> /home/pxmayne/.jython.cachedir exists and is empty.
>  
> Running my Jython script gives
>  
> *sys-package-mgr*: processing new jar, '/home/pxmayne/nsutils.jar'
> *sys-package-mgr*: can't write cache file for '/home/pxmayne/nsutils.jar'
> *sys-package-mgr*: can't write index file
>  
> but the script works.
>  
> If (as root) I rename /usr/local/jython25b4/cachedir to something else
> and rerun my script:
>  
> *sys-package-mgr*: can't create package cache dir,
> '/usr/local/jython25b4/cachedir/packages'
> Traceback (most recent call last):
>   File "./jmeas.py", line 20, in <module>
>     import com.hp.nonstop.guardian as guardian
> ImportError: No module named hp
>  
> and the script fails.
>  
> If I change the permissions of /usr/local/jython25b4/cachedir (and
> directories and files below that) to be world writeble, packages are
> correctly cached, but that isn’t an acceptable workaround.
>  
> If I change the definition of python.home in the Jython startup shell
> script from /usr/local/jython25b4 to $HOME (/home/pxmayne), then the
> packages are correctly cached in $HOME/.jython.cachedir and my script
> works. I’m not sure that that Is the right thing to do, though.
>  
> I’m using a custom simplified Jython startup shell script (due to the
> lack of bash on this system), so I may be missing something. (This
> doesn’t appear to be new to beta 4: our beta 3 install had “chmod 777
> cachedir” to make things work, but it slipped my mind until now.)
>  
> Why isn’t my definition of python.cachedir being used?
>  

This is the following bug:

http://bugs.jython.org/issue1331

There is a snapshot-build that fixes it.

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Picon
Favicon

AUTO: Juniarti A Suryakusuma/Austin/IBM is out of the office. (returning 05/04/2009)

I am out of the office until 05/04/2009.




Note: This is an automated response to your message "Jython-users Digest, Vol 36, Issue 1" sent on 5/2/09 11:05:14.

This is the only notification you will receive while this person is away.

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Frank Wierzbicki | 3 May 05:09
Picon
Gravatar

Anyone going to EuroDjangoCon on the list?

Hi all,

Just in case anyone else will be there, I am going to EuroDjangoCon in
Prague.  I'll be there Monday - Wednesday and my presentation will be
on Wednesday morning.  See you there!

-Frank

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
Mayne, Peter | 3 May 13:02
Picon
Favicon

Re: Problems with python.cachedir

I downloaded the snapshot build: it seems to working fine.

Thanks.

PJDM
-- 
Peter Mayne
Hewlett-Packard
Canberra, ACT, Australia 
-----Original Message-----
From: Wizzzard [mailto:r_walter <at> users.sourceforge.net] 
Sent: Sunday, 3 May 2009 3:05 AM
To: Mayne, Peter
Cc: jython-users <at> lists.sourceforge.net
Subject: Re: [Jython-users] Problems with python.cachedir

Mayne, Peter schrieb:
> I’m having problems getting the registry entry python.cachedir working
> with Jython 2.5 beta 4.
>  
> Jython is installed in /usr/local/jython25b4, writeable only by root.
> There’s a cachedir directory under jython25b4. I have a jar file
> nsutils.jar on my class path.
>  
> My $HOME/.jython contains
>  
> python.cachedir=/home/pxmayne/.jython.cachedir
>  
> The .jython registry file is being found by Jython, because if I add
> “python.verbose=debug”, I get debugging messages. The directory
> /home/pxmayne/.jython.cachedir exists and is empty.
>  
> Running my Jython script gives
>  
> *sys-package-mgr*: processing new jar, '/home/pxmayne/nsutils.jar'
> *sys-package-mgr*: can't write cache file for '/home/pxmayne/nsutils.jar'
> *sys-package-mgr*: can't write index file
>  
> but the script works.
>  
> If (as root) I rename /usr/local/jython25b4/cachedir to something else
> and rerun my script:
>  
> *sys-package-mgr*: can't create package cache dir,
> '/usr/local/jython25b4/cachedir/packages'
> Traceback (most recent call last):
>   File "./jmeas.py", line 20, in <module>
>     import com.hp.nonstop.guardian as guardian
> ImportError: No module named hp
>  
> and the script fails.
>  
> If I change the permissions of /usr/local/jython25b4/cachedir (and
> directories and files below that) to be world writeble, packages are
> correctly cached, but that isn’t an acceptable workaround.
>  
> If I change the definition of python.home in the Jython startup shell
> script from /usr/local/jython25b4 to $HOME (/home/pxmayne), then the
> packages are correctly cached in $HOME/.jython.cachedir and my script
> works. I’m not sure that that Is the right thing to do, though.
>  
> I’m using a custom simplified Jython startup shell script (due to the
> lack of bash on this system), so I may be missing something. (This
> doesn’t appear to be new to beta 4: our beta 3 install had “chmod 777
> cachedir” to make things work, but it slipped my mind until now.)
>  
> Why isn’t my definition of python.cachedir being used?
>  

This is the following bug:

http://bugs.jython.org/issue1331


There is a snapshot-build that fixes it.

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Oti | 4 May 07:32
Picon
Gravatar

Re: Problems with python.cachedir

Peter, Wizzzard,

thank you very much for helping and testing!

It was indeed http://bugs.jython.org/issue1331 which introduced this for beta 4.
This is fixed on trunk now.

What is new:
It is now possible to override registry file properties with System properties.
So, for example, if you start the JVM with
-Dpython.cachedir=/my/cache/dir, the package cache will be in
/my/cache/dir.

best wishes,
Oti.

On Sun, May 3, 2009 at 1:02 PM, Mayne, Peter <peter.mayne <at> hp.com> wrote:
> I downloaded the snapshot build: it seems to working fine.
>
> Thanks.
>
> PJDM
> --
> Peter Mayne
> Hewlett-Packard
> Canberra, ACT, Australia
> -----Original Message-----
> From: Wizzzard [mailto:r_walter <at> users.sourceforge.net]
> Sent: Sunday, 3 May 2009 3:05 AM
> To: Mayne, Peter
> Cc: jython-users <at> lists.sourceforge.net
> Subject: Re: [Jython-users] Problems with python.cachedir
>
> Mayne, Peter schrieb:
>> I’m having problems getting the registry entry python.cachedir working
>> with Jython 2.5 beta 4.
>>
>> Jython is installed in /usr/local/jython25b4, writeable only by root.
>> There’s a cachedir directory under jython25b4. I have a jar file
>> nsutils.jar on my class path.
>>
>> My $HOME/.jython contains
>>
>> python.cachedir=/home/pxmayne/.jython.cachedir
>>
>> The .jython registry file is being found by Jython, because if I add
>> “python.verbose=debug”, I get debugging messages. The directory
>> /home/pxmayne/.jython.cachedir exists and is empty.
>>
>> Running my Jython script gives
>>
>> *sys-package-mgr*: processing new jar, '/home/pxmayne/nsutils.jar'
>> *sys-package-mgr*: can't write cache file for '/home/pxmayne/nsutils.jar'
>> *sys-package-mgr*: can't write index file
>>
>> but the script works.
>>
>> If (as root) I rename /usr/local/jython25b4/cachedir to something else
>> and rerun my script:
>>
>> *sys-package-mgr*: can't create package cache dir,
>> '/usr/local/jython25b4/cachedir/packages'
>> Traceback (most recent call last):
>>   File "./jmeas.py", line 20, in <module>
>>     import com.hp.nonstop.guardian as guardian
>> ImportError: No module named hp
>>
>> and the script fails.
>>
>> If I change the permissions of /usr/local/jython25b4/cachedir (and
>> directories and files below that) to be world writeble, packages are
>> correctly cached, but that isn’t an acceptable workaround.
>>
>> If I change the definition of python.home in the Jython startup shell
>> script from /usr/local/jython25b4 to $HOME (/home/pxmayne), then the
>> packages are correctly cached in $HOME/.jython.cachedir and my script
>> works. I’m not sure that that Is the right thing to do, though.
>>
>> I’m using a custom simplified Jython startup shell script (due to the
>> lack of bash on this system), so I may be missing something. (This
>> doesn’t appear to be new to beta 4: our beta 3 install had “chmod 777
>> cachedir” to make things work, but it slipped my mind until now.)
>>
>> Why isn’t my definition of python.cachedir being used?
>>
>
> This is the following bug:
>
> http://bugs.jython.org/issue1331
>
> There is a snapshot-build that fixes it.
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Jython-users mailing list
> Jython-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jython-users
>

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
LoD MoD | 6 May 20:55
Picon

GUI window update top

I was wondering what would be the best way to display multiple top commands for multiple remote servers in a Swing JFrame.

I am thinking that I might need to use threading?
I am more interested in suggestions on approach rather than code examples.
Possibly from someone who has tried something similar.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Hasan Diwan | 7 May 02:10
Picon

Re: GUI window update top

2009/5/6 LoD MoD <lodmod.dod <at> gmail.com>:
> I was wondering what would be the best way to display multiple top commands
> for multiple remote servers in a Swing JFrame.

Generate a wrapper class implementing Runnable for one top command
writing it to a JPanel, adding it to the top-level JFrame. Update the
JPanel from within this thread. Post a notification to the top-level
JFrame to refresh itself. That's how I'd do it, though I'll admit it's
not something I've actually done myself.
--

-- 
Sent from my mobile device

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
Jinseung Eu | 9 May 01:08
Picon
Picon

passing arguments to a Java parser‏

Hi!
 
I am trying to use Stanford parser, written in Java (http://www-nlp.stanford.edu/software/index.shtml). I translated the following Java command for the parser:  

import edu.stanford.nlp.parser.lexparser.LexicalizedParser; 

class ParserDemo {
public static void main(String[] args) {
LexicalizedParser lp = new LexicalizedParser("englishPCFG.ser.gz");
lp.setOptionFlags(new String[]{"-maxLength", "80", "-retainTmpSubcategories"});

into the following Jython language:
 
from edu.stanford.nlp.parser.lexparser import LexicalizedParser
lp = LexicalizedParser('englishPCFG.ser.gz')
lp.setOptionFlags("-maxLength", "80", "-retainTmpSubcategories")
 
Then I got the following error: "TypeError: setOptionFlags(): expected 1 args; got 3"
 
If I put only one argument and type: lp.setOptionFlags("-maxLength 80")
I get the following error: "TypeError: setOptionFlags(): 1st arg can't be coerced to String[]"
 
I also wanted to increase the heap space and typed: lp.setOptionFlags("-mx512m")
Then got the same message: "TypeError: setOptionFlags(): 1st arg can't be coerced to String[]"
 
Can someone tell me what I am doing wrong? Is this the wrong way of passing arguments to Jython methods?
 
Thank you very much.
 
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users

Gmane