Re: Dreaming of new generation IDE

2010-02-03 Thread Marco Salden
On Feb 3, 12:10 pm, Vladimir Ignatov kmis...@gmail.com wrote:
 Hello,

 I am sitting here for quite some time, but usually keep silent ;-) I
 use Python since 2003 both professionally and for my hobby projects
 and love it a much.
 I notice however, that maintaining existing/older python code is may
 be not so enjoyable task. It may be even harder than supporting old
 code written in some type of static languages (like Java or C++).
 Surely dynamic nature of python comes with price.

 Finally I develop a feeling that strong instrumentation / tools can
 bring us the best of two worlds. That I am dreaming on is an absolute
 new type/class of IDE suitable for Python and potentially for other
 dynamic-type languages. Instead of current text-oriented IDEs, it
 should be a database-centric and resemble current CAD systems instead
 of being just fancy text editor. Source text should be an output
 product of that CAD and not a source material itself.

 Well. I understand that it is a very ambitious and experimental stuff.
 Great efforts and motivation needed even to get something runnable.
 So I am looking for someone to get in kind of virtual partnership.
 If someone interesting it that soft of stuff, I would like to talk and
 discuss this system.

 Vladimir Ignatov

The maintenance thing may be true but for me that doesn't outweigh the
clear benefits I get from using Python i.s.o. e.g. C++: the fact that
I have much less code that is more compact and for me more directly
readable is a clear advantage when doing maintance on code I didnt
touch for a while. Documenting the essential parameters used with some
examples and some logging helps (for me at least...).

The type of IDE you are looking for is more something like Rational
Rose (e.g. RRT?) type of tooling perhaps? There you CAD components
and their statebehavior and the system generates C or C++ code.

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


Re: integer and string compare, is that correct?

2010-01-11 Thread Marco Salden
On Jan 10, 1:26 pm, Hellmut Weber m...@hellmutweber.de wrote:
 Hi,
 being a causal python user (who likes the language quite a lot)
 it took me a while to realize the following:

 l...@sylvester py_count $ python
 Python 2.6.3 (r263:75183, Oct 26 2009, 12:34:23)
 [GCC 4.4.1] on linux2
 Type help, copyright, credits or license for more information.
   max = '5'
   n = 5
   n = max
 False
   n + max
 Traceback (most recent call last):
    File stdin, line 1, in module
 TypeError: unsupported operand type(s) for +: 'int' and 'str'
  

 Section 5.9 Comparison describes this.

 Can someone give me examples of use cases

 TIA

 Hellmut

 --
 Dr. Hellmut Weber         m...@hellmutweber.de
 Degenfeldstraße 2         tel   +49-89-3081172
 D-80803 München-Schwabing mobil +49-172-8450321
 please: No DOCs, no PPTs. why: tinyurl.com/cbgq

I would say you want to compare semantically an integer value with an
integer value so why not:
IDLE 1.1.3
 max = '5'
 n = 5
 n==(int(max))
True

?
(in Python 2.4...)

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


Re: Advanced Python programming book?

2010-01-10 Thread Marco Salden
On Jan 10, 2:35 pm, flow drnco...@live.com wrote:
 I've just finished reading a sort of beginner Python book, and I know
 quite a bit now but I'm looking for a book that can teach me advanced
 aspects of Python - code optimisation, threading, etc.

 Any recommendations?

 Cheers.

I like to add this one, which is nice to read just after reading the
starters, covers all kinds of topics, and written by someone who
knows Python (I think at least).
http://oreilly.com/catalog/9780596009250/

HTH,
Marco
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Do I have to use threads?

2010-01-07 Thread Marco Salden
On Jan 6, 5:36 am, Philip Semanchuk phi...@semanchuk.com wrote:
 On Jan 5, 2010, at 11:26 PM, aditya shukla wrote:

  Hello people,

  I have 5 directories corresponding 5  different urls .I want to  
  download
  images from those urls and place them in the respective  
  directories.I have
  to extract the contents and download them simultaneously.I can  
  extract the
  contents and do then one by one. My questions is for doing it  
  simultaneously
  do I have to use threads?

 No. You could spawn 5 copies of wget (or curl or a Python program that  
 you've written). Whether or not that will perform better or be easier  
 to code, debug and maintain depends on the other aspects of your  
 program(s).

 bye
 Philip

Yep, the more easier and straightforward the approach, the better:
threads are always (programmers')-error-prone by nature.
But my question would be: does it REALLY need to be simultaneously:
the CPU/OS only has more overhead doing this in parallel with
processess. Measuring sequential processing and then trying to
optimize (e.g. for user response or whatever) would be my prefered way
to go. Less=More.

regards,
Marco
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Sys.path entries

2009-12-30 Thread Marco Salden
On Dec 30, 8:13 pm, Alan Harris-Reid a...@baselinedata.co.uk wrote:
 Hi there,

 In my sys.path (interpreter only, no application loaded), I have the
 following strange entries...
 'C:\\WINDOWS\\system32\\python31.zip'.  This file does not exist
 anywhere (although python31.dll does exist in \windows\system32\), where
 could it have come from?
 'C:\\program files\\python31\\lib\\plat-win'.  There is no such
 directory, although I can see that this has been added by the PYTHONPATH
 varible in PyConfig.h (when is this loaded?)

 Is there any way of removing these entries, or are they best left where
 they are?  (I am using Python 3.1 on WinXP)

 Also, regarding PyConfig.h - is this read every time I start Python.exe?

 Many thanks,
 Alan Harris-Reid

Hi Alan,

Same for me: C:\Windows\system32\python25.zip is in the only non-C:
\Python25 directroyfile in my sys.path (under Python 2.5).
No idea why it needs it. And also in my case the zip file isnt in that
location anyway. So also not 3K only or so.
But I have no issues with it (so far :-)), do you? Do you run into
problems because of this in the path?

HTH,
Marco
-- 
http://mail.python.org/mailman/listinfo/python-list