when "normal" parallel computations in CPython will be implemented at last?

2012-07-01 Thread dmitrey
hi all, are there any information about upcoming availability of parallel computations in CPython without modules like multiprocessing? I mean something like parallel "for" loops, or, at least, something without forking with copying huge amounts of RAM each time and possibility to involve unpiclab

why () is () and [] is [] work in other way?

2012-04-20 Thread dmitrey
I have spent some time searching for a bug in my code, it was due to different work of "is" with () and []: >>> () is () True >>> [] is [] False (Python 2.7.2+ (default, Oct 4 2011, 20:03:08) [GCC 4.6.1] ) Is this what it should be or maybe yielding unified result is better? D. -- http://mail.p

can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread dmitrey
hi all, can I somehow overload operators like "=>", "->" or something like that? (I'm searching for appropriate overload for logical implication "if a then b") Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

new release 0.38 of OpenOpt, FuncDesigner, SpaceFuncs, DerApproximator

2012-03-16 Thread dmitrey
Hi all, I'm glad to inform you about new release 0.38 (2012-March-15): OpenOpt: interalg can handle discrete variables interalg can handle multiobjective problems (MOP) interalg can handle problems with parameters fixedVars/freeVars Many interalg improvements and some bugfixes

PEP: add __sum__ method

2012-01-22 Thread dmitrey
hi all, could you consider adding __sum__ method, e.g. Python sum(a) checks does a have attribute __sum__ and if it has, then a.__sum__() is invoked instead of Python sum(a). (for my soft FuncDesigner it would be very essential, I guess for many other soft as well, e.g. for PuLP, who has to use lpS

Re: how to get id(function) for each function in stack?

2012-01-06 Thread dmitrey
On Jan 6, 8:28 pm, Ian Kelly wrote: > On Fri, Jan 6, 2012 at 11:02 AM, dmitrey wrote: > > hi all, > > how to get id(func) for each func in stack? (I mean memory address, to > > compare it with id(some known funcs)) > > Thank you in advance, D. > > The answer hasn

how to get id(function) for each function in stack?

2012-01-06 Thread dmitrey
hi all, how to get id(func) for each func in stack? (I mean memory address, to compare it with id(some known funcs)) Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get function string name from i-th stack position?

2011-12-31 Thread dmitrey
On Dec 30, 11:48 pm, Ian Kelly wrote: > On Fri, Dec 30, 2011 at 11:43 AM, dmitrey wrote: > > Thank you. And what should I do to get function by itself instead of > > its string name, e.g. I want to know does this function is my_func or > > any other? For example, I would

Re: How to get function string name from i-th stack position?

2011-12-30 Thread dmitrey
On Dec 30, 8:35 pm, Tim Chase wrote: > On 12/30/11 11:51, dmitrey wrote: > > > how to get string name of a function that is n levels above > > the current Python interpreter position? > > Use the results of traceback.extract_stack() > >    from traceback impor

Ann: OpenOpt and FuncDesigner 0.37

2011-12-15 Thread dmitrey
Hi all, I'm glad to inform you about new release 0.37 (2011-Dec-15) of our free software: OpenOpt (numerical optimization): IPOPT initialization time gap (time till first iteration) for FuncDesigner models has been decreased Some improvements and bugfixes for interalg, especially for "sea

multiprocessing module question

2011-12-12 Thread dmitrey
hi all, suppose I have a func F, list [args1,args2,args3,...,argsN] and want to obtain r_i = F(args_i) in parallel mode. My difficulty is: if F returns not None, than I should break calculations, and I can't dig in multiprocessing module documentation how to do it. Order doesn't matter for me (I ha

[ANN] New free multifactor analysis tool for experiment planning

2011-10-24 Thread dmitrey
. Maybe other (alternative) engines will be available in future. See its webpage for details: http://openopt.org/MultiFactorAnalysis Regards, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

[ANN} OpenOpt, FuncDesigner, DerApproximator, SpaceFuncs release 0.36 Options

2011-09-15 Thread dmitrey
Hi all, new release of our free scientific soft (OpenOpt, FuncDesigner, DerApproximator, SpaceFuncs) v. 0.36 is out: OpenOpt: Now solver interalg can handle all types of constraints and integration problems Some minor improvements and code cleanup FuncDesigner: Interval analysis now

blist question

2011-07-07 Thread dmitrey
hi all, I feel lack of native Python lists operations (e.g. taking N greatest elements with the involved key function and O(n) speed) and occasionally found blist http://pypi.python.org/pypi/blist/ Its entry says it is better than Python list. Did anyone ensure? Will it ever be merged into Python s

[ANN] OpenOpt Suite release 0.34

2011-06-16 Thread dmitrey
Hi all, I'm glad to inform you about new quarterly release 0.34 of the free (even for commercial purposes, license: BSD) cross-platform OOSuite package software (OpenOpt, FuncDesigner, SpaceFuncs, DerApproximator), Main changes: * Python 3 compatibility * Lots of improvements and speedup for inter

[ANN] OpenOpt Suite release 0.34

2011-06-16 Thread dmitrey
Hi all, I'm glad to inform you about new quarterly release 0.34 of the OOSuite package software (OpenOpt, FuncDesigner, SpaceFuncs, DerApproximator) . Main changes: * Python 3 compatibility * Lots of improvements and speedup for interval calculations * Now interalg can obtain all solutions of nonl

Re: seems like a bug in isinstance()

2011-05-07 Thread dmitrey
On May 7, 11:53 am, Gregory Ewing wrote: > Chris Rebert wrote: > > This is because you did `from Point import > > ...` in file2.py, whereas in file1.py you did `from > > openopt.kernel.Point import ...`. These 2 different ways of referring > > to the same module are sufficient to "trick"/"outsmart

Python3: imports don't see files from same directory?

2011-05-07 Thread dmitrey
hi all, I try to port my code to Python 3 and somehow files don't see files from same directory, so I have to add those directories explicitly, e.g. import sys sys.path += [...] Also, it leads to bugs like this one: http://groups.google.com/group/comp.lang.python/browse_thread/thread/961a90219a61e

Re: Python 3 dict question

2011-05-06 Thread dmitrey
On May 6, 10:51 pm, Chris Rebert wrote: > On Fri, May 6, 2011 at 12:40 PM, dmitrey wrote: > > hi all, > > suppose I have Python dict myDict and I know it's not empty. > > I have to get any (key, value) pair from the dict (no matter which > > one) and perform s

Python 3 dict question

2011-05-06 Thread dmitrey
hi all, suppose I have Python dict myDict and I know it's not empty. I have to get any (key, value) pair from the dict (no matter which one) and perform some operation. In Python 2 I used mere key, val = myDict.items()[0] but in Python 3 myDict.items() return iterator. Of course, I could use for ke

Re: seems like a bug in isinstance()

2011-05-06 Thread dmitrey
On May 6, 12:57 pm, Chris Rebert wrote: > On Fri, May 6, 2011 at 2:24 AM, dmitrey wrote: > > hi all, > > > suppose I've created a class Point in file .../openopt/kernel/Point.py > > > Consider the code in file .../somewhere/file1.py > > from openopt.k

seems like a bug in isinstance()

2011-05-06 Thread dmitrey
hi all, suppose I've created a class Point in file .../openopt/kernel/Point.py Consider the code in file .../somewhere/file1.py from openopt.kernel.Point import Point p = Point() now let's pass p into a func from .../openopt/kernel/file2.py and check from Point import Point isinstance(p, Point)

[ANN] OpenOpt Suite release 0.33

2011-03-16 Thread dmitrey
systems of geometric equations and numerical optimization with automatic differentiation): * Some bugfixes DerApproximator: * Adjusted with some changes in FuncDesigner For more details visit our site http://openopt.org. Regards, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] New package: SpaceFuncs (2D, 3D, ND geometric modeling, optimization, solving)

2011-02-16 Thread dmitrey
lcome Regards, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: possibility of inline using of a symbol instead of "import"

2011-01-06 Thread dmitrey
On Jan 6, 8:43 pm, Erwin Mueller wrote: > > Why you have several pages of code in the first place? Don't you know that you > can split your code in files? Just a suggestion. > > -- > Erwin Mueller, [email protected]://www.global-scaling-institute.de/ Erwin, take a look at Python language dev

Re: PEP: possibility of inline using of a symbol instead of "import"

2011-01-06 Thread dmitrey
Yes, I know, still usually it is placed in file header On Jan 6, 5:57 pm, Tim Harig wrote: > Python doesn't require imports to be at the top of a file.  They can be > imported at any time. > > > import MyModule > > (...lots of code...) > > r = MyModule.myFunc(...) > > (...lots of code...) > impor

PEP: possibility of inline using of a symbol instead of "import"

2011-01-06 Thread dmitrey
hi all, I have th PEP (I'm not sure something like that hadn't been proposed although): very often in a Python file header the following lines are present, like: from MyModule1 import myFunc1 import MyModule2 as mm2 from MyModule3 import myFunc3 as mf3 etc and after several pages of code they are

New OpenOpt/FuncDesigner release 0.32

2010-12-15 Thread dmitrey
Hi all, I'm glad to inform you about new quarterly OpenOpt/FuncDesigner release (0.32): OpenOpt: * New class: LCP (and related solver) * New QP solver: qlcp * New NLP solver: sqlcp * New large-scale NSP (nonsmooth) solver gsubg. Currently it still requires lots of improvements (especially for cons

Re: namespace issue, Python vs numpy min/max problem

2010-11-13 Thread dmitrey
Well, I think I have found an appropriate solution. Regards, D. -- http://mail.python.org/mailman/listinfo/python-list

namespace issue, Python vs numpy min/max problem

2010-11-13 Thread dmitrey
hi all, I have the following problem: I have overloaded "max" function in my module (FuncDesigner); it works like following: if some data in arguments is of type "oofun" then my function works, elseware numpy.max() is used. Now the problem: suppose someone writes from FuncDesigner import * ... a =

ANN: OpenOpt 0.31, FuncDesigner 0.21, DerApproximator 0.21

2010-09-15 Thread dmitrey
mator 0.21 (finite-differences derivatives approximation). For release details see http://forum.openopt.org/viewtopic.php?id=299 or visit our homepage http://openopt.org Regards, Dmitrey -- http://mail.python.org/mailman/listinfo/python-list

Re: Create child class of Python dict with modified values

2010-08-09 Thread dmitrey
On Aug 9, 1:38 pm, Peter Otten <[email protected]> wrote: > dmitrey wrote: > > hi all, > > suppose I have defined a child class of Python dict, currently it > > constructor looks like that: > >     def __init__(self, *args, **kwargs): > >    

Create child class of Python dict with modified values

2010-08-09 Thread dmitrey
, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

Re: hasattr + __getattr__: I think this is Python bug

2010-07-20 Thread dmitrey
On 20 июл, 18:39, Neil Cerutti wrote: > On 2010-07-20, dmitrey wrote: > > > This doesn't stack with the following issue: sometimes user can > > write in code "myObject.size = (some integer value)" and then > > it will be involved in future calculatio

Re: hasattr + __getattr__: I think this is Python bug

2010-07-20 Thread dmitrey
> e.g. one that just looks in the object's dictionary so as to avoid returning > true for properties or other such fancy attributes. So can anyone explain me how to look into object's dict? As I have wrote, "something in dir(...)" requires O(numOfFields) while I would like to use o(log(n)) >How

Re: hasattr + __getattr__: I think this is Python bug

2010-07-20 Thread dmitrey
On 20 июл, 15:00, Jean-Michel Pichavant wrote: > dmitrey wrote: > > hi all, > > I have a class (FuncDesigner oofun) that has no attribute "size", but > > it is overloaded in __getattr__, so if someone invokes > > "myObject.size", it is generated (as

Re: hasattr + __getattr__: I think this is Python bug

2010-07-20 Thread dmitrey
On Jul 20, 1:37 pm, Chris Rebert wrote: > On Tue, Jul 20, 2010 at 3:10 AM, dmitrey wrote: > > hi all, > > I have a class (FuncDesigner oofun) that has no attribute "size", but > > it is overloaded in __getattr__, so if someone invokes > > "myObject.siz

hasattr + __getattr__: I think this is Python bug

2010-07-20 Thread dmitrey
hi all, I have a class (FuncDesigner oofun) that has no attribute "size", but it is overloaded in __getattr__, so if someone invokes "myObject.size", it is generated (as another oofun) and connected to myObject as attribute. So, when I invoke in other code part "hasattr(myObject, 'size')", instead

[ANN] OpenOpt 0.29, FuncDesigner 0.19, DerApproximator 0.19

2010-06-16 Thread dmitrey
http://forum.openopt.org/viewtopic.php?id=252 Regards, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

Bug in Python set

2010-05-02 Thread dmitrey
Python 2.6.5 r265:79063 >>>set().update(set()) is None True while I expect result of update to be set. Also, result of set().add(None) is None while I expect it to be set with element None (or, maybe, it should be empty set?) Regards, D. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] OpenOpt 0.28, FuncDesigner 0.18, DerApproximator 0.18

2010-03-15 Thread dmitrey
Hi all, I'm glad to inform you about new release of our free (BSD-licensed) soft OpenOpt 0.28 (numerical optimization), FuncDesigner 0.18 (CAS with automatic differentiation), DerApproximator 0.18 (finite- differeces derivatives approximation). More details here: http://forum.openopt.org/viewtopic

Re: remote evaluation of Python code typed in html webpage frame

2010-01-15 Thread dmitrey
16:41, "Diez B. Roggisch" wrote: > Am 15.01.10 15:16, schrieb dmitrey: > > > hi all, > > what's the simplest way to create a webpage with a frame for Python > > code to be typed in (as a plain text, or, better, as a highlighted > > text or something l

remote evaluation of Python code typed in html webpage frame

2010-01-15 Thread dmitrey
hi all, what's the simplest way to create a webpage with a frame for Python code to be typed in (as a plain text, or, better, as a highlighted text or something like scite or any other easy python IDE, capable of automatic indentations), and then pressing a button to evaluate it using a remote serv

[ANN] OpenOpt 0.27 (optimization), FuncDesigner 0.17 (auto differentiation)

2009-12-16 Thread dmitrey
Hi all, I'm glad to inform you about release of OpenOpt 0.27 (numerical optimization framework), FuncDesigner 0.17 (CAS with automatic differentiation, convenient modelling of linear/nonlinear functions, can use convenient modelling for some OpenOpt optimization problems and systems of linear/nonli

__mul__ vs __rmul__ (and others) priority for different classes

2009-12-11 Thread dmitrey
hi all, I have created a class MyClass and defined methods like __add__, __mul__, __pow__, __radd__, __rmul__ etc. Also, they are defined to work with numbers, Python lists and numpy.arrays. Both Python lists and numpy arrays have their own methods __add__, __mul__, __pow__, __radd__, __rmul__ etc

Solving System of Linear Equation (SLE) - FuncDesigner example

2009-10-25 Thread dmitrey
Hi all, I would like to introduce a couple examples of easy & convenient modelling and solving System of Linear Equation (SLE) by FuncDesigner (a python-written tool, BSD license). It doesn't require to construct matrices A and b (Ax = b) by user, they are created automatically. See here for detail

ANN: FuncDesigner 0.15 - free Python-written framework with automatic differentiation

2009-09-15 Thread dmitrey
FuncDesigner is cross-platform (Windows, Linux, Mac OS etc) Python- written framework with automatic differentiation (http:// en.wikipedia.org/wiki/Automatic_differentiation). License BSD allows to use it in both open- and closed-code soft. It has been extracted from OpenOpt framework as a stand-al

ANN: OpenOpt 0.25 - free Python-written numerical optimization framework with automatic differentiation

2009-09-15 Thread dmitrey
OpenOpt is cross-platform (Windows, Linux, Mac OS etc) Python-written framework. If you have a model written in FuncDesigner (http:// openopt.org/FuncDesigner), you can get 1st derivatives via automatic differentiation (http://en.wikipedia.org/wiki/ Automatic_differentiation) (some examples here: h

simplest way to visit 3 subdirectories with a command?

2009-08-18 Thread dmitrey
hi all, could you inform how to compose a py-file (for soft installation), that will visit 3 subdirectories (eg subdir1, subdir2, subdir3) and invoke a command "python setup.py install" in each subdirectory? I know there should be a simple solution available in Python documentation, but I have an a

Re: "for" cycle with assigning index

2009-08-15 Thread dmitrey
Thanks all, especially Dennis for your detailed answer. left_arr_indexes is list of nonnegative integers, eg [0,0,0,1,1,4] IndDict is a dict like {0: [1,2], 3: [0,1], 10:[0,2,3]}, so that's why I don't use python list instead. The code is taken from OpenOpt framework that I develop. Currently I hav

"for" cycle with assigning index

2009-08-15 Thread dmitrey
Hi all, could you inform me how to do it properly? I have the cycle for i in xrange(len(Funcs2)): # Funcs2 is Python dict Funcs.append(lambda *args, **kwargs: (Funcs2[i](*args, **kwargs) [IndDict[left_arr_indexes[i]]])) So, all the Funcs are initialized with i = last index = len(Funcs2) Wh

Re: for key, value in dict.() - how to get? (which func)

2009-08-11 Thread dmitrey
Yes, thank you, items() is the correct approach, on the other hand I have already get rid of the cycle. Regards, D. On Aug 11, 10:26 pm, "Rami Chowdhury" wrote: > Hi Dmitrey, > > I think what you're looking for is myDict.items(), or myDict.iteritems(). > > Cheers,

for key, value in dict.() - how to get? (which func)

2009-08-11 Thread dmitrey
hi all, which method should I use to get iterator over (key, value) pairs for Python dict, Python v 2.6 and above? Of course I could use for key in myDict.keys(): value = myDict.values() # do something with the pair key, value but searching each time for the value take some cputime that

Re: is it possible to overload operator "^"?

2009-08-08 Thread dmitrey
> the operator precedence will seem wrong So, are there any ways to change operator precedence (for my class)? To Diez: yes, but I haven't paid attention to xor. BTW the url is currently unavailable (Network Timeout. The server at docs.python.org is taking too long to respond.). On Aug 8, 12:06 p

is it possible to overload operator "^"?

2009-08-08 Thread dmitrey
hi all, is it possible to overload operator "^"? (AFAIK __pow__ overloads ** instead of ^) Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

how to overload operator "< <" (a < x < b)?

2009-08-07 Thread dmitrey
hi all, is it possible to overload operator "< <"? (And other like this one, eg "<= <=", "> >", ">= >=") Any URL/example? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

ANN: openopt 0.24 - free numerical optimization framework

2009-06-15 Thread dmitrey
Hi all, OpenOpt 0.24, a free Python-written numerical optimization framework with some own solvers and connections to tens of 3rd party ones, has been released. BSD license allows to use it in both free opensource and commercial closed-code software. Currently we have ~80 unique visitors daily, 1

easiest way to check python version?

2009-06-10 Thread dmitrey
hi all, what is easiest way to check python version (to obtain values like 2.4, 2.5, 2.6, 3.0 etc) from Python env? I don't mean "python -V" from command prompt. Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

ANN: OpenOpt 0.23 - free numerical optimization framework

2009-03-15 Thread dmitrey
Hi all, OpenOpt 0.23, a free numerical optimization framework (license: BSD) with some own solvers and connections to tens of 3rd party ones, has been released. Our new homepage: http://openopt.org Introduction to the framework: http://openopt.org/Foreword All release details are here: http://op

multiprocessing module - isn't it a bug?

2009-03-14 Thread dmitrey
# THIS WORKS OK from multiprocessing import Pool N = 400 K = 800 processes = 2 def costlyFunction2(z): r = 0 for k in xrange(1, K+2): r += z ** (1 / k**1.5) return r class ABC: def __init__(self): pass def testParallel(self): po = Pool(processes=processes)

[numerical optimization] Poll "what do you miss in OpenOpt framework"

2009-02-26 Thread dmitrey
ramework: http://openopt.org I intend to take you opinions into account till next OpenOpt release 0.23 (2009-03-15) Thank you in advance, Dmitrey -- http://mail.python.org/mailman/listinfo/python-list

OpenOpt 0.21 (free optimization framework)

2008-12-15 Thread dmitrey
Hi all, OpenOpt 0.21, free optimization framework (license: BSD) with some own solvers and connections to tens of 3rd party ones, has been released. All details here: http://openopt.blogspot.com/2008/12/openopt-release-021.html Regards, OpenOpt developers. -- http://mail.python.org/mailman/listi

Tkinter question: howto redirect text output (stdout) to Text widget?

2008-10-14 Thread dmitrey
hi all, could anyone post an example how to redirect text output (stdout) to Text widget? Thank you in advance, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a class instance name during creation?

2008-10-04 Thread dmitrey
On Oct 3, 9:46 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > dmitrey a écrit : > > > hi all, > > I have a code > > z = MyClass(some_args) > > can I somehow get info in MyClass __init__ function that user uses "z" > > as name of the variabl

how to get a class instance name during creation?

2008-10-03 Thread dmitrey
hi all, I have a code z = MyClass(some_args) can I somehow get info in MyClass __init__ function that user uses "z" as name of the variable? I.e. to have __init__ function that creates field z.name with value "z". Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to keep a window above all other OS windows?

2008-09-23 Thread dmitrey
On Sep 23, 11:21 pm, dmitrey <[EMAIL PROTECTED]> wrote: > Hi all, > how to keep a Tkinter window above all other OS windows (i.e. > including those ones from other programs)? > > Thank you in advance, > Dmitrey I have put [Tkinter] into topic of my message but someho

[Tkinter] how to keep a window above all other OS windows?

2008-09-23 Thread dmitrey
Hi all, how to keep a Tkinter window above all other OS windows (i.e. including those ones from other programs)? Thank you in advance, Dmitrey -- http://mail.python.org/mailman/listinfo/python-list

Re: How to kill threading.Thread instance?

2008-09-21 Thread dmitrey
I wonder why something like myThread.exit() or myThread.quit() or threading.kill(myThread) can't be implemented? Is something like that present in Python 3000? Regards, D. -- http://mail.python.org/mailman/listinfo/python-list

How to kill threading.Thread instance?

2008-09-21 Thread dmitrey
hi all, Is there a better way to kill threading.Thread (running) instance than this one http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496960 (it's all I have found via google). BTW, it should be noticed that lots of threading module methods have no docstrings (in my Python 2.5), for exam

how to do easy_install to source code, not egg?

2008-09-18 Thread dmitrey
Hi all, how to do easy_install to source code, not egg? (I don't mean "develop" option, it shouldn't call compiled egg-file). Thank you in advance, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

PYPI, some troubles

2008-09-17 Thread dmitrey
thon.org/simple/ Reading http://pypi.python.org/simple/OpenOpt/ Reading http://scipy.org/scipy/scikits/wiki/OpenOpt No local packages or download links found for openopt error: Could not find suitable distribution for Requirement.parse('openopt') Does anyone know what shoul I do? Thank yo

Re: Genetic programming: pygene, pygp, AST, or (gasp) Lisp?

2008-07-21 Thread dmitrey
also, you could look at the simple openopt example provided by GA "galileo" solver (connected to OO framework) http://projects.scipy.org/scipy/scikits/browser/trunk/openopt/scikits/openopt/examples/glp_1.py http://scipy.org/scipy/scikits/wiki/GLP Regards, D -- http://mail.python.org/mailman/listinf

howto check is function capable of obtaining **kwargs?

2008-07-21 Thread dmitrey
hi all, howto check is function capable of obtaining **kwargs? i.e. I have some funcs like def myfunc(a,b,c,...):... some like def myfunc(a,b,c,...,*args):... some like def myfunc(a,b,c,...,*args, **kwargs):... some like def myfunc(a,b,c,...,zz=zz0):... So I need to know is the given function

ANN: OpenOpt 0.18 (numerical optimization framework)

2008-06-15 Thread dmitrey
Greetings, We're pleased to announce: OpenOpt 0.18 (release), free (license: BSD) optimization framework (written in Python language) with connections to lots of solvers (some are C- or Fortran-written) is available for download. Changes since previous release 0.17 (March 15, 2008): * connec

write Python dict (mb with unicode) to a file

2008-06-14 Thread dmitrey
hi all, what's the best way to write Python dictionary to a file? (and then read) There could be unicode field names and values encountered. Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

howto split string with both comma and semicolon delimiters

2008-06-12 Thread dmitrey
hi all, howto split string with both comma and semicolon delimiters? i.e. (for example) get ['a','b','c'] from string "a,b;c" I have tried s.split(',;') but it don't work Thx, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: howto use pylint from Eric IDE?

2008-05-18 Thread dmitrey
Since I have no project (and willing to create the one), just several py-files, the Project->Check button is disabled. Are there any other methods in v4.1.1 or more recent? Thx, D. On 18 Тра, 16:48, Detlev Offenbach <[EMAIL PROTECTED]> wrote: > dmitrey wrote: > > Hi all, >

Re: Using Python for programming algorithms

2008-05-18 Thread dmitrey
Along with numpy & scipy there is some more Python scientific soft worse to be mentioned: http://scipy.org/Topical_Software http://pypi.python.org/pypi?:action=browse&show=all&c=385 On 18 Тра, 06:25, Henrique Dante de Almeida <[EMAIL PROTECTED]> wrote: > once I > looked for linear programming too

howto use pylint from Eric IDE?

2008-05-18 Thread dmitrey
Hi all, I have Eric 4.1.1, pylint and Eric pylint plugin installed, but I cannot find how to use pylint from Eric IDE GUI. Does anyone know? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: simple question about Python list

2008-05-09 Thread dmitrey
Hmm... I thought this issue is available from Python2.5 only. I have no other interpreters in my recently installed KUBUNTU 8.04. Thanks all, D. On 9 Тра, 13:41, Duncan Booth <[EMAIL PROTECTED]> wrote: > dmitrey <[EMAIL PROTECTED]> wrote: > > On 9 ôÒÁ, 13:17, Paul Han

Re: simple question about Python list

2008-05-09 Thread dmitrey
Ok, I use Python 2.5 but I try my code to remain Python 2.4 and (preferable) 2.3 compatible. Are there other solutions? D. On 9 Тра, 13:17, Paul Hankin <[EMAIL PROTECTED]> wrote: > On May 9, 11:04 am, dmitrey <[EMAIL PROTECTED]> wrote: > > > list1 = ['elem0',

Re: How to kill Python interpreter from the command line?

2008-05-09 Thread dmitrey
in addition to killall and kill funcs mentioned above you could be interested in pkill see "man pkill" from terminal for more details pkill python or pkill pyt or pkill py -- http://mail.python.org/mailman/listinfo/python-list

simple question about Python list

2008-05-09 Thread dmitrey
hi all, suppose I have 2 lists list1 = ['elem0', 'elem1', 'elem2', 'elem3', 'elem4', 'elem5'] and list2 = [0, 2, 4] # integer elements howto (I mean most simple recipe, of course) form list3 that contains elements from list1 with indexes from list2, i.e. list3 = ['elem0', 'elem2', 'elem4']? Than

howto print binary number

2008-05-07 Thread dmitrey
hi all, could you inform how to print binary number? I.e. something like print '%b' % my_number it would be nice would it print exactly 8 binary digits (0-1, with possible start from 0) Thank you in advance, D -- http://mail.python.org/mailman/listinfo/python-list

memory allocation for Python list

2008-03-26 Thread dmitrey
good approximation, for example 400. So, how can I optimize a code for the sake of calculations speedup? Currently I just use myList = [] for i in some_range: ... myList.append(element) ... Thank you in advance, Dmitrey -- http://mail.python.org/mailman/listinfo/python-list

ANN: OpenOpt 0.17 (free numerical optimization framework)

2008-03-16 Thread dmitrey
Greetings, We're pleased to announce: OpenOpt 0.17 (release), free (license: BSD) optimization framework for Python language programmers, is available for download. Brief introduction to numerical optimization problems and related software: http://scipy.org/scipy/scikits/wiki/OOIntroduction Chan

Re: future multi-threading for-loops

2008-02-05 Thread dmitrey
On Feb 5, 6:11 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Multi-threaded control flow is a worthwhile priority. > > It is? That's totally new to me. Given the fact that threads don't scale > I highly doubt your claim, too. I would propose "for X IN A" for parall

Re: future multi-threading for-loops

2008-02-05 Thread dmitrey
On Feb 5, 5:22 am, [EMAIL PROTECTED] wrote: > Some iterables and control loops can be multithreaded. Worries that > it takes a syntax change. > > for X in A: > def f( x ): > normal suite( x ) > start_new_thread( target= f, args= ( X, ) ) > > Perhaps a control-flow wrapper, or metho

IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread dmitrey
Hi all, the url http://torquedev.blogspot.com/2008/02/changes-in-air.html (blog of a game developers) says IronPython is faster than CPython in 1.6 times. Is it really true? If yes, what are IronPython drawbacks vs CPython? And is it possible to use IronPython in Linux? D. -- http://mail.python.o

Re: ANN: eric4 4.1.0 released

2008-02-03 Thread dmitrey
Hi all, I prefer the Eric Python IDE to all other, however, unfortunately, Eric4.x (as well as the latest snapshot mentioned in the ann) fails to debug any py-file (while Eric3.9.5 from Kubuntu software channel works ok): The debugged program raised the exception unhandled TypeError "not all argum

Re: OpenOpt install

2007-12-18 Thread dmitrey
thank you, I'll try to fix the issue when I'll have more time, I'm short of the one for now because of some other urgent work. D. On Dec 18, 10:53 am, Robert Kern <[EMAIL PROTECTED]> wrote: > dmitrey wrote: > > When earlier OpenOpt versions had been installed there

Re: OpenOpt install

2007-12-17 Thread dmitrey
those changes and write my own, for to have OO py-files being compiled when installed, because next time when they will be run user may not have root permissions, so he will recompile source files each time OO starts. On Dec 17, 10:27 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > dmitrey wrote

Re: OpenOpt install

2007-12-17 Thread dmitrey
Use python setup.py install Regards, D On Dec 16, 2:27 pm, Neal Becker <[EMAIL PROTECTED]> wrote: > What do I need to do? I have numpy, scipy (Fedora F8) > > cdopenopt/ > [EMAIL PROTECTED] python setup.py build > running build > running config_cc > unifing config_cc, config, build_clib, build_e

Re: Python strings question (vertical stack)

2007-11-20 Thread dmitrey
Thanks all, I have solved the problem: a=""" %s %s %s """ % ('asdf', 'asdf2', 'asdf3') print a D. -- http://mail.python.org/mailman/listinfo/python-list

Python strings question (vertical stack)

2007-11-20 Thread dmitrey
Hi all, I have some strings, let it be string1, string2, string3. So how could String= """ string1 string2 string3 """ be obtained? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with Python class creating

2007-10-19 Thread dmitrey
Thanks all for these detailed explanations. On Oct 18, 10:48 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > dmitrey a écrit : > Not unless these classes define their own initializers. But that's > another problem > > > and there are lots of > > those one

problem with Python class creating

2007-10-18 Thread dmitrey
self) # i.e pass the class instance to other func named ooIter field2 = val2 field3 = val3 # etc I suspect it has better solution, is it? Thank you in advance, Dmitrey -- http://mail.python.org/mailman/listinfo/python-list

lambda-funcs problem

2007-09-19 Thread dmitrey . kroshko
hi all, I need to create a Python list of lambda-funcs that are dependent on the number of the ones, for example F = [] for i in xrange(N): F.append(lambda x: x + i) however, the example don't work - since i in end is N-1 it yields x+ (N-1) for any func. So what's the best way to make it val

howto reload Python module?

2007-09-02 Thread dmitrey
my Python module was changed in HDD (hardware disk drive), moreover, changed its location (but still present in sys.path). how can I reload a func "myfunc" from the module? (or howto reload whole module)? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

howto compile recursively all *.py files to *.pyc (from a directory my_dir)?

2007-09-01 Thread dmitrey
howto compile recursively all *.py files to *.pyc (from a directory my_dir)? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >