Re: single thread decrement a semaphore object more than once?

2009-02-24 Thread birdsong
On Feb 24, 8:57 pm, Christian Heimes wrote: > birdsong wrote: > > I searched but didn't see this already discussed, sorry if I didn't > > search hard enough. > > > Can I decrement a semaphore's counter within the same thread more than > > once?  I'd like to set hard and soft limits in a server I'm

Re: 'u' Obselete type – it is identical to 'd'. (7)

2009-02-24 Thread Steven D'Aprano
On Tue, 24 Feb 2009 15:04:05 -0800, John Machin wrote: >> I don't know what you want to report, but I've reported that obsolete >> is mispelled: >> >> http://bugs.python.org/issue5361 > > +1 Own Goal of the Year ... see > http://www.yourdictionary.com/library/misspelled.html Oh come on, it's h

Re: Running script in module initialization

2009-02-24 Thread Kom2
On 24 Ún, 15:25, "Gabriel Genellina" wrote: > En Mon, 23 Feb 2009 05:51:27 -0200, Kom2 escribió: > > > > > On 20 Ún, 16:27, Steve Holden wrote: > >> Kom2 wrote: > >> > Hello, > >> > I'm trying to convert my project from python 2.5 to python 3.0 and I > >> > have the following problem. My project

Re: Python AppStore / Marketplace

2009-02-24 Thread Hendrik van Rooyen
"Rhodri James" wrote: > A souq is a bazaar :-) > > Well, close enough anyway. It's another arabic word that translates as > "market" in both the mercantile and financial senses, I believe. Maybe > I've just read too much arabic-themed fiction, but I was surprised not > to find the word in my t

Problem in identifying an archived file in Windows

2009-02-24 Thread venu madhav
Hello all, I am writing an application which has to identify the archived files in a given directory.I've tried using the function i = win32api.GetFileAttributes (full_path) to obtain the attributes.But am unable to identify based on the value it returns as it is returning 5152, 13856 e

Re: Finding the attributes of a file

2009-02-24 Thread John Machin
On Feb 25, 6:10 pm, "venutaurus...@gmail.com" wrote: > Hello all, >            I am writing an application which has to identify the > archived files in a given directory.I've tried using the function > i = win32api.GetFileAttributes (full_path) > > to obtain the attributes.But am unable to identi

Re: Looking for tips on running Python version 2.6 and 3.0 together on same *WINDOWS* machine

2009-02-24 Thread Dutch Masters
There is some documentation on the subject at: http://docs.python.org/using/windows.html In general, there are several options in maintaining separate environments: 1) Create a separate user for each environment. This allows you to keep things such as Path and file associations so that you are s

Re: XML Parsing

2009-02-24 Thread Lie Ryan
Are you searching for answer or searching for another people that have the same answer as you? :) "Many roads lead to Rome" is a very famous quotation... -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Parsing

2009-02-24 Thread hrishy
Hi Something like this http://mail.python.org/mailman/listinfo/python-list

Finding the attributes of a file

2009-02-24 Thread venutaurus...@gmail.com
Hello all, I am writing an application which has to identify the archived files in a given directory.I've tried using the function i = win32api.GetFileAttributes (full_path) to obtain the attributes.But am unable to identify based on the value it returns as it is returning 5152, 13856 e

Re: Looking for tips on running Python version 2.6 and 3.0 together on same *WINDOWS* machine

2009-02-24 Thread Jason Scheirer
On Feb 24, 9:20 pm, "Martin v. Löwis" wrote: > > It's easy - the registry isn't used except to associate files. The > > associations are made with the most-recently-installed version. > > > I currently have 2.4, 2.5, 2.6 and 3.0 on my Windows machine. > > In addition, at install time, there is the

Re: XML Parsing

2009-02-24 Thread Lie Ryan
On Wed, 2009-02-25 at 06:09 +, hrishy wrote: > Hi > > I am just a python enthusiast and not a python user but was just wundering > why didnt the list members come up with or recommen XPATH based solution > which i think is very elegant for this type of a problem isnt it ? Did you mean XQuer

Re: Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4

2009-02-24 Thread Jason Scheirer
On Feb 25, 12:55 am, Shah Sultan Alam wrote: > Hi Groups, >  Can you please help me on the following... > > 1. Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4 > > 2. If yes, what is the exact 'yum' command to install paramiko on CentOS 4? > I have tried all possible ones without success. > >    

Re: XML Parsing

2009-02-24 Thread hrishy
Hi I am just a python enthusiast and not a python user but was just wundering why didnt the list members come up with or recommen XPATH based solution which i think is very elegant for this type of a problem isnt it ? regards Hrishy --- On Wed, 25/2/09, Lie Ryan wrote: > From: Lie Ryan >

Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4

2009-02-24 Thread Shah Sultan Alam
Hi Groups, Can you please help me on the following... 1. Does Paramiko 1.7.2 and 1.6.4 work with CentOS 4 2. If yes, what is the exact 'yum' command to install paramiko on CentOS 4? I have tried all possible ones without success. yum install paramiko yum install python-paramiko(

Is there a way to increase memory allocated to the python interpreter

2009-02-24 Thread janandith jayawardena
Hi, Is there a way to configure the amount of memory allocated to the python interpreter. Can it be increased or decreased using an argument like in the Java Virtual Machine. thanks, Janandith. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Parsing

2009-02-24 Thread Lie Ryan
On Tue, 24 Feb 2009 20:50:20 -0800, Girish wrote: > Hello, > > I have a xml file which is as follows: > > > > > $ > PID > > > .. > ... > > C

Re: XML Parsing

2009-02-24 Thread alex23
On Feb 25, 2:50 pm, Girish wrote: > Can anyone please tell me how to get content of tag.. that > is, how to extract the data "![CDATA[Parameter Identifiers Supported - > $01 to $20]]" Was there something in particular about Jean-Paul Calderone's solution that didn't satisfy you? http://tinyurl.c

Re: Looking for tips on running Python version 2.6 and 3.0 together on same *WINDOWS* machine

2009-02-24 Thread Martin v. Löwis
> It's easy - the registry isn't used except to associate files. The > associations are made with the most-recently-installed version. > > I currently have 2.4, 2.5, 2.6 and 3.0 on my Windows machine. In addition, at install time, there is the choice of not creating associations (i.e. links what

Re: Problem with os.system()

2009-02-24 Thread venutaurus...@gmail.com
On Feb 25, 9:55 am, Christian Heimes wrote: > venutaurus...@gmail.com schrieb: > > > Hello, > >          I am facing problems while using os.system() of python for > > copying a file from source to destination where the file name is in > > unicode (multi lingual characters).My python interpreter i

Re: single thread decrement a semaphore object more than once?

2009-02-24 Thread Christian Heimes
birdsong wrote: > I searched but didn't see this already discussed, sorry if I didn't > search hard enough. > > Can I decrement a semaphore's counter within the same thread more than > once? I'd like to set hard and soft limits in a server I'm writing. > The server upon initialization would creat

Re: Problem with os.system()

2009-02-24 Thread Christian Heimes
venutaurus...@gmail.com schrieb: > Hello, > I am facing problems while using os.system() of python for > copying a file from source to destination where the file name is in > unicode (multi lingual characters).My python interpreter is trying to > convert them to ascii and is failing. I tri

XML Parsing

2009-02-24 Thread Girish
Hello, I have a xml file which is as follows: $ PID .. ... Can anyone please tell me how to get content of tag.. that is, how to extract the

Re: Looking for tips on running Python version 2.6 and 3.0 together on same *WINDOWS* machine

2009-02-24 Thread Steve Holden
steve.ferg.bitbuc...@gmail.com wrote: > I'm looking for tips on installing and running Python version 2.6 and > version 3.0 together on same Windows machine. > > I'd like to install both 2.6 and 3.0 together on the same Windows > (Vista) machine, so I can test programs under both versions. > > Is

single thread decrement a semaphore object more than once?

2009-02-24 Thread birdsong
I searched but didn't see this already discussed, sorry if I didn't search hard enough. Can I decrement a semaphore's counter within the same thread more than once? I'd like to set hard and soft limits in a server I'm writing. The server upon initialization would create a semaphore: threading.Se

Problem with os.system()

2009-02-24 Thread venutaurus...@gmail.com
Hello, I am facing problems while using os.system() of python for copying a file from source to destination where the file name is in unicode (multi lingual characters).My python interpreter is trying to convert them to ascii and is failing. I tried giving unicode string as input for the f

Re: Convert PySerial to python 3.0

2009-02-24 Thread Grant Edwards
On 2009-02-25, Chris Rebert wrote: > On Tue, Feb 24, 2009 at 7:46 PM, Seth wrote: >> I am just messing around trying to get pyserial to work with 3.0. >> >> I am stuck on this line: >> >> if type(port) in [type(''), type(u'')] >> >> how can I convert this to 3.0? I tried changing the u to a d tha

Problem with os.system()

2009-02-24 Thread venutaurus...@gmail.com
Hello, I am facing problems while using os.system() of python for copying a file from source to destination where the file name is in unicode (multi lingual characters).My python interpreter is trying to convert them to ascii and is failing. I tried giving unicode string as input for the f

Re: Is there any equivalent feature available in Python..?

2009-02-24 Thread zaheer . agadi
On Feb 25, 1:10 am, Albert Hopkins wrote: > On Tue, 2009-02-24 at 11:05 -0800, zaheer.ag...@gmail.com wrote: > > Hi, > > > Is there any Python equivalent of java jar,can I include all my > > sources,properties file etc into a single file.Is there anyway in > > Python that I can run like the follow

Looking for tips on running Python version 2.6 and 3.0 together on same *WINDOWS* machine

2009-02-24 Thread steve . ferg . bitbucket
I'm looking for tips on installing and running Python version 2.6 and version 3.0 together on same Windows machine. I'd like to install both 2.6 and 3.0 together on the same Windows (Vista) machine, so I can test programs under both versions. Is it possible to install both versions on the same Wi

Re: Convert PySerial to python 3.0

2009-02-24 Thread Steve Holden
Seth wrote: > I am just messing around trying to get pyserial to work with 3.0. > > I am stuck on this line: > > if type(port) in [type(''), type(u'')] > > > how can I convert this to 3.0? I tried changing the u to a d that did > not do anything. > How about if type(port) in (str, bytes): Un

Re: pep 8 constants

2009-02-24 Thread Steve Holden
Gabriel Genellina wrote: > En Tue, 24 Feb 2009 22:52:20 -0200, Ethan Furman > escribió: > >> Steve Holden wrote: >>> Brian Allen Vanderburg II wrote: >>> One idea to make constants possible would be to extend properties to be able to exist at the module level as well as the class level:

Re: Convert PySerial to python 3.0

2009-02-24 Thread Chris Rebert
On Tue, Feb 24, 2009 at 7:46 PM, Seth wrote: > I am just messing around trying to get pyserial to work with 3.0. > > I am stuck on this line: > > if type(port) in [type(''), type(u'')] > > > how can I convert this to 3.0? I tried changing the u to a d that did > not do anything. Looks like it's d

Re: pep 8 constants

2009-02-24 Thread Gabriel Genellina
En Tue, 24 Feb 2009 22:52:20 -0200, Ethan Furman escribió: Steve Holden wrote: Brian Allen Vanderburg II wrote: One idea to make constants possible would be to extend properties to be able to exist at the module level as well as the class level: @property def pi(): return 3.14159.

Convert PySerial to python 3.0

2009-02-24 Thread Seth
I am just messing around trying to get pyserial to work with 3.0. I am stuck on this line: if type(port) in [type(''), type(u'')] how can I convert this to 3.0? I tried changing the u to a d that did not do anything. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: pep 8 constants

2009-02-24 Thread Ethan Furman
Steve Holden wrote: Brian Allen Vanderburg II wrote: bock...@virgilio.it wrote: Constants would be a nice addition in python, sure enough. But I'm not sure that this can be done without a run-time check every time the constant is used, and python is already slow enough. Maybe a check that is

Re: 'u' Obselete type -- it is identical to 'd'. (7)

2009-02-24 Thread Steve Holden
John Machin wrote: > On Feb 25, 11:32 am, Ben Finney > wrote: >> John Machin writes: >>> On Feb 25, 9:06 am, Steven D'Aprano wrote: I don't know what you want to report, but I've reported that obsolete is mispelled: >>> +1 Own Goal of the Year ... see >>> http://www.yourdictionary.com

'u' Obselete type – it is identical to 'd'. (7)

2009-02-24 Thread mathieu
I did not know where to report that: 'u' Obselete type – it is identical to 'd'. (7) http://docs.python.org/library/stdtypes.html#string-formatting Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: pep 8 constants

2009-02-24 Thread Steve Holden
Ethan Furman wrote: > Steve Holden wrote: >> Brian Allen Vanderburg II wrote: >> >>> bock...@virgilio.it wrote: >>> Constants would be a nice addition in python, sure enough. But I'm not sure that this can be done without a run-time check every time the constant is used, and pyt

Re: 'u' Obselete type – it is identical to 'd'. (7 )

2009-02-24 Thread John Machin
On Feb 25, 11:32 am, Ben Finney wrote: > John Machin writes: > > On Feb 25, 9:06 am, Steven D'Aprano wrote: > > > I don't know what you want to report, but I've reported that obsolete is > > > mispelled: > > > +1 Own Goal of the Year ... see > >  http://www.yourdictionary.com/library/misspelled.

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Lionel
On Feb 24, 4:41 pm, Luis Zarrabeitia wrote: > On Tuesday 24 February 2009 07:12:36 pm Lionel wrote: > > > In a nutshell, what I need is a way to acquire the screen dimensions > > (in pixels) and its dpi setting. > > This is a guess, and a guess only. > What do you want to know it for? If it is for

Re: How do I decode unicode characters in the subject using email.message_from_string()?

2009-02-24 Thread John Machin
On Feb 25, 11:07 am, "Roy H. Han" wrote: > Dear python-list, > > I'm having some trouble decoding an email header using the standard > imaplib.IMAP4 class and email.message_from_string method. > > In particular, email.message_from_string() does not seem to properly > decode unicode characters in t

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Luis Zarrabeitia
On Tuesday 24 February 2009 07:12:36 pm Lionel wrote: > In a nutshell, what I need is a way to acquire the screen dimensions > (in pixels) and its dpi setting. This is a guess, and a guess only. What do you want to know it for? If it is for painting something on the screen, maybe (just maybe - I

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread John McMonagle
Lionel wrote: > Yes, it's platform specific. I was just trying anyway to see if it > would work. > > In a nutshell, what I need is a way to acquire the screen dimensions > (in pixels) and its dpi setting. This should work on all platforms: from Tkinter import * r = Tk() r.withdraw() r.winfo_scre

Re: 'u' Obselete type – it is identical to 'd'. (7)

2009-02-24 Thread Ben Finney
John Machin writes: > On Feb 25, 9:06 am, Steven D'Aprano wrote: > > I don't know what you want to report, but I've reported that obsolete is > > mispelled: > > +1 Own Goal of the Year ... see > http://www.yourdictionary.com/library/misspelled.html Not so notable. It's merely one more inciden

Re: Problem with environment variables and cx_Oracle

2009-02-24 Thread Zvezdan Petkovic
On Feb 24, 2009, at 4:34 PM, Brandon Taylor wrote: Here's my setup: OS X (10.5.6 - Intel), Oracle Instant Clinet 10_2, Python 2.6.1, Django trunk OS X is an important detail here. In my .bash_profile, I have ORACLE_HOME and LD_LIBRARY_PATH specified as: ORACLE_HOME="$HOME/Library/Oracle/inst

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Lionel
On Feb 24, 3:53 pm, Luis Zarrabeitia wrote: > On Tuesday 24 February 2009 05:57:52 pm Lionel wrote: > > > from win32api import GetSystemMetrics > > I'd guess that win32api is patform specific, as in "api for win32". > > -- > Luis Zarrabeitia (aka Kyrie) > Fac. de Matemática y Computación, UH.http:

How do I decode unicode characters in the subject using email.message_from_string()?

2009-02-24 Thread Roy H. Han
Dear python-list, I'm having some trouble decoding an email header using the standard imaplib.IMAP4 class and email.message_from_string method. In particular, email.message_from_string() does not seem to properly decode unicode characters in the subject. How do I decode unicode characters in the

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread geremy condra
my apologies- hit enter accidentally. anyway, just process the output of that command for the Height: and Width: lines. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread geremy condra
For X systems you can use xwininfo, ie: from commands import getstatusoutput def get_screen_dims(): status, output = getstatusoutput("xwininfo -root") if not status: On Tue, Feb 24, 2009 at 6:53 PM, Luis Zarrabeitia wrote: > On Tuesday 24 February 2009 05:57:52 pm Lionel wrote: > > from win32

Re: Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Luis Zarrabeitia
On Tuesday 24 February 2009 05:57:52 pm Lionel wrote: > from win32api import GetSystemMetrics I'd guess that win32api is patform specific, as in "api for win32". -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/

Re: 'u' Obselete type – it is identical to 'd'. (7)

2009-02-24 Thread John Machin
On Feb 25, 9:06 am, Steven D'Aprano wrote: > mathieu wrote: > > I did not know where to report that: > > > 'u'   Obselete type – it is identical to 'd'.         (7) > > >http://docs.python.org/library/stdtypes.html#string-formatting > > > Thanks > > If you google on "python bug tracker" the first

Getting screen dims platform specific? Say it ain't so!

2009-02-24 Thread Lionel
Hello people, I'm looking for a way to get the screen dimensions (in pixels) using the standard Python library. The only thing I found so far was the following: from win32api import GetSystemMetrics Width = GetSystemMetrics(0) Height = GetSystemMetrics(1) I get an error claiming "no module named

Re: 'u' Obselete type – it is identical to 'd'. (7)

2009-02-24 Thread Steven D'Aprano
mathieu wrote: > I did not know where to report that: > > 'u' Obselete type – it is identical to 'd'. (7) > > http://docs.python.org/library/stdtypes.html#string-formatting > > Thanks If you google on "python bug tracker" the first link is the correct one. I don't know what you want

Re: pdftk

2009-02-24 Thread Jason Scheirer
On Feb 24, 12:43 pm, JB wrote: > Reimar Bauer a écrit : > > > Hi > > > Does one know about a python interface to pdftk? > > Or something similar which can be used to fill a form by fdf data. > > everyday i use : > > import os > os.system("pdftk.exe source.pdf fill_form data.fdf output output.pdf >

Re: Cross-compiling error when compiling 2.6.1...

2009-02-24 Thread Garrett Cooper
On Tue, Feb 24, 2009 at 12:55 PM, Garrett Cooper wrote: > I come across the following error: > > checking for chflags... configure: error: cannot run test program > while cross compiling > See `config.log' for more details. > make-3.81[1]: *** > [/nobackup/garrcoop/python_upgrade/contrib/python/ob

Re: Run a linux system command as a superuser, using a python script

2009-02-24 Thread birdsong
On Feb 24, 11:44 am, Chris Rebert wrote: > On Tue, Feb 24, 2009 at 11:38 AM, madhav wrote: > > I have got postfix installed on my machine and I am updating on of its > > configuration files programmatically(using python)(on some action). > > Since any change in the configuration needs a reload, I

Pydev 1.4.4 Released

2009-02-24 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.4.4 have been released -- note that the release already happened 4 days ago... :) Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev

Problem with environment variables and cx_Oracle

2009-02-24 Thread Brandon Taylor
Hello everyone, Here's my setup: OS X (10.5.6 - Intel), Oracle Instant Clinet 10_2, Python 2.6.1, Django trunk I have my Oracle instantclient folder at: /Users/bft228/Library/Oracle/ instantclient_10_2 In my .bash_profile, I have ORACLE_HOME and LD_LIBRARY_PATH specified as: ORACLE_HOME="$HOME/

Re: Run a linux system command as a superuser, using a python script

2009-02-24 Thread geremy condra
Run the script as root and have it drop privs when it doesn't need them. Or set up a separate daemon to do the rootish parts of it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-24 Thread geremy condra
I'm interested. If you are still serious about doing this in two months, send me an email. If you have something put together at that point we can talk about its future. Sound fair? Geremy Condra -- http://mail.python.org/mailman/listinfo/python-list

Re: more on unescaping escapes

2009-02-24 Thread bvdp
Adam Olsen wrote: On Feb 23, 7:18 pm, bvdp wrote: Gabriel Genellina wrote: En Mon, 23 Feb 2009 23:31:20 -0200, bvdp escribió: Gabriel Genellina wrote: En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió: Chris Rebert wrote: On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote: [problem with Python

Re: python sql query in django

2009-02-24 Thread May
On Feb 24, 10:36 am, "Diez B. Roggisch" wrote: > > Thanks for all your suggestions.  From what I've experienced in Django > > and now that I know a little more about how Python functions, I will > > probably use a combination of PHP and Django, instead of trying to get > > Python to do the web por

Re: Python AppStore / Marketplace

2009-02-24 Thread geremy condra
Just a few quick questions on your proposed design: 1) What tools, if any, do you propose to help developers package for this platform? 2) How do you plan to deal with applications that change or depend on system-wide settings, ie, conf files, kernel version, or the registry? 3) What advantages do

Cross-compiling error when compiling 2.6.1...

2009-02-24 Thread Garrett Cooper
I come across the following error: checking for chflags... configure: error: cannot run test program while cross compiling See `config.log' for more details. make-3.81[1]: *** [/nobackup/garrcoop/python_upgrade/contrib/python/obj-mips32/Makefile] Error 1 make-3.81[1]: Leaving directory `/nobackup/

Re: pdftk

2009-02-24 Thread JB
Reimar Bauer a écrit : Hi Does one know about a python interface to pdftk? Or something similar which can be used to fill a form by fdf data. everyday i use : import os os.system("pdftk.exe source.pdf fill_form data.fdf output output.pdf flatten") and BIM ;) -- http://mail.python.org/mai

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-24 Thread r
On Feb 20, 3:09 pm, Dotan Cohen wrote: > > Even 3DS or Maya is easier to learn that Blender. > > Notepad is easier to learn that VI. Not a good program does simple make. And not a good program does complex make either Yoda. Assembly language is very powerful and allows full control down to the p

Re: 'u' Obselete type – it is identical to 'd'. (7)

2009-02-24 Thread John Machin
On Feb 25, 4:48 am, mathieu wrote: > I did not know where to report that: > > 'u'     Obselete type – it is identical to 'd'.       (7) > > http://docs.python.org/library/stdtypes.html#string-formatting So what's your problem with that? Do you believe that 'u' is not accepted? That 'u' is not id

Re: more on unescaping escapes

2009-02-24 Thread Adam Olsen
On Feb 23, 7:18 pm, bvdp wrote: > Gabriel Genellina wrote: > > En Mon, 23 Feb 2009 23:31:20 -0200, bvdp escribió: > >> Gabriel Genellina wrote: > >>> En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió: > Chris Rebert wrote: > > On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote: > > > [pro

Re: Is there any equivalent feature available in Python..?

2009-02-24 Thread Albert Hopkins
On Tue, 2009-02-24 at 11:05 -0800, zaheer.ag...@gmail.com wrote: > Hi, > > Is there any Python equivalent of java jar,can I include all my > sources,properties file etc into a single file.Is there anyway in > Python that I can run like the following > > java -jar Mytest.jar --startwebserver > >

Re: [Tutor] Accessing callers context from callee method

2009-02-24 Thread wesley chun
> when i call a method foo from another method func. can i access func context > variables or locals() from foo > so > def func(): >   i=10 >   foo() > > in foo, can i access func's local variables A. python has statically-nested scoping, so you can do it as long as you: 1. define foo() as an in

Re: Run a linux system command as a superuser, using a python script

2009-02-24 Thread Chris Rebert
On Tue, Feb 24, 2009 at 11:38 AM, madhav wrote: > I have got postfix installed on my machine and I am updating on of its > configuration files programmatically(using python)(on some action). > Since any change in the configuration needs a reload, I need to reload > postfix to reflect the latest ch

Run a linux system command as a superuser, using a python script

2009-02-24 Thread madhav
I have got postfix installed on my machine and I am updating on of its configuration files programmatically(using python)(on some action). Since any change in the configuration needs a reload, I need to reload postfix to reflect the latest change. How can I do that in a python script. Precisely, I

Re: shared lib from python code?

2009-02-24 Thread Terry Reedy
Gabriel Rossetti wrote: Ok, I see, thank you. I thought this was possible since I have used *.pyd files before and from what I had read they were dynamic library files. I guess they must be written in C/C++ then. Thank you for the explanation. Yes, that can be confusing. Unlike .py, .pyc, .

Re: Extending Python Questions .....

2009-02-24 Thread Mike Driscoll
On Feb 24, 11:31 am, Nick Craig-Wood wrote: > Ben wrote: > >  No, It uses the the S-lang for video, and input control. However, SLAG > >  is more of an abstract layer on top of that. > > >  It has a Structures that contains menus and screens (menumodule / > >  screenmodule). One LOADS them up wit

Re: Is there any equivalent feature available in Python..?

2009-02-24 Thread Chris Rebert
On Tue, Feb 24, 2009 at 11:05 AM, wrote: > Hi, > > Is there any Python equivalent of java jar,can I include all my > sources,properties file etc into a single file.Is there anyway in > Python that I can run like the following > > java  -jar Mytest.jar --startwebserver > > How to so something like

Re: Python AppStore / Marketplace

2009-02-24 Thread ajaksu
Steve Holden wrote: > And the "multiplatform client" that should "easily and elegantly allow > app browsing, downloading and installing those apps" would presumably > have to account for the many differences in package formats and install > requirements between the different platforms. And then yo

Is there any equivalent feature available in Python..?

2009-02-24 Thread zaheer . agadi
Hi, Is there any Python equivalent of java jar,can I include all my sources,properties file etc into a single file.Is there anyway in Python that I can run like the following java -jar Mytest.jar --startwebserver How to so something like this in Python? Thanks -- http://mail.python.org/mailman

pdftk

2009-02-24 Thread Reimar Bauer
Hi Does one know about a python interface to pdftk? Or something similar which can be used to fill a form by fdf data. cheers Reimar -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing callers context from callee method

2009-02-24 Thread Chris Rebert
On Tue, Feb 24, 2009 at 10:53 AM, wrote: > when i call a method foo from another method func. can i access func context > variables or locals() from foo > so > def func(): >   i=10 >   foo() > > in foo, can i access func's local variables on in this case i You can, but it's an evil hack that I w

Accessing callers context from callee method

2009-02-24 Thread mobiledreamers
when i call a method foo from another method func. can i access func context variables or locals() from foo so def func(): i=10 foo() in foo, can i access func's local variables on in this case i Thanks a lot -- Bidegg worlds best auction site http://bidegg.com -- http://mail.python.org/mailm

Re: python sql query in django

2009-02-24 Thread Diez B. Roggisch
Thanks for all your suggestions. From what I've experienced in Django and now that I know a little more about how Python functions, I will probably use a combination of PHP and Django, instead of trying to get Python to do the web portion of my project. Thanks again! That sounds like the wors

Re: Python 3 and easygui problem

2009-02-24 Thread blogger
Thanks to all for helping Peter on this. Just a bit of an update... The solution offered in this thread to Peter's original problem is the same as the once I arrived at. There is a bit of discussion about it here: http://pythonconquerstheuniverse.blogspot.com/2009/01/moving-to-python-30-part1.ht

Re: Metaclass conflict TypeError exception: problem demonstration script

2009-02-24 Thread Hrvoje Niksic
"Barak, Ron" writes: > However, when line 7 is in effect (with line 8 commented out), viz.: > > $ cat -n metaclass_test01.py | head > 1 #!/usr/bin/env python > 2 > 3 import sys > 4 import wx > 5 import CopyAndPaste > 6 > 7 class ListControl(wx.Frame, CopyAndPaste): If this is

Re: Unix Change Passwd Python CGI

2009-02-24 Thread James Matthews
IMHO That sounds like the biggest security hole I can think of. Anyways you can open a pipe to passwd. to have the change there password. James On Tue, Feb 24, 2009 at 5:19 PM, Derek Tracy wrote: > I am using python version 2.5.1 and need to create a python cgi application > to allow a user to

Re: Python AppStore / Marketplace

2009-02-24 Thread Paul Boddie
On 22 Feb, 12:24, Marcel Luethi wrote: > > Using my iPhone I suddenly realize how easy it is to find applications > in Apple's AppStore. How easy and fast it is to install or de-install > an app. My iPhone even checks in the background if there is an upgrade > which could be installed painlessly.

Re: try except question - serious foo bar question, and pulling my hair out :-)

2009-02-24 Thread Tim Rowe
2009/2/24 Grant Edwards : > It works with a person as well as stuffed toys -- but trying to > order a person on the internet gets you in a lot more trouble. > It's also a little more embarassing when you realize your > mistake in front of a person.  OTOH, sometimes a person will > ask an enlighten

Python Image Library IOError - cannot find JPEG decoder?

2009-02-24 Thread Dario Traverso
I've been trying to install the Python Image Library (PIL) on my Mac OSX Leopard laptop, but have been running into some difficulties. I've built the library, using the included setup.py script. The build summary checks out ok, and sounds the option libraries to all be found. I grabbed bo

Re: Extending Python Questions .....

2009-02-24 Thread Nick Craig-Wood
Ben wrote: > No, It uses the the S-lang for video, and input control. However, SLAG > is more of an abstract layer on top of that. > > It has a Structures that contains menus and screens (menumodule / > screenmodule). One LOADS them up with parameters. such as creating > a new menu is like:

Re: python sql query in django

2009-02-24 Thread May
On Feb 23, 12:48 pm, Bruno Desthuilliers wrote: > May a écrit : > (snip) > > > I may not stay with Django. > > Nope, but your question was about Django. > > > I am seriously looking for whether python > > can read data from a relational database > > Of course - as long as there's a Python adapter

Re: tkinter icons as bytestrings, not files?

2009-02-24 Thread Eric Brunel
On Tue, 24 Feb 2009 05:56:12 +0100, Peter Billam wrote: Greetings, As a newbie, starting with Python3, I'm working my way through Mark Summerfield's tkinter examples. In the toolbar, there's lines like: for image, command in ( ('images/filenew.gif', self.fileNew), ('ima

Re: thanks very much indeed for your help is there a better way to do this (python3) newby

2009-02-24 Thread kshitij
On Feb 24, 6:29 am, "Rhodri James" wrote: > On Mon, 23 Feb 2009 23:33:31 -, Gary Wood wrote: > > '''exercise to complete and test this function''' > > import string > > def joinStrings(items): > >     '''Join all the strings in stringList into one string, > >     and return the result. For ex

March 2, 2009 Pyowa Meeting

2009-02-24 Thread Mike Driscoll
Hi, Just a quick note to say that our next Pyowa (Python Users Group of Iowa) meeting will be next Monday, March 2nd from 7-9 p.m. We will be in our original location at the Marshall County Sheriff's Office, 2369 Jessup Ave, Marshalltown, IA. Remember, it's technically NOT in Marshalltown at all.

Re: Python AppStore / Marketplace

2009-02-24 Thread Richard Brodie
"Rhodri James" wrote in message news:mailman.615.1235436896.11746.python-l...@python.org... > A souq is a bazaar :-) > Maybe I've just read too much arabic-themed fiction, but I was surprised not > to find the word in my trusty Chambers. Try under 'souk'. Transliterating to the Roman 'q' seem

Re: Newby - is this what they are looking for ?? and is their a better a way

2009-02-24 Thread Peter Otten
Tim Rowe wrote: > 1. 'input' might not be the best way to get the phrase, because the > user will have to put the phrase in quotes or the program will > (probably) crash. Have a look at raw_input. Gary is using Python 3 where input() works like the raw_input() of yore. The giveaway is > print(wo

Re: try except question - serious foo bar question, and pulling my hair out :-)

2009-02-24 Thread Laszlo Nagy
Use this instead: import sys try: ??? except: e = sys.exc_value do_with(e) Only at the outermost block on your code, if ever... The fact that some exceptions don't inherit from Exception is on purpose -- usually you *dont* want to catch (and swallow) SystemExit (nor KeyboardInte

Re: try except question - serious foo bar question, and pulling my hair out :-)

2009-02-24 Thread Grant Edwards
On 2009-02-24, Steve Holden wrote: >> However, this cannot happen. This application is running >> multiple threads (10+) and every thread monitors the global >> "stop_requested" flag. If there was an unexpected error in the >> service, stop_requested.set() is called. It will stop all >> threads a

Unix Change Passwd Python CGI

2009-02-24 Thread Derek Tracy
I am using python version 2.5.1 and need to create a python cgi application to allow a user to change their unix password. Apache is running on the same system that needs the password changed. I need to keep security high and can not install additional modules at this time. I just need a general

Re: Newby - is this what they are looking for ?? and is their a better a way

2009-02-24 Thread Tim Rowe
You're doing well so far. As Chris has said, you need to read the later part of the question more carefully. A couple of other things: 1. 'input' might not be the best way to get the phrase, because the user will have to put the phrase in quotes or the program will (probably) crash. Have a look at

Re: reading file to list

2009-02-24 Thread nick_keighley_nospam
On 17 Jan, 17:16, Xah Lee wrote: > comp.lang.lisp,comp.lang.scheme,comp.lang.functional,comp.lang.python,comp.­lang.ruby > > Here's a interesting toy problem posted by Drew Krause to > comp.lang.lisp: > > > On Jan 16, 2:29 pm, Drew Krause wrote [paraphrased a bit]: > > OK,

  1   2   >