Good editor for python

2018-11-11 Thread Olive
I am not a professional programmer but I use Python regularly for custom 
scripts (and plot with matplotlib). I have just learned VBA for Excel: what I 
found amazing was their editor: it is able to suggest on the spot all the 
methods an object support and there is a well-integrated debugger. I wonder if 
something similar exists for Python. For now I just use emacs with the command 
line pdb. What do people use here? Ideally I would like to have something that 
is cross platform Windows/Linux.

Olivier

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Launching a process with stdout in the terminal and captured

2016-06-19 Thread Olive
eryk sun <eryk...@gmail.com> wrote:
> On Sat, Jun 18, 2016 at 7:09 AM, Olive
> <diolu.remove_this_p...@bigfoot.com> wrote:
> > I am here on Linux.
> > ...
> > Note that if it is possible I would prefer that the launched command see 
> > its standard
> > output connected to a terminal  
> 
> Try pexpect.
> 
> https://pypi.python.org/pypi/pexpect


That's not what I am looking for. I want to let the end user intercat with the 
process, not my script. What I want is the content (after the process has 
exited) of all what it has written on standard output.

Olive

-- 
https://mail.python.org/mailman/listinfo/python-list


Launching a process with stdout in the terminal and captured

2016-06-18 Thread Olive
I am here on Linux. I want to launch a process just like os.system, (output to 
a terminal in an unbuffered way so as to support interaction) and at the same 
time capturing the output of the process (analogous to the Unix tee command). I 
have found some tricks on the web, but is it a standard way to do that? Note 
that if it is possible I would prefer that the launched command see its 
standard output connected to a terminal (many command change their behaviour 
accordingly like 'ls', etc.). 

The main reason now is to run latex (with its interaction), I need the output 
to know where it has put its output {dvi,pdf} file (you can't guess it from the 
command line because you can launch latex without any argument and \input a 
file afterwards). 

Olivier

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue21688] Improved error msg for make.bat htmlhelp

2014-06-11 Thread Olive Kilburn

Olive Kilburn added the comment:

Thanks!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21688
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21688] Improved error msg for make.bat htmlhelp

2014-06-09 Thread Olive Kilburn

Olive Kilburn added the comment:

Before I installed HTML Help Workshop it would output many lines followed by

build succeeded, 1 warning. 
C:\Program is not recognized as an internal or external command, operable 
program or batch file. 

Build succeeded. All output should be in build\htmlhelp
 

build\htmlhelp would not be created however.

Thank you for pointing out the variable, I've fixed it.

--
Added file: http://bugs.python.org/file35545/mywork.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21688
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21688] Improved error msg for make.bat htmlhelp

2014-06-07 Thread Olive Kilburn

New submission from Olive Kilburn:

Currently if someone runs make.bat htmlhelp without first installing Htmlhelp 
Workshop, it outputs: 
c:\program not a valid . . . .

This isn't very informative if you don't know you need Htmlhelp Workshop. The 
included patch has make.bat give a more helpful message. If this isn't a good 
fix(?), I could try clarifying the readme instead.

--
components: Windows
files: mywork.patch
keywords: patch
messages: 219961
nosy: Olive.Kilburn
priority: normal
severity: normal
status: open
title: Improved error msg for make.bat htmlhelp
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35518/mywork.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21688
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21688] Improved error msg for make.bat htmlhelp

2014-06-07 Thread Olive Kilburn

Changes by Olive Kilburn olive...@gmail.com:


Added file: http://bugs.python.org/file35530/mywork.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21688
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21688] Improved error msg for make.bat htmlhelp

2014-06-07 Thread Olive Kilburn

Changes by Olive Kilburn olive...@gmail.com:


Removed file: http://bugs.python.org/file35518/mywork.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21688
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10747] Include version info in Windows shortcuts

2014-06-06 Thread Olive Kilburn

Olive Kilburn added the comment:

The included patch is probably fine, but I have given up testing it, because I 
think msi.py needs the paid-for version of Microsoft C++ to run.

--
keywords: +patch
Added file: http://bugs.python.org/file35504/mywork.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10747
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10747] Include version info in Windows shortcuts

2014-03-17 Thread Olive Kilburn

Olive Kilburn added the comment:

I'm testing a patch for this. This will be the first time I've contributed.

--
nosy: +Olive.Kilburn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10747
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Module for dialoging with intercative programs, sockets, files, etc.

2013-08-05 Thread Olive
I have found telnetlib which make very easy to interact with a telnet server, 
especially the read_until command. I wonder if something similar exits for 
other things that a telnet server. I for the moment have in mind interacting 
with a GSM modem (we do it by reading and writing a pseudo serial device file). 
But we could also want to interact with an interactive program or a socket, 
etc...

Olive 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie: The philosophy behind list indexes

2013-06-15 Thread Olive

On 15/06/13 07:21, ian.l.came...@gmail.com wrote:


I bet this is asked quite frequently, however after quite a few hours searching 
I haven't found an answer.

What is the thinking behind stopping 'one short' when slicing or iterating 
through lists?

By example;


a=[0,1,2,3,4,5,6]
a

[0, 1, 2, 3, 4, 5, 6]

a[2:5]

[2, 3, 4]

To my mind, it makes more sense to go to 5. I'm sure there's a good reason,
but I'm worried it will result in a lot of 'one-off' errors for me, so I need 
to get my head around the philosophy
of this behaviour, and where else it is observed (or not observed.)


I think it simplify some arithmetic. How many element contain a[2:5]? 
Answer 5-2=3. And a[:5] contain the first 5 elements.


Olive
--
http://mail.python.org/mailman/listinfo/python-list


Diacretical incensitive search

2013-05-17 Thread Olive
One feature that seems to be missing in the re module (or any tools that I know 
for searching text) is diacretical incensitive search. I would like to have a 
match for something like this:

re.match(franc, français)

in about the same whay we can have a case incensitive search:

re.match((?i)fran, Français).

Another related and more general problem (in the sense that it could easily be 
used to solve the first problem) would be to translate a string removing any 
diacritical mark:

nodiac(Français) - Francais

The algorithm to write such a function is trivial but there are a lot of mark 
we can put on a letter. It would be necessary to have the list of a's with 
something on it. i.e. à,á,ã, etc. and this for every letter. Trying to make 
such a list by hand would inevitably lead to some symbols forgotten (and would 
be tedious). 

Olive


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Diacretical incensitive search

2013-05-17 Thread Olive
Tanks a lot!

-- 
http://mail.python.org/mailman/listinfo/python-list


pip does not find packages

2013-04-22 Thread Olive
I am using virtualenv and pip (from archlinux). What I have done:
virtualenv was installed by my distribution. I have made a virtual environment 
and activate it, it has installed pip, so far so good.

Now I am trying to install package in the virtualenvironnement:

pip install Impacket
Downloading/unpacking Impacket
  Could not find any downloads that satisfy the requirement Impacket
No distributions at all found for Impacket

but Impacket is found by 
pip search Impacket
Impacket  - Network protocols Constructors and Dissectors

exactly the same happens with pcapy. With PyGTK, the pip command just hang when 
trying to download it. What is going on? Maybe a misconfigured server? Is there 
anything that I can do?

Olive

-- 
http://mail.python.org/mailman/listinfo/python-list


Making unhashable object

2013-02-19 Thread Olive
I am trying to define a class whose instances should not be hashable, 
following: http://docs.python.org/2/reference/datamodel.html#object.__hash__

class A:
def __init__(self,a):
self.value=a
__hash__=None


Then:

 a=A(3)
 hash(a)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: 'NoneType' object is not callable
 hash([2])
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: unhashable type: 'list'

I would expect the same error in both case and the error is confusing in the 
first case. What's the proper way of making an object non hashable?

Olive

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python 3.3 vs. MSDOS Basic

2013-02-19 Thread Olive

 max=0
 m=0
 while m=100:
 m+=1
 count=0
 n=m
 while n!=1:
 count+=1
 if n%2==0:
 n=n//2
 else:
 n=3*n+1
 if countmax:
  max=count
  num=m
 print(num,max)
 

I have tried to run your program with pypy (Python git compiler) 
(http://pypy.org/), it runs about 15x faster (8 sec instead of 2m2sec in my old 
Celeron M420 computer).

Olive

-- 
http://mail.python.org/mailman/listinfo/python-list


Forking into the background (Linux)

2012-12-23 Thread Olive
My goal is to write a script that 1) write something to stdout; then 
fork into the background, closing the stdout (and stderr, stdin) pipe.


I have found this answer (forking - setsid - forking) 
http://stackoverflow.com/a/3356154


However the standard output of the child is still connected to the 
terminal. I would like that if we execute a subprocess.checkprocess on 
this program,  only I would like to see this is captured and that the 
program terminates when the parent exits.


#! /usr/bin/python2
import os,sys,time

print I would like to see this
pid = os.fork()
if (pid == 0): # The first child.
# os.chdir(/)
   os.setsid()
   # os.umask(0)
   pid2 = os.fork()
   if (pid2 == 0):  # Second child
 print I would like not see this
 time.sleep(5)
   else:
 sys.exit()#First child exists
else:   # Parent Code
  sys.exit()   # Parent exists
--
http://mail.python.org/mailman/listinfo/python-list


urlopen in python3

2012-12-05 Thread Olive
In python2, I use this code:

a=urllib.urlopen(something)

In python2, this work if something is a regular file on the system as
well as a remote URL. The 2to3 script convert this
to urllib.request.urlopen. But it does not work anymore if something
is just a file name. 

My aim is to let the user specify a file on the command line and have
something that works, whatever the file  actually is: a regular file,
an http url, etc...

Olive
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: urlopen in python3

2012-12-05 Thread Olive
Nick Cash nick.c...@npcinternational.com wrote:
  In python2, this work if something is a regular file on the
  system as well as a remote URL. The 2to3 script convert this to
  urllib.request.urlopen. But it does not work anymore if something
  is just a file name.
  
  My aim is to let the user specify a file on the command line and
  have something that works, whatever the file  actually is: a
  regular file, an http url, etc...
 
 A file path, such as /etc/passwd, isn't properly a URL, so urllib
 correctly refuses to handle it. You can make it a URL by using the
 file:// protocol, i.e. file:///etc/passwd... which appears to work
 in both python2 and python3.
 


That's true a file path is not an URL, yet the python2 behaviour was
handy. I do not know in advance if it is a file or an URL, so 
what's the best way to hadle the case? I imagine someling like:

if os.path.exists(something):
something=file://+os.path.abspath(something)
a=urllib.request.urlopen(something)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Understanding http proxies

2012-10-15 Thread Olive
Thank you for all yours answers. There are very usefull!

Olive
-- 
http://mail.python.org/mailman/listinfo/python-list


Understanding http proxies

2012-10-13 Thread Olive
I am trying to understand how to build an http proxy server in python,
and I have found the following example:

http://www.oki-osk.jp/esc/python/proxy/

But I do not have found an exact description of what exactly a proxy
server is suppose to do (all references gice only the basic principe of
proxy that I know). In the following model

Client - Proxy - Server

it seems when I read the code above that the proxy acts mostly as an
orinary server with respect to the client except that it is supposed to
receive the full URL instead of just the path. Am I right? Is there any
documentation on what an http proxy is supposed to implement.

Olive
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Creating an instance when the argument is already an instance.

2012-07-06 Thread Olive
On 05 Jul 2012 11:55:33 GMT
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:

 On Thu, 05 Jul 2012 12:29:24 +0200, Olive wrote:
 
  I am learning python -:)
  
  I am creating a new class: package (to analyse the packages
  database in some linux distros). I have created a class package
  such that package(string) give me an instance of package if
  string is a correct representation of a package. I would like that
  if pack is already an instance of package then package(pack) just
  return pack.
 
 The built-in types only do this for immutable objects, those which
 cannot be modified.
 
 py a = float('42.5')
 py b = float(a)
 py a is b
 True
 
 
 But note carefully that this is not a guarantee of the language.
 Other versions of Python may not do this.
 
 Also note carefully that it is only immutable objects which do this. 
 Mutable objects do not behave this way:
 
 py a = ['a', 1, None]
 py b = list(a)
 py a is b
 False
 
 
 By default, most custom-made classes are mutable, and so re-using 
 instances is the wrong thing to do. Unfortunately, it is moderately 
 tricky to make mutable classes in Python. One way is described here:
 
 http://northernplanets.blogspot.com.au/2007/01/immutable-instances-in-python.html
 
 You can also look at the source code for Decimal (warning: it's BIG)
 or Fraction:
 
 http://hg.python.org/cpython/file/2.7/Lib/decimal.py
 http://hg.python.org/cpython/file/2.7/Lib/fractions.py
 
 
 But suppose you make your class immutable. Then it's quite safe, and 
 easy, to get the behaviour you want:
 
 
 class Package(object):
 def __new__(cls, argument):
 if isinstance(argument, Package):
 return argument
 return object.__new__(cls, argument)
 
 
 or similar, I haven't actually tested the above. But the important
 trick is to use __new__, the constructor, rather than __init__, which
 runs after the instance is already created, and to use an isinstance
 test to detect when you already have an instance.
 

Yes the trick with the __new__ works. We have to test afterwards i the
__init__ if the instance is already initialised and otherwise do
nothing. Thanks! I am learning and I didn't know the __new__ feature.

Olive
-- 
http://mail.python.org/mailman/listinfo/python-list


Creating an instance when the argument is already an instance.

2012-07-05 Thread Olive
I am learning python -:)

I am creating a new class: package (to analyse the packages database in
some linux distros). I have created a class package such that
package(string) give me an instance of package if string is a correct
representation of a package. I would like that if pack is already an
instance of package then package(pack) just return pack.

This is exactly the behaviour of many of the built-in types. For
example:

[code]
[oesser@pcolivier ~]$ python2
Python 2.7.3 (default, Apr 24 2012, 00:06:13) 
[GCC 4.7.0 20120414 (prerelease)] on linux2
Type help, copyright, credits or license for more information.
 a=complex(2,3)
 b=complex(a)
 a is b
True
[/code]

I note here that b is not a new instance of complex, it is another name
for a (as we can see with a is b). I would like to implement such
behaviour but I do not not how.

Olive
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: round down to nearest number

2012-02-10 Thread Olive
On Thu, 9 Feb 2012 17:43:58 -0800
Chris Rebert c...@rebertia.com wrote:

 On Thu, Feb 9, 2012 at 5:23 PM, noydb jenn.du...@gmail.com wrote:
  hmmm, okay.
 
  So how would you round UP always?  Say the number is 3219, so you
  want 3300 returned.
 
 http://stackoverflow.com/questions/17944/how-to-round-up-the-result-of-integer-division/96921
 
 Thus: (3219 + 99) // 100
 
 Slight tangent: Beware negative numbers when using // or %.

This trick work always (even if the entry is a float):


-(-a//100)*100

 -(-3219//100)*100
3300

 -(-3200.1//100)*100

3300.0

-- 
http://mail.python.org/mailman/listinfo/python-list


datetime module and timezone

2012-02-10 Thread Olive
In the datetime module, it has support for a notion of timezone but is
it possible to use one of the available timezone (I am on Linux). Linux
has a notion of timezone (in my distribution, they are stored
in /usr/share/zoneinfo). I would like to be able 1) to know the current
timezone and 2) to be able to use the timezone available on the system.
How can I do that?

Olive
-- 
http://mail.python.org/mailman/listinfo/python-list


Question about name scope

2012-02-01 Thread Olive
I am learning python and maybe this is obvious but I have not been able
to see a solution. What I would like to do is to be able to execute a
function within the namespace I would have obtained with  from module
import *

For example if I write:

def f(a):
return sin(a)+cos(a)

I could then do:

from math import *

f(5)

But I have polluted my global namespace with all what's defined in
math. I would like to be able to do something like from math import *
at the f level alone.

The main reason for this is the sympy module for CAS (computer algebra).
It reimplement a lot of functions and define all the letters as symbolic
variables. Writing sympy.function everywhere is inconvenient.
Importing all the symbols in the global namespace would lead to name
clash. It would be nice if I could import all the sympy names but for a
given function only.

Olive



-- 
http://mail.python.org/mailman/listinfo/python-list


Find the mime type of a file.

2012-01-25 Thread Olive
I want to have a list of all the images in a directory. To do so I want
to have a function that find the mime type of a file. I have found
mimetypes.guess_type but it only works by examining the extension. In
GNU/Linux the file utility do much better by actually looking at the
file. Is there an equivalent function in python (as a last resort I can
always use the external file utility).

Olive

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: += does not work correct all alogn

2012-01-19 Thread Olive
On Wed, 18 Jan 2012 09:52:55 + (GMT)
Wilfried Falk w_h_f...@yahoo.de wrote:

 Hello Pythons,
  
 attached to this email is a pdf-file which shows, that  += does not
 work well all along. Mybe somebody of you is able to explain my
 observations in this respect. I will be glad about an answer. Best
 regards Wilfried

I am not sure I understand your first question. For the second this is
explained here:
http://docs.python.org/tutorial/controlflow.html#default-argument-values

In the first case, you create a new list from the empty list at each
call. In the second case, you modify the argument in place and it is
not reevaluated between calls.

Olive
 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sys.argv as a list of bytes

2012-01-18 Thread Olive
On Wed, 18 Jan 2012 09:05:42 +0100
Peter Otten __pete...@web.de wrote:

 Olive wrote:
 
  In Unix the operating system pass argument as a list of C strings.
  But C strings does corresponds to the bytes notions of Python3. Is
  it possible to have sys.argv as a list of bytes ? What happens if I
  pass to a program an argumpent containing funny character, for
  example (with a bash shell)?
  
  python -i ./test.py $'\x01'$'\x05'$'\xFF'
 
 Python has a special errorhandler, surrogateescape to deal with
 bytes that are not valid UTF-8. If you try to print such a string you
 get an error:
 
 $ python3 -c'import sys; print(repr(sys.argv[1]))'
 $'\x01'$'\x05'$'\xFF' '\x01\x05\udcff'
 $ python3 -c'import sys; print(sys.argv[1])' $'\x01'$'\x05'$'\xFF'
 Traceback (most recent call last):
   File string, line 1, in module
 UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in
 position 2: surrogates not allowed
 
 It is still possible to get the original bytes:
 
 $ python3 -c'import sys; print(sys.argv[1].encode(utf-8,
 surrogateescape))' $'\x01'$'\x05'$'\xFF' b'\x01\x05\xff'
 
 

But is it safe even if the locale is not UTF-8? I would like to be able
to pass a file name to a script. I can use bytes for file names in the
open function. If I keep the filename as bytes everywhere it will work
reliably whatever the locale or strange character the file name may
contain. 

Olive

-- 
http://mail.python.org/mailman/listinfo/python-list


sys.argv as a list of bytes

2012-01-17 Thread Olive
In Unix the operating system pass argument as a list of C strings. But
C strings does corresponds to the bytes notions of Python3. Is it
possible to have sys.argv as a list of bytes ? What happens if I pass
to a program an argumpent containing funny character, for example
(with a bash shell)?

python -i ./test.py $'\x01'$'\x05'$'\xFF'


-- 
http://mail.python.org/mailman/listinfo/python-list


list displays

2011-01-08 Thread Olive
I am a newbie to python. Python supports what I thinks it is called
list display, for example:

[i for i in range(10)]
[i for i in range(10) if i6]

Does anyone know a good documentation for this. I have read the
language reference but it is confusing.

Olive  

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python certification

2008-10-20 Thread olive

 Certification prooves you're an idiot who needs to spend money to work
 for another idiot who doesn't know enough about programming to know if
 they hire competent programmers and need an idiot paper to make them
 feel better and sleep better at night.

So true !
+1 QOTW
--
http://mail.python.org/mailman/listinfo/python-list


Re: RELEASED Python 2.6 final

2008-10-02 Thread olive
 Surely you're joking!
 Everybody knows that python developers never sleep :-)

Wrong! All my collegues are Java developers and I'm the only one who
sleep (and like a log).

Congratulations, by the way.

Olivier.
--
http://mail.python.org/mailman/listinfo/python-list


Re: how to set python hosting !

2008-05-16 Thread olive
On May 16, 9:16 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hi,

 i do have some basic python know-how. i want to tryout by actually
 implementing some python generated dynamic page etc.

 i am having websetup which runs with mysql on linux, and pythong is
 installed on it.

 so is there any ref. from where i can know how to configure my
 webserver for python.

 -Raxit
Hi,
see http://www.wsgi.org/wsgi
hth
--
http://mail.python.org/mailman/listinfo/python-list


Re: Prototype OO

2008-04-03 Thread olive
On 3 avr, 10:32, sam [EMAIL PROTECTED] wrote:
 Bruno Desthuilliers napisa³(a):

  Ok, I'm going to be a bit harsh, but this time I'll assume it.
  Sam, you started this thread by asking about prototype vs class based
  minor syntactic points that, whether you like them or not (and

 I think I will get back to this discussion after learning descriptor 
 protocol
 and maybe I will not talk about syntax then, and maybe it won't get off topic.

may I recommend this http://www.cafepy.com/article/ (the first 2)?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Of qooxdoo, qwt, and Python

2008-03-31 Thread olive
On 31 mar, 18:05, John Henry [EMAIL PROTECTED] wrote:
 I was searching for a way to redevelop a desktop Pythoncard based
 program into a web-application.  I understand what need to be done for
 all of the non-GUI code.  For the GUI capabilities, I stumbled across
 a package call qooxdoo (http://qooxdoo.org/).  It appears to provide
 the GUI capabilities I need.  Then I saw that there is qwt - which
 allows you to write qooxdoo code in pure Java.  Since I don't know
 Java (or don't want to know), is there a similar path I can take using
 Python?

 Regards,

you could try this http://code.google.com/p/pyjamas/
or http://doc.appcelerator.org/overview/what_is_appcelerator/index.html
or maybe jython with any java based toolkit (qwt, zk ...).

Regards.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse and PyDev Package explorer

2008-03-28 Thread olive
Hi,

normally you just have to select your top level project folder in the
Package
Explorer and then from the menu bar choose Project - Close Project
(also accessible by the popup menu assigned to the right button of
your mouse).

HTH,

Olivier.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Co-developers wanted: document markup language

2007-08-24 Thread olive

 Well, because they are awful.  ;-)  I don't see that there is a
 bunch of already existing projects, in fact, I don't see anyone
 challenging LaTeX at all.  However, competition is a good thing, and
 I think there are enough aspects about LaTeX that can be done better
 so that this project is worth being done.

What about ODF ? (http://www.odfalliance.org/)
Isn't it a good competitor ?

Olive

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Server-side scripting in python

2007-08-24 Thread olive

 Yes : have a look at Pylons too. It's actually quite less 'polished'
 than Django, but it's IMHO going in the right direction (as a matter of
 fact, Turbogears 2.0 - another well-known Python MVC framework -  will
 be based on Pylons...). Django is clearly more oriented toward
 content-management, which might not be what you want for this project.

this opinion about Django is a little bit dated (see http://www.djangosites.org/
and http://code.djangoproject.com/wiki/DjangoPoweredSites).

Django is really multi-purpose and is rarely use as a CMS, excepted
through Ellington CMS which is itself a commercial fork oriented
toward newspaper like publishing.

I would use Plone instead as a general CMS.

Olive.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Co-developers wanted: document markup language

2007-08-24 Thread olive
On 24 août, 12:43, Torsten Bronger [EMAIL PROTECTED]
wrote:
 Hallöchen!

 olive writes:
  What about ODF ? (http://www.odfalliance.org/) Isn't it a good
  competitor ?

 I'd be a nice further backend but I doubt that people want to enter
 XML.


Why not if the schema is designed toward data entry.

You could then use XSLT to convert to ODF for publishing.

What you need is good structured text editor which hides as much as
possible the underlying XML (or other) format.

Olive.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Co-developers wanted: document markup language

2007-08-24 Thread olive
On 24 août, 13:34, Wildemar Wildenburger [EMAIL PROTECTED]
wrote:
 olive wrote:
  What you need is good structured text editor which hides as much as
  possible the underlying XML (or other) format.

 What you do there is pose extra requirements on the user (Use a text
 editor with some far-out functions). That will prevent your (well,
 Torsten's ;)) standard from spreading easily. Plain text (read: less
 intrusive) markup is a way better approach there, IMHO, because it can
 be done in any old editor.

We are talking about two different things: data entry and document
publishing.

for me ODF is good for document publishing only.

I agree that Plain Text Markup is usually better than XML even with a
good XML editor and a simple schema.

But few people are used to Plain Text Markup (excepted in some
scientific area maybe) and it is error prone.

This is why some user-friendly PTM or XML based editors are needed.

Good user-friendly editor will help in spreading standard.
OpenOffice is a good example for ODF but this has never happened to
XML or any other markup language.

Olive

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Server-side scripting in python

2007-08-22 Thread olive
On 22 août, 06:03, Nagarajan [EMAIL PROTECTED] wrote:
 I wanted to explore web programming facet of python. The problem at my
 hand is to develop an email web client.

I would do that with the help of Django (www.djangoproject.com
groups.google.com/group/django-users) for the server side and JQuery
(www.jquery.com groups.google.com/group/jquery-en) for the client
side.

Olive.


-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python, Dutch, English, Chinese, Japanese, etc.

2007-06-04 Thread olive

Lol!

What is a sharp hair boss ?

My boss does not look like a punk !

But he does want me to dance la Java.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to build a forum in Python?

2007-04-04 Thread olive
http://code.google.com/p/diamanda/

-- 
http://mail.python.org/mailman/listinfo/python-list


XML DTD analysis, diffing ...

2007-04-03 Thread olive
Hi,

I have a bunch of similar DTDs written by different coders.

I would like to normalize, sort elements and attributes by name and
compare those files.

Do you know any XML DTD parser/normalizer written in Python ?

If not, how would you perform that task in Python language ?

Please,

Olive.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: XML DTD analysis, diffing ...

2007-04-03 Thread olive
Mike,

I know all of these tools and I already suspected xmlproc as a good
candidate.

The problem is I can't download it for the moment since Lars website
is blocked here at my work and PyXML is dead.

Maybe there is an alternative download link ?

Thank you for the Cookbook recipe anyway.

Olivier.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: XML DTD analysis, diffing ...

2007-04-03 Thread olive
Thanks Paul and Mike,

I've found the good link and just downloaded pyXML.

Olive.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: XML DTD analysis, diffing ...

2007-04-03 Thread olive
Thank you Stephane,

it is almost what I want.

I'm going to improve it a little and then provide the code back.
Where is the best place ?

Olive.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Mocking OpenOffice in python?

2007-03-15 Thread olive
On Mar 14, 9:39 am, PaoloB [EMAIL PROTECTED] wrote:
 Hi everyone,

Since OO is shipped with Py 2.3 only, I use Jython to drive OO through
its Java API.

Our app is a mix of:
- ODT XML scrapping/templating based on Dom4j which, surprisingly,
when use with Jython, is the most pythonic XML API I have tried so far
(I find better than minidom, ElementTree or even lxml which is my
choice under CPython).
- OObean integrated in Java Gui and driven by Jython.

I don't like Java much though, but this is what our management wants
us to use.
By chance, Jython is tolerated so far.

Olive.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Dejavu 1.5.0RC1

2007-01-25 Thread olive
Looks interesting...

Do you consider a StorageManagers for Oracle ?

Olive.

On Jan 24, 11:57 pm, Robert Brewer [EMAIL PROTECTED] wrote:
 The Dejavu Object-Relational Mapper (version 1.5.0RC1) is now available
 and in the public domain. Get it athttp://projects.amor.org/dejavu,
 or from PyPI:http://www.python.org/pypi/Dejavu/1.5.0RC1.

 Dejavu is an Object-Relational Mapper for Python applications. It is
 designed to provide the Model third of an MVC application. Dejavu
 avoids making decisions in the framework which are better left to
 developers, and avoids forcing developers to make decisions which are
 better left to deployers. In particular, deployers are allowed to mix
 and match storage mechanisms, including how and when to cache objects in
 memory, making it easier for deployers to tune applications to their
 particular environment.

 Dejavu provides:

 Modeling Layer
 1. A base Unit class for persisting objects to storage.
 2. A base UnitProperty class for persistent object attributes.
 3. ID Sequencers.
 4. Associations between Unit classes.
 5. Unit Engines, Rules, and Collections.
 6. Aggregation and analysis tools.

 Application Layer
 1. Expressions: pure Python lambda querying. This is perhaps the most
appealing feature of Dejavu.
 2. Sandboxes, which serve as Identity Maps, transaction boundaries,
and per-connection caches.
 3. An Arena class for application-level data.

 Storage Layer
 1. A base StorageManager class and specification. Unlike many ORMs,
Dejavu does not require you to have complete control of the back end.
 2. Specific StorageManagers for:
a. Microsoft SQL Server/MSDE
b. Microsoft Access (Jet)
c. PostgreSQL
d. MySQL
e. SQLite
f. Shelve
g. Firebird
h. RAM
i. Filesystem

 What's New in 1.5:http://projects.amor.org/dejavu/wiki/WhatsNewIn15

  * Native ID sequencing.
  * Distributed transactions and tested isolation levels.
  * Complete database introspection and auto discovery.

  * New Firebird support.
  * New RAM Storage Manager.
  * New psycopg2 support.
  * New support for using the sqlite3 module built into Python 2.5.
  * Support for typed and typeless SQLite.
  * Support for SQLite :memory: databases.

  * Complete numeric precision and scale support.
  * Native date function support.
  * Complete M x N type-adaptation.
  * Bulletproof encoding support.
  * New 'range' function which returns the closed interval [min(attr),
 ..., max(attr)].
  * New 'sum' function which returns the sum of all non-None values for
 the given cls.attr.
  * Multiple and custom Associations.
  * Improved performance (especially ADO).
  * New JSON encoder/decoder.
  * Short config names for Storage Managers.
  * ADO: New support for the CURRENCY datatype.
  * ADO: Improved string comparisons using Convert and StrComp.

 Upgrading to 1.5:
 Seehttp://projects.amor.org/dejavu/wiki/UpgradeTo1.5

 Documentation for 1.5:http://projects.amor.org/docs/dejavu/1.5.0RC1/

 Robert Brewer
 System Architect
 Amor Ministries
 [EMAIL PROTECTED]

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Processing Solid Edge objects

2006-11-29 Thread olive
It would help if you could give an exemple of .par and .asm file.

Is it human readable, XML ... ?

Is there any other import/export file format provided ?

Maria R a écrit :

 I consider using Python to process Solid Edge .par .asm etc objects.
 Solid Edge provides a pretty rich documentation and tutorials.
 Still, when trying it out, using PyWin32, I get somewhat frustrated.

 So, I hope for someone out there to be willing to share experiences.

 The objective is to automate generation of customer specific machine
 elements from project spec's.
 In particular, we wish to be able to use .par files as templates and,
 by
 taking a copy and changing attribute values, instantiate components
 to be used in an assembly.
 The end result shall be a complete construction structure from which,
 among many things, customer doc's drawings and Bill Of Materials are to
 be
 extracted.
 //M

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Yield

2006-11-15 Thread olive

dwelch91 a écrit :
 http://docs.python.org/ref/yield.html

This is a perfect example that demonstrate how the actual python is bad
and most of the time useless (at least for me).

We really need mor example !

I would like to thanks Fredrik for his contribution to improve that.

Olivier.

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: PyDev + Eclipse (Was: Re: What's the best IDE?)

2006-10-27 Thread olive

Michael B. Trausch wrote:

 Yep.  Still does it.

I'm running PyDev 1.2.4 without completion problem so far.

Are you up to date ?

Maybe you should install the latest from scratch.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyDev + Eclipse (Was: Re: What's the best IDE?)

2006-10-26 Thread olive

Michael B. Trausch a écrit :

 Kenneth McDonald wrote:
 
  With the most recent edition of PyDev, I find Eclipse works quite well
  for me.
 

 Since you mentioned it, I have a question that searching around and
 poking around has not solved for me, yet.

 Do you have auto-completion working with your setup?  It does not seem
 to work at all for me.

Did you try to set your PYTHONPATH properly with the same content in
both central AND project preferences ?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: app with standalone gui and web interface

2006-10-03 Thread olive

I agree with Steve and I would advise to use an Ajax toolkit (such as
JQuery for example) which will help to make your UI act as a desktop
application (and even better if you are creative).
Olive.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python/UNO/OpenOffice?

2006-10-02 Thread olive
For me the problem is that OO2.0 is compiled against P2.3.

Is there any OO compiled with P2.4x for Windows somewhere ?

Sybren Stuvel wrote:
 Aside from what has already been said, it might be nice for you to
 read my article about OOo and Python at
 http://www.stuvel.eu/ooo-python ;-)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python/UNO/OpenOffice?

2006-10-02 Thread olive
John,

Here is something that works for me under XPsp2 to either save a doc or
save it as PDF:

filepath = argv[0]
exportpdf  = argv[1]

ctxLocal = uno.getComponentContext()
smgrLocal = ctxLocal.ServiceManager
resolver =
smgrLocal.createInstanceWithContext(com.sun.star.bridge.UnoUrlResolver,ctxLocal)
url =
uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext
ctx = resolver.resolve(url)
smgr = ctx.ServiceManager
desktop =
smgr.createInstanceWithContext(com.sun.star.frame.Desktop,ctx)

properties = []
if exportpdf == yes:
p = PropertyValue()
p.Name = Hidden
p.Value = True
properties.append(p)
properties = tuple(properties)
doc = desktop.loadComponentFromURL(file:///c:+filepath+.odt ,
_blank, 0, properties)

if exportpdf == yes:
properties = []

p = PropertyValue()
p.Name = Overwrite
p.Value = True
properties.append(p)

p = PropertyValue()
p.Name = FilterName
p.Value = 'writer_pdf_Export'
properties.append(p)

properties = tuple(properties)
doc.storeToURL(file:///c:+filepath+.pdf, properties)

else:
doc.store()

doc.dispose()

You must start OO this way first:
cd C:\Program Files\OpenOffice.org 2.0\program
soffice -accept=socket,host=localhost,port=2002;urp;

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python/UNO/OpenOffice?

2006-10-02 Thread olive

... and you have to start your py file with:

import uno, sys, socket
from com.sun.star.beans import PropertyValue

... and your start_oo_server.bat file with:

@SET PYTHONPATH=C:\Program Files\OpenOffice.org 2.0\program;C:\Program
Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib
@SET PATH=C:\Program Files\OpenOffice.org 2.0\program;C:\Program
Files\OpenOffice.org 2.0\program\python-core-2.3.4\bin

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: lxml Windows binaries

2006-09-14 Thread olive

http://puggy.symonds.net/~ashish/downloads/ 

HTH

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OpenOffice.org and Python

2006-09-06 Thread olive

Sybren,

you did not understand Michel question because Ubuntu seems to be the
only distribution coming with OpenOffice and Python 2.4 compiled
together.

Others platform such as Windoze are limitated to Python 2.3 when
working with OpenOffice and compiling is a pain especially under
Windoze.

Olivier.

-- 
http://mail.python.org/mailman/listinfo/python-list