python-graph-1.4.2 released

2009-02-23 Thread Pedro Matiello
python-graph release 1.4.2 http://code.google.com/p/python-graph/ python-graph is a library for working with graphs in Python. This software provides a suitable data structure for representing graphs and a whole set

ANN: SuPy 1.5

2009-02-23 Thread Greg Ewing
SuPy 1.5 Available -- http://www.cosc.canterbury.ac.nz/greg.ewing/SuPy/ New in this version: - Tool and Observer classes can be implemented in Python - Contextual menu facilities - Modifier key and status bar constants - to_length() function - dir() works on Ruby classes

ANN: Hypy 0.8.3 (the extensively documented release)

2009-02-23 Thread Cory Dodt
All my fans of detailed example documentation are gonna love this release. If you've been wondering whether Hypy has the feature you want for your searching, check out the examples page and see for yourself. (Link below.) Hypy is a fulltext search interface for Python applications. Use it to

Miros: a hierarchical state machine module

2009-02-23 Thread Tom Schmit
Miros for Python can be found here: http://www.bellfelljar.org/tractwo/wiki/Python%20Projects. Miros is a module that implements a Hierarchical State Machine (HSM) class (i.e. one that implements behavioral inheritance). It is based on the excellent work of Miro Samek (hence the module name

ANN: SuPy 1.6

2009-02-23 Thread Greg Ewing
SuPy 1.6 Available -- http://www.cosc.canterbury.ac.nz/greg.ewing/SuPy/ Fixed some bugs in the Tool and Observer classes, and in the linetool example. What is SuPy? - SuPy is a plugin for the Sketchup 3D modelling application that lets you script it in Python.

[ANN] BleachBit 0.4.0

2009-02-23 Thread Andrew Ziem
BleachBit is a Internet history, locale, registry, privacy, and temporary file cleaner for Linux on Python v2.4 - v2.6. Notable changes for 0.4.0: * Introduce CleanerML, a system for creating cleaners in XML. * Add cleaners for aMSN, CrossOver Chromium (Google Chrome), ELinks, emesene, GL-117,

Re: Reference or Value?

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak denis.ka...@gmail.com escribió: On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote: as far as i understand things, the best model is: 1 -

Re: different errors, return outside function and others

2009-02-23 Thread Tony
The full error message says There's an error in your program: *** 'return' outside function (final(2).py, line 114) which is were this return statement is.. while introselection 1 or introselection 2: print 'That area is unavaible please buy the expansion haha' return

RE: Is there a way to ask a class what its metaclasses are ?

2009-02-23 Thread Barak, Ron
-Original Message- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Sunday, February 22, 2009 22:12 To: Barak, Ron Cc: python-list@python.org Subject: Re: Is there a way to ask a class what its metaclasses are ? On Sun, Feb 22, 2009 at 5:14

confusing UnboundLocalError behaive

2009-02-23 Thread neoedmund
see the 3 small piece of code, i cannot understand why it result as this. 1. def test(): abc=111 def m1(): print(abc) m1() test() Output: 111 2. def test(): abc=111 def m1(): print(abc) abc+=222 m1()

pysqlite smart search

2009-02-23 Thread klia
Hey guys; I am trying to develop a tiny program using python to search inside sqlite database with file extension is .db in which the program will ask users to enter their search query and base on that it will retrieve the results But I need the program to have some smartness in search

Re: different errors, return outside function and others

2009-02-23 Thread Chris Rebert
Ok, that's not a standard Python error report (I'm guessing you're using an IDE of some sort). Also, something's not right because your excerpt doesn't match the source you posted. In your previous post, the 'while' line in question was given as: while introselection 1 or introselection 2 Note

Re: different errors, return outside function and others

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 04:51:39 -0200, Tony sternbrightbl...@gmail.com escribió: Hi, I am trying to write a small program for my final for school, everytime i run my program it gives me a return outside function error (after i fixed all the indentation errors it throws at me), i am not very good

Re: confusing UnboundLocalError behaive

2009-02-23 Thread Chris Rebert
On Mon, Feb 23, 2009 at 12:06 AM, neoedmund neoedm...@gmail.com wrote: see the 3 small piece of code, i cannot understand why it result as this. 1. def test(): abc=111 def m1(): print(abc) m1() test() Output: 111 2. def test(): abc=111

Re: confusing UnboundLocalError behaive

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 06:06:58 -0200, neoedmund neoedm...@gmail.com escribió: it seems you cannot change the outter scope values but can use it readonly. Exactly. Python doesn't have variable declarations - so the compiler uses this rule: if the variable is assigned to, anywhere in the

Re: confusing UnboundLocalError behaive

2009-02-23 Thread Steven D'Aprano
On Mon, 23 Feb 2009 00:06:58 -0800, neoedmund wrote: see the 3 small piece of code, i cannot understand why it result as this. 1. def test(): abc=111 def m1(): print(abc) m1() test() Output: 111 abc is local to test(). print(abc) looks for a local

Re: pysqlite smart search

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 06:17:41 -0200, klia alwaseem307s...@yahoo.com escribió: I need the program to have some smartness in search mechanism in which the program will guess that the user is looking for these key words in the database. so far i came up with this but the search ain't smart, i

Re: different errors, return outside function and others

2009-02-23 Thread Tony
ok thank you for that input, this is my first class in programming and its the only one the school offers. im pretty sure those are supposed to be modules that im writting. would it make a difference if those were modules and not functions? kinda stupid question there but im trying to learn as

Re: Is there a way to ask a class what its metaclasses are ?

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 06:09:44 -0200, Barak, Ron ron.ba...@lsi.com escribió: I'm asking, because, even subclassing from object, viz.: class CopyAndPaste(object): def __init__(self): pass ... Still gives me: $ python -u ./failover_pickle_demo09.py Traceback (most recent

Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
Hi Guys, Thanks to Michele, Chris, Hrvoje et. al. who helped me trying to resolve the metaclass exception when a class has two parents problem. This post tries to unify all the metaclasses exception threads, in an attempt to reach a solution. I've created a short demo script

Re: can multi-core improve single funciton?

2009-02-23 Thread Nick Craig-Wood
sturlamolden sturlamol...@yahoo.no wrote: On Feb 10, 8:38?am, Paul McGuire pt...@austin.rr.com wrote: Even worse than linear, the function is recursive, which as I understand it, is inherently a no-no when looking for code that is parallel-friendly. There is no way to parallelize

Re: Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Tim Golden
$ 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): 8 #class ListControl(wx.Frame): 9 def __init__(self, parent, id, title, list,

Re: Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 07:32:52 -0200, Barak, Ron ron.ba...@lsi.com escribió: $ 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): 8 #class

Access from class variable to one on constructor

2009-02-23 Thread Kless
How to access from a class variable to one that is initialized on the constructor? -- class Foo(): foo = bar # I want to access *from here* to variables created on the constructor. def __init__(self, bar_init): self.bar = bar_init -- Note: I've to create a

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread Stef Mientki
thanks Ron, but I was looking for a more general solution, in which I don't change the program itself, and where the error messages (in general) become more informative than it is by default. cheers, Stef Barak, Ron wrote: Hi Stef, You can do something like (not tested): try:

Re: different errors, return outside function and others

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 07:07:57 -0200, Tony sternbrightbl...@gmail.com escribió: ok thank you for that input, this is my first class in programming and its the only one the school offers. im pretty sure those are supposed to be modules that im writting. would it make a difference if those were

Re: Access from class variable to one on constructor

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 07:40:47 -0200, Kless jonas@googlemail.com escribió: How to access from a class variable to one that is initialized on the constructor? -- class Foo(): foo = bar # I want to access *from here* to variables created on the constructor. def

shared lib from python code?

2009-02-23 Thread Gabriel Rossetti
Hello everyone, I would like to know if it is possible to turn python code into a shared lib? I have several processes that use the same base code, and it seems like every process loads the shared code into memory. I would like it to be loaded once and shared, like a .so in linux or a .dll in

Re: shared lib from python code?

2009-02-23 Thread Paul Rubin
Gabriel Rossetti gabriel.rosse...@arimaz.com writes: I would like to know if it is possible to turn python code into a shared lib? I have several processes that use the same base code, and it seems like every process loads the shared code into memory. I would like it to be loaded once and

Re: Get variables on constructor [Solved]

2009-02-23 Thread Kless
On 23 feb, 10:17, Kless jonas@googlemail.com wrote: To get class variables can be used *for i in dir(self): * but how to get variables initialized on the constructor? Sorry. It's so simple as insert *self*. -- http://mail.python.org/mailman/listinfo/python-list

Re: shared lib from python code?

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 08:10:16 -0200, Gabriel Rossetti gabriel.rosse...@arimaz.com escribió: I would like to know if it is possible to turn python code into a shared lib? I have several processes that use the same base code, and it seems like every process loads the shared code into memory.

Re: Access from class variable to one on constructor [Solved]

2009-02-23 Thread Kless
Thanks Gabriel. You have reason, and I was having a design error. On 23 feb, 10:02, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Mon, 23 Feb 2009 07:40:47 -0200, Kless jonas@googlemail.com   escribió: How to access from a class variable to one that is initialized on the

Re: Reference or Value?

2009-02-23 Thread andrew cooke
Steven D'Aprano wrote: On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote: as far as i understand things, the best model is: 1 - everything is an object 2 - everything is passed by reference Except that is wrong. If it were true, you could do this: [pointer swapping] i was thinking of

Re: shared lib from python code?

2009-02-23 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello everyone, I would like to know if it is possible to turn python code into a shared lib? I have several processes that use the same base code, and it seems like every process loads the shared code into memory. I would like it to be loaded once and shared, like a

ANN: Shed Skin 0.1, an experimental (restricted-)Python-to-C++ Compiler

2009-02-23 Thread Mark Dufour
Hi all, I have recently released version 0.1 of Shed Skin, an experimental (restricted-)Python-to-C++ compiler. Please see my blog for more info about the release: http://shed-skin.blogspot.com Thanks, Mark Dufour. -- One of my most productive days was throwing away 1000 lines of code - Ken

Re: ANN: Shed Skin 0.1, an experimental (restricted-)Python-to-C++ Compiler

2009-02-23 Thread James Matthews
Nice! I was looking for one of these for a while On Mon, Feb 23, 2009 at 1:54 PM, Mark Dufour mark.duf...@gmail.com wrote: Hi all, I have recently released version 0.1 of Shed Skin, an experimental (restricted-)Python-to-C++ compiler. Please see my blog for more info about the release:

Re: How does one get from ImportError: DLL load failed:... to a culprit .dll and symbol?

2009-02-23 Thread Chris Cormie
If that not-very-technical description [all I've ever needed] doesn't help, you'll need to read the DW help file (HTFF1K) or wait till someone who knows what they are doing comes along :-) LOL, I am that person :p Your technique works well and it does provide the information and it is a

Server programming

2009-02-23 Thread koranthala
Hi, Is server programming in Python procedure oriented or object oriented? I have this question because lately I am asked to make a medium complex web program (extremely database oriented) using Django. When I used to do application programs earlier (in Python itself), the whole thing

Re: pysqlite smart search

2009-02-23 Thread klia
klia wrote: Hey guys; I am trying to develop a tiny program using python to search inside sqlite database with file extension is .db in which the program will ask users to enter their search query and base on that it will retrieve the results But I need the program to have some

Re: How does one get from ImportError: DLL load failed:... to a culprit .dll and symbol?

2009-02-23 Thread John Machin
On Feb 23, 11:41 pm, Chris Cormie ccor...@aussiemail.com.au wrote: If that not-very-technical description [all I've ever needed] doesn't help, you'll need to read the DW help file (HTFF1K) or wait till someone who knows what they are doing comes along :-) LOL, I am that person :p It

Re: shared lib from python code?

2009-02-23 Thread Duncan Booth
Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: Ok, maybe I mis-stated my problem (or mis-understood your answers).. I don' t want to share code as in have multiple processes access a variable and have the same value, like it is done in threads, what I want is to not have n copies of

Re: shared lib from python code?

2009-02-23 Thread Diez B. Roggisch
Gabriel Rossetti schrieb: Gabriel Rossetti wrote: Hello everyone, I would like to know if it is possible to turn python code into a shared lib? I have several processes that use the same base code, and it seems like every process loads the shared code into memory. I would like it to be

Re: How does one get from ImportError: DLL load failed:... to a culprit .dll and symbol?

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 10:41:20 -0200, Chris Cormie ccor...@aussiemail.com.au escribió: If that not-very-technical description [all I've ever needed] doesn't help, you'll need to read the DW help file (HTFF1K) or wait till someone who knows what they are doing comes along :-) LOL, I am that

opening files with names in non-english characters.

2009-02-23 Thread venutaurus...@gmail.com
Hi all, I am trying to find the attributes of afile whose name has non english characters one like given below. When I try to run my python scirpt, it fails giving out an error filename must be in string or UNICODE. When i try to copy the name of the file as a strinig, it (KOMODO IDE) is

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread Chris
On Feb 23, 11:57 am, Stef Mientki stef.mien...@gmail.com wrote: thanks Ron, but I was looking for a more general solution, in which I don't change the program itself, and where the error messages (in general) become more informative than it is by default. cheers, Stef Barak, Ron wrote:

Re: shared lib from python code?

2009-02-23 Thread andrew cooke
Gabriel Rossetti wrote: Ok, maybe I mis-stated my problem (or mis-understood your answers).. I don' t want to share code as in have multiple processes access a variable and have the same value, like it is done in threads, what I want is to not have n copies of the code (classes, functions,

Getting Certification Chain from Digital Signature

2009-02-23 Thread Good Z
All, I need to extract certification chain/private key from digital signature certificate (DSC). The Digital Signature (DSC) is in PFX file format. I got the Java code but do not know the python equivalent in python. Any help will be appreciated. Best Regards, Mike --

Re: count secton of data in list

2009-02-23 Thread S Arrowsmith
In article 3ed253bb-d6ec-4f47-af08-ad193e9c4...@h16g2000yqj.googlegroups.com, odeits ode...@gmail.com wrote: def count_consecutive(rows): switch =3D 0 count =3D 0 for r in rows: if r[-1] =3D=3D switch: count +=3D 1 else: switch =3D not switch

Re: pysqlite smart search

2009-02-23 Thread Bret Fledderjohn
2009/2/23 klia alwaseem307s...@yahoo.com klia wrote: Hey guys; I am trying to develop a tiny program using python to search inside sqlite database with file extension is .db in which the program will ask users to enter their search query and base on that it will retrieve the

Solved: Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
Hi, -Original Message- From: Tim Golden [mailto:m...@timgolden.me.uk] Sent: Monday, February 23, 2009 11:37 Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org Subject: Re: Metaclass conflict TypeError exception: problem demonstration script $ cat -n

Re: Solved: Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Tim Golden
Barak, Ron wrote: That's it. Once I changed my class header to: $ cat -n metaclass_test01.py 1 #!/usr/bin/env python 2 3 import sys 4 import wx 5 import CopyAndPaste 6 7 class ListControl(wx.Frame, CopyAndPaste.CopyAndPaste): I'm getting no more

Re: pysqlite smart search

2009-02-23 Thread Diez B. Roggisch
klia schrieb: klia wrote: Hey guys; I am trying to develop a tiny program using python to search inside sqlite database with file extension is .db in which the program will ask users to enter their search query and base on that it will retrieve the results But I need the program to have

Re: programming by evolution?

2009-02-23 Thread Xah Lee
On Feb 23, 4:56 am, Roedy Green see_webs...@mindprod.com.invalid wrote: On 19 Feb 2009 18:56:42 GMT, Albert van der Horst alb...@spenarnc.xs4all.nl wrote, quoted or indirectly quoted someone who said : Note here, that eXtreme Programing is one of the snake oil, Extreme programming is a

ZSI / MTOM

2009-02-23 Thread John Ionides
I have project for which I would like to have a python web service including MTOM. It seems that ZSI is the most complete python web service library but that it doesn't currently support MTOM - and having worked through the code it looks as though it isn't going to be exactly simple. Is there

charset problems with urllib/urllib2

2009-02-23 Thread Brot
Hello, I am using the mailman-installation (http://www.gnu.org/software/ mailman/) from my hosting company. I doesn't have access to the add_members script and so I am writing a python script which uses http requests to subscribe new members. But if I am posting a new member with an name, which

Re: programming by evolution?

2009-02-23 Thread Roedy Green
On 19 Feb 2009 18:56:42 GMT, Albert van der Horst alb...@spenarnc.xs4all.nl wrote, quoted or indirectly quoted someone who said : Note here, that eXtreme Programing is one of the snake oil, Extreme programming is a variant on Deming's idea of constant incremental improvement that revolutionised

Get variables on constructor

2009-02-23 Thread Kless
To get class variables can be used *for i in dir(self): * but how to get variables initialized on the constructor? -- http://mail.python.org/mailman/listinfo/python-list

Re: different errors, return outside function and others

2009-02-23 Thread Terry Reedy
Tony wrote: The full error message says There's an error in your program: *** 'return' outside function (final(2).py, line 114) Ah, you left the quotes off before, and you still omitted the error class (SyntaxError, see below). When you are puzzled by an error, try to reduce the executed

A tale of two execs

2009-02-23 Thread aha
Hello All, I am working on a project where I need to support versions of Python as old as 2.3. Previously, we distributed Python with our product, but this seemed a bit silly so we are no longer doing this. The problem that I am faced with is that we have Python scripts that use the subprocess

Python Imaging Library (PIL): create PDF from scratch

2009-02-23 Thread zelegolas
Hi, I have some scan generated by SANE and i would like to do some transformation (like crop, brightness and resize) and finaly put all those images in PDF file. With PIL i can do all the transformations that i want. But i don't know how i can create from scratch a PDF. I'm not even sure that

Re: A tale of two execs

2009-02-23 Thread Matt Nordhoff
aha wrote: Hello All, I am working on a project where I need to support versions of Python as old as 2.3. Previously, we distributed Python with our product, but this seemed a bit silly so we are no longer doing this. The problem that I am faced with is that we have Python scripts that use

Re: A tale of two execs

2009-02-23 Thread bieffe62
On Feb 23, 5:53 pm, aha aquil.abdul...@gmail.com wrote: Hello All,   I am working on a project where I need to support versions of Python as old as 2.3. Previously, we distributed Python with our product, but this seemed a bit silly so we are no longer doing this.  The problem that I am faced

Python shell scripting and errors

2009-02-23 Thread Phillip B Oldham
I've got a python script running as a daemon (using someone else's daemon module). It runs fine for a while, but will occasionally balk and die. Since its running in the background, I'm getting no error from it. What's the best way to capture the output into a file for later review? --

Re: Python shell scripting and errors

2009-02-23 Thread Tim Wintle
On Mon, 2009-02-23 at 09:12 -0800, Phillip B Oldham wrote: I've got a python script running as a daemon (using someone else's daemon module). It runs fine for a while, but will occasionally balk and die. Since its running in the background, I'm getting no error from it. What's the best way

Re: Is there a way to ask a class what its metaclasses are ?

2009-02-23 Thread Terry Reedy
Barak, Ron wrote: When I try the following (to see the types of the classes involved): #!/usr/bin/env python import wx from Debug import _line as line class CopyAndPaste(object): def __init__(self, *args, **kwargs): super(CopyAndPaste, self).__init__(*args, **kwargs)

Re: A tale of two execs

2009-02-23 Thread bieffe62
On Feb 23, 6:06 pm, bieff...@gmail.com wrote: On Feb 23, 5:53 pm, aha aquil.abdul...@gmail.com wrote: Hello All,   I am working on a project where I need to support versions of Python as old as 2.3. Previously, we distributed Python with our product, but this seemed a bit silly so we

Re: Python shell scripting and errors

2009-02-23 Thread Philip Semanchuk
On Feb 23, 2009, at 12:21 PM, Tim Wintle wrote: On Mon, 2009-02-23 at 09:12 -0800, Phillip B Oldham wrote: I've got a python script running as a daemon (using someone else's daemon module). It runs fine for a while, but will occasionally balk and die. Since its running in the background, I'm

Re: Reference or Value?

2009-02-23 Thread Steve Holden
Denis Kasak wrote: On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote: as far as i understand things, the best model is: 1 - everything is an object 2 - everything is passed by reference

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread rdmurray
Stef Mientki stef.mien...@gmail.com wrote: thanks Ron, but I was looking for a more general solution, in which I don't change the program itself, and where the error messages (in general) become more informative than it is by default. [snip] -Original Message- From: Stef

Re: Server programming

2009-02-23 Thread Steve Holden
koranthala wrote: Hi, Is server programming in Python procedure oriented or object oriented? I have this question because lately I am asked to make a medium complex web program (extremely database oriented) using Django. When I used to do application programs earlier (in Python

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread andrew cooke
rdmur...@bitdance.com wrote: [...] (You know, I really ought to revisit that routine and make it part of my standard development toolbox.) please post it andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: opening files with names in non-english characters.

2009-02-23 Thread Chris Rebert
On Mon, Feb 23, 2009 at 5:51 AM, venutaurus...@gmail.com venutaurus...@gmail.com wrote: Hi all, I am trying to find the attributes of afile whose name has non english characters one like given below. When I try to run my python scirpt, it fails giving out an error filename must be in

Re: Python Imaging Library (PIL): create PDF from scratch

2009-02-23 Thread Steve Holden
zelegolas wrote: Hi, I have some scan generated by SANE and i would like to do some transformation (like crop, brightness and resize) and finaly put all those images in PDF file. With PIL i can do all the transformations that i want. But i don't know how i can create from scratch a PDF.

unescape escapes in strings

2009-02-23 Thread bvdp
When reading lines of data from a file in the from (no quotes!) foo\x20bar and I assign to a variable in a line line like: f = file('infile', 'r') for a in f: print a the string is read in as string with the literal characters 'f', 'o' ... 'x' , '2' ... as compared to an

Re: unescape escapes in strings

2009-02-23 Thread MRAB
bvdp wrote: When reading lines of data from a file in the from (no quotes!) foo\x20bar and I assign to a variable in a line line like: f = file('infile', 'r') for a in f: print a the string is read in as string with the literal characters 'f', 'o' ... 'x' , '2' ... as compared

Which GROUP to join ?

2009-02-23 Thread Ben
hello, I have written a parameter driven menuing and screen system for S-Lang called SLAG. It is very intuitive and easy to use and was designed to rapidly build Accounting Applications with. I am currently working on porting it to Python. Which DEV group in Python should I join to get help and

Re: Which GROUP to join ?

2009-02-23 Thread Robert Kern
On 2009-02-23 12:29, Ben wrote: hello, I have written a parameter driven menuing and screen system for S-Lang called SLAG. It is very intuitive and easy to use and was designed to rapidly build Accounting Applications with. I am currently working on porting it to Python. Which DEV group in

Re: Which GROUP to join ?

2009-02-23 Thread Mike Driscoll
On Feb 23, 12:29 pm, Ben bnsili...@gmail.com wrote: hello, I have written a parameter driven menuing and screen system for S-Lang called SLAG.  It is very intuitive and easy to use and was designed to rapidly build Accounting Applications with. I am currently working on porting it to Python.

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread Stef Mientki
rdmur...@bitdance.com wrote: Stef Mientki stef.mien...@gmail.com wrote: thanks Ron, but I was looking for a more general solution, in which I don't change the program itself, and where the error messages (in general) become more informative than it is by default. [snip]

Re: unescape escapes in strings

2009-02-23 Thread bvdp
MRAB wrote: bvdp wrote: When reading lines of data from a file in the from (no quotes!) foo\x20bar and I assign to a variable in a line line like: f = file('infile', 'r') for a in f: print a the string is read in as string with the literal characters 'f', 'o' ... 'x' , '2' ...

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread Terry Reedy
Stef Mientki wrote: thanks Ron, but I was looking for a more general solution, in which I don't change the program itself, and where the error messages (in general) become more informative than it is by default. Improving error messages is an ongoing project. I submitted feature request

Peculiar swap behavior

2009-02-23 Thread Tim Chase
I stumbled across this oddity and was hoping folks on the list might be able to provide a little understanding: # swap scalars x,y = 1,2 x,y = y,x x,y (2, 1) # swap lists a,b = [1,2,3],[4,5,6] a,b = b,a a,b ([4, 5, 6], [1, 2, 3]) # swap list contents...not so much... m,n =

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread Benjamin Kaplan
On Mon, Feb 23, 2009 at 1:37 PM, Stef Mientki stef.mien...@gmail.comwrote: rdmur...@bitdance.com wrote: FYI, top posts are much harder to read and to reply to than if you edit the message to which you are replying and add your new content interleaved or at the bottom (as I have done).

Re: unescape escapes in strings

2009-02-23 Thread MRAB
bvdp wrote: MRAB wrote: bvdp wrote: When reading lines of data from a file in the from (no quotes!) foo\x20bar and I assign to a variable in a line line like: f = file('infile', 'r') for a in f: print a the string is read in as string with the literal characters 'f', 'o' ...

Re: Top posting

2009-02-23 Thread D'Arcy J.M. Cain
On Mon, 23 Feb 2009 19:37:17 +0100 Stef Mientki stef.mien...@gmail.com wrote: FYI, top posts are much harder to read and to reply to than if you edit the message to which you are replying and add your new content interleaved ??? I read that before, but I can't understand it. It is very

Re: unescape escapes in strings

2009-02-23 Thread bvdp
Perfect ... thanks. a = a.decode(string-escape) Using string-escape does the trick! Wonderful, this python. And the quick answers on this group. -- http://mail.python.org/mailman/listinfo/python-list

Re: A tale of two execs

2009-02-23 Thread Christian Heimes
bieff...@gmail.com wrote I checked, and, for windows platform subprocess.py uses the modules mvscrt and _subprocess, which I ham unable to locate on my windows XP python 2.6 installation. This make the whole thing harder, even impossible if _subprocess has been created especially for

Re: Python Imaging Library (PIL): create PDF from scratch

2009-02-23 Thread Scott David Daniels
zelegolas wrote: Hi, I have some scan generated by SANE and i would like to do some transformation (like crop, brightness and resize) and finaly put all those images in PDF file. With PIL i can do all the transformations that i want. But i don't know how i can create from scratch a PDF. I'm

Python, HTTPS (SSL), tlslite and metoda POST (and lots of pain)

2009-02-23 Thread yatsek
Hi there. Since quite long time I'm trying to achieve following things: - for some sort of testing I need webserver with https access - with POST method implemented I found something which fits it in nicely written in Python, connected my toys and... server hangs in some weird inter-state while

Extending Python Questions .....

2009-02-23 Thread Ben
Ok... Now I can start asking. In My S-Lag Project called, SLAG, I have some function keys that get mapped back to S-lang internal functions. My SLAG project works pretty much like Python (as does the S-Lang). You write a S-lang script that imports your extension. module - and all this gets run

Python, HTTPS (SSL), tlslite and POST method (and lots of pain)

2009-02-23 Thread yatsek
Hi there. Since quite long time I'm trying to achieve following things: - for some sort of testing I need webserver with https access - with POST method implemented I found something which fits it in nicely written in Python, connected my toys and... server hangs in some weird inter-state while

Re: A tale of two execs

2009-02-23 Thread Christian Heimes
aha wrote def runner(cmd, stdin, stdout, ...): try: import subprocess sbm = 1 except: sbm = 0 # Now do something if sbm: process = subporcess(...) else: import popen2 process = popen2.Popen4(...) Has anyone else run into a situation similar to

Re: different errors, return outside function and others

2009-02-23 Thread Tony
Thank You, I now understand what i need to do now, and again Thanks On Mon, Feb 23, 2009 at 1:57 AM, Gabriel Genellina gagsl-...@yahoo.com.arwrote: En Mon, 23 Feb 2009 07:07:57 -0200, Tony sternbrightbl...@gmail.com escribió: ok thank you for that input, this is my first class in programming

Re: Reference or Value?

2009-02-23 Thread Brian Blais
On Feb 23, 2009, at 3:03 , Gabriel Genellina wrote: En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak denis.ka...@gmail.com escribió: On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote: as far

python sql query in django

2009-02-23 Thread May
I have three tables: class Technology(models.Model): technology = models.CharField(max_length=100, null=True, blank=True ) def __unicode__(self): return self.technology class Meta: ordering = [technology] class Publication(models.Model): pubtitle =

Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Gary Wood
'''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 example: print joinStrings(['very', 'hot', 'day']) 'veryhotday' ''' word = [items] for item in

Re: import not working?

2009-02-23 Thread Lionel
On Feb 21, 12:37 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 20 Feb 2009 22:40:03 -0200, Lionel lionel.ke...@gmail.com   escribió: Okay, moving the wx example into the same directory containing the first example that was working fixed it. This directory only contains these

Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Rob Clewley
You get None b/c that's what's being returned from your join strings function. Your function already prints out the result and doesn't return the joined strings a your usage case expects. So either return the joined strings from your function and don't print them inside the function, or vice

Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Albert Hopkins
On Mon, 2009-02-23 at 19:22 +, 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 example: print joinStrings(['very', 'hot', 'day'])

Re: Top posting

2009-02-23 Thread Stef Mientki
I agree that top posting on a message like this is not very convenient, but for simple messages ... D'Arcy J.M. Cain wrote: On Mon, 23 Feb 2009 19:37:17 +0100 Stef Mientki stef.mien...@gmail.com wrote: FYI, top posts are much harder to read and to reply to than if you edit the message to

  1   2   3   >