Re: regular expression i'm going crazy

2011-05-16 Thread Robert Kern
s = "linka la baba" [~] |3> re_s = re.compile(r'(?:link|l)a' , re.IGNORECASE) [~] |4> print re_s.findall(s) ['linka', 'la'] -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our ow

best way to extract sentence from txt file

2011-05-17 Thread Robert Pazur
Hi all, my question is maybe quite simple: What is the best (and shortest) way to extract sentence from .txt file? Thanks in advance, Robert Pazur -- http://mail.python.org/mailman/listinfo/python-list

Re: using masks and numpy record arrays

2011-05-25 Thread Robert Kern
inal [] on the left-hand side of the assignment actually turns into a .__setitem__() call to the object that is the result of the expression to its left. a[mask] makes a copy while a2[:] makes a view. You could do a["n"][mask] += b[mask] since a["n"] will also make a view

Has anyone worked on docker with windows

2017-11-28 Thread Robert Clove
Hi, what am i trying to achieve is, container of windows with an application like slack on it. Does window container has an UI? Has anyone worked on it, is it feasible? -- https://mail.python.org/mailman/listinfo/python-list

Re: Has anyone worked on docker with windows

2017-11-28 Thread Robert Clove
i was also of the same opinion , but docker is available on windows too https://www.docker.com/docker-windows On Wed, Nov 29, 2017 at 12:22 PM, Percival John Hackworth wrote: > On 28-Nov-2017, Robert Clove wrote > (in article): > > > Hi, > > > > what am i trying

Tips or strategies to understanding how CPython works under the hood

2018-01-09 Thread Robert O'Shea
CPython source code and digesting it, I was wondering if those of you have read and understood the source code, do you have any tips or good starting points? Robert -- https://mail.python.org/mailman/listinfo/python-list

Re: Tips or strategies to understanding how CPython works under the hood

2018-01-11 Thread Robert O'Shea
Thanks all for the links and suggestions, they are greatly appreciated. I might be programming for a long time (relative to my age) but I haven't touched much on compilers or interpreters. Inspired a but by Python's interpreter I wrote a little bytecode interpreter in C (maybe should have upgrade t

Fwd: Could not load correctly

2022-05-22 Thread Robert Loomis
Forwarded Message Subject:Could not load correctly Date: Sat, 21 May 2022 10:58:39 -0400 From: Robert Loomis Reply-To: b...@loomisengineering.com To: python-list@python.org I am new to python.I tried to download it to a virtual environment since I

Why am I unable to using rsync to install modules and appear to have to use pip install instead?

2021-02-10 Thread Robert Nicholson
I’m using Python 3.7.0 so I have multiple environments all on the same architecture with the same python release using anonconda. What I discovered was that if I install the cryptography module in my dev / uat and then tried to synchronize to production server using rsync I ended up with error

Re: Why am I unable to using rsync to install modules and appear to have to use pip install instead?

2021-02-10 Thread Robert Nicholson
Just reinstalling cryptography with pip install seems to have fixed my issue. Any pointers on why? > On Feb 10, 2021, at 3:21 PM, Robert Nicholson > wrote: > > I’m using Python 3.7.0 > > so I have multiple environments all on the same architecture with the same >

Re: Why am I unable to using rsync to install modules and appear to have to use pip install instead?

2021-02-10 Thread Robert Nicholson
Ok this was due to an install of miniconda then choosing to unconditionally install an older version of cryptography. > On Feb 10, 2021, at 3:40 PM, Robert Nicholson > wrote: > > Just reinstalling cryptography with pip install seems to have fixed my issue. > > Any pointer

ldap or active directory module

2016-09-09 Thread Robert Clove
Is it possible to find the following things using python ldap or active directory module I want to find if the particular group exist in my active directory also another function to find the user in a particular group -- https://mail.python.org/mailman/listinfo/python-list

memberof example using ldap

2016-09-12 Thread Robert Clove
Hi, I have to find if user is the member of a group, for this i am using the following query (&(objectClass=user)(sAMAccountName=yourUserName) (memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com)) (memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com)== values from distinguished name of your

Find Nested group in LDAP by this i mean group in group

2016-09-16 Thread Robert Clove
Hi, I was looking for search query in LDAP for nested group memebership. It would be great if someone can provide the python code for the same. Regards -- https://mail.python.org/mailman/listinfo/python-list

Has any one automated the vmware-vra setup using python?

2016-10-05 Thread Robert Clove
-- https://mail.python.org/mailman/listinfo/python-list

Survey About Package Requirements Management

2016-10-18 Thread Robert Roskam
Hey all, To clarify my title quickly, this survey is not about replacing pip, as yarn (https://github.com/yarnpkg/yarn) did recently with npm. This is about helping you throughout the lifespan of projects you maintain keep a handle on the dependencies it has. Where I work, we've already made s

Options for stdin and stdout when using pdb debugger

2016-11-24 Thread Robert Snoeberger
I would like to use pdb in an application where it isn't possible to use sys.stdin for input. I've read in the documentation for pdb.Pdb that a file object can be used instead of sys.stdin. Unfortunately, I'm not clear about my options for the file object. I've looked at rpdb on PyPI, which re

Package directory question

2018-06-25 Thread Robert Latest
From: Robert Latest Hello, I'm building an application which consists of two largely distinct parts, a frontend and a backend. The directory layout is like this: |-- jobwatch | |-- backend | | |-- backend.py | | |-- __init__.py | | `-- tables.py | |-- fro

Re: sympy

2016-03-30 Thread Robert Kern
/lambdify.html#sympy.utilities.lambdify.lambdify -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.o

JNLP File download and run

2016-05-20 Thread Robert Clove
Hi, Can someone give me pseudo code to download and JNLP file from a URL and run it? Looks like a advance concept in python Regards -- https://mail.python.org/mailman/listinfo/python-list

Re: JNLP File download and run

2016-05-23 Thread Robert Clove
Can u provide the pseudo code for the same On Fri, May 20, 2016 at 9:06 PM, Michael Torrie wrote: > On 05/20/2016 01:30 AM, Robert Clove wrote: > > Hi, > > > > Can someone give me pseudo code to download and JNLP file from a URL and > > run it? > > > >

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread Robert Kern
ngs are clearly delimited. Keywords, operators, and [{(braces)}] are all explicitly whitelisted from finite lists. Well, I guess it could have been intended by the user to be a numerical literal, but I suspect that's attempted before identifier. -- Robert Kern "I have come to believe t

Re: Gzip module does not support Unix compressed .Z files [SEC=UNOFFICIAL]

2016-07-04 Thread Robert Kern
When I am right, then the "zipfile" module handles ".Z" compressed files. No, that handles PKZIP .zip files. There are third-party modules that handle the .Z format, but shelling out to external programs may still be preferable: https://github.com/umeat/unlzw -- Robert Kern

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Robert Kern
On 2016-07-09 17:13, Michael Selik wrote: On Sat, Jul 9, 2016 at 10:17 AM Jason Friedman wrote: +1 for consistency What do other languages use? R, the most likely candidate, doesn't have them built-in. scipy.stats uses gmean() and hmean() -- Robert Kern "I have come to believ

Re: Curious Omission In New-Style Formats

2016-07-14 Thread Robert Kern
erm "significand" and specifically avoids the term "mantissa". Confirmed. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Is there a way to invoke remote power shell as Admin.

2016-07-23 Thread Robert Clove
Hi, I am basically trying to solve the following problem http://stackoverflow.com/questions/38540424/open-power-shell-as-admin-on-remote-vm Regards Clove -- https://mail.python.org/mailman/listinfo/python-list

on the prng behind random.random()

2018-11-19 Thread Robert Girault
Looking at its source code, it seems the PRNG behind random.random() is Mersenne Twister, but I'm not sure. It also seems that random.random() is using /dev/urandom. Can someone help me to read that source code? I'm talking about CPython, by the way. I'm reading https://github.com/python/cp

Re: on the prng behind random.random()

2018-11-19 Thread Robert Girault
Peter Otten <__pete...@web.de> writes: > Robert Girault wrote: > >> Looking at its source code, it seems the PRNG behind random.random() is >> Mersenne Twister, but I'm not sure. It also seems that random.random() >> is using /dev/urandom. Can someo

Re: on the prng behind random.random()

2018-11-19 Thread Robert Girault
Chris Angelico writes: > On Tue, Nov 20, 2018 at 7:31 AM Robert Girault wrote: >> Nice. So Python's random.random() does indeed use mt19937. Since it's >> been broken for years, why isn't it replaced by something newer like >> ChaCha20? Is it due to back

Re: on the prng behind random.random()

2018-11-19 Thread Robert Girault
Dennis Lee Bieber writes: > On Mon, 19 Nov 2018 19:05:44 -0200, Robert Girault declaimed > the following: > >>I mean the fact that with 624 samples from the generator, you can >>determine the rest of the sequence completely. > > Being able to predict the sequ

Tkinter performance issues between Windows and Linux

2019-04-12 Thread Robert Okadar
and thus not included. If you resize the window (i.e., if you maximize it), you must call the function table.fit() from IDLE shell. Does anyone know where is this huge difference in performance coming from? Can anything be done about it? Thank you, -- Robert Okadar IT Consultant Schedule an

RE: distutils and decorators

2005-09-23 Thread Robert Brewer
Benji York wrote: > Robert Brewer wrote: > > Actually, in this case we most definitely want to test > > 2.4's "@" syntax. The decorator in question is an aliaser, > > and therefore is one of the few > > decorators which must be implemented differently

Re: Content MathML implementation?

2005-09-25 Thread Robert Kern
; different model that is not usable for my purpose. I've seen a Presentation MathML -> SVG renderer written in Python, but that's about it. I'd be very interested in seeing a Content MathML model (the parser and serializer parts can be any one of the various XML modules), so kee

Re: MemoryError Numarray

2005-09-26 Thread Robert Kern
. The a array takes up over 1Gb by itself. a*100 is a temporary array that takes another 1Gb, and finally b takes up another 1Gb. So you have over 3Gb that's trying to exist at the same time. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves o

Re: What tools are used to write and generate Python Library documentation.

2005-09-26 Thread Robert Kern
Kenneth McDonald wrote: > I have a module I'd like to document using the same style... http://docs.python.org/doc/doc.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richar

Re: What tools are used to write and generate Python Librarydocumentation.

2005-09-27 Thread Robert Kern
; set object Build an unordered collection. It disappoints me when I have to go open the ElementTree documentation instead of querying the methods themselves. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: What tools are used to write and generate Python Librarydocumentation.

2005-09-27 Thread Robert Kern
e called working by an outside observer. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: What tools are used to write and generate Python Library documentation.

2005-09-27 Thread Robert Kern
a comment about markup standards, > although you will find more information at the web pages > for the above tools. I'm pretty sure that none of them create documents in the style of the standard library's documentation (the only interpretation I can attach to "using the same styl

Re: Human readable number formatting

2005-09-28 Thread Robert Kern
ease tell me you're making this up. No, but someone else is. http://jimvb.home.mindspring.com/unitsystem.htm -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: number of python users

2005-09-28 Thread Robert Kern
t? So he can make an informed decision about how far back he should maintain compatibility? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Module organization

2005-09-28 Thread Robert Wierschke
Lasse Vågsæther Karlsen schrieb: > I am slowly learning Python and I'm already starting to write some minor > modules for myself. Undoubtedly there are better modules available > either built-in or 3rd party that do the same as mine and much more but > I need to learn it one way or another anyway.

Re: PDF Viewer

2005-09-29 Thread Robert Kern
Terry Reedy wrote: > "Pepe Pena" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Google 'python pdf library' and the third hit is > www.reportlab.org/rl_toolkit.html And is for PDF generation, not PDF viewing. -- Robert Kern [EMAIL

Re: Parser suggestion

2005-09-29 Thread Robert Kern
Jorge Godoy wrote: > Hi! > > > I'm needing a parser to retrieve some information from source code -- > including parts of code -- from Fortran, to use in a project with a > documentation system. http://svn.scipy.org/svn/scipy_core/branches/newcore/scipy/f2py2e/crackfort

Re: Help with syntax warnings

2005-09-29 Thread Robert Kern
ould generally be pointless, yet even so all > you would have to do is catch them and ignore them if that's what you > wanted to do. But did you mean SyntaxError, or something else? In [1]: SyntaxWarning? Type: classobj String Form:exceptions.SyntaxWarning Namespace:

Re: Opinion on Pyrex

2005-09-30 Thread Robert Kern
d link all your C source into a > statical or dynamical library). I always just include those C files as sources for the Extension along with the Pyrex-generated file. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to

Re: morphological image processing in Python

2005-10-03 Thread Robert Kern
py. > > Have I missed the one true Python mathematical morphology toolbox? numarray http://stsdas.stsci.edu/numarray/numarray-1.3.html/module-numarray.ndimage.html This will be ported to the new scipy shortly. We could use some help. -- Robert Kern [EMAIL PROTECTED] "In the fields

Re: packaging a python project and associated graphics files

2005-10-03 Thread Robert Kern
es. Also, take a look at PythonEggs and pkg_resources. http://peak.telecommunity.com/DevCenter/PythonEggs http://peak.telecommunity.com/DevCenter/PkgResources -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionary interface

2005-10-04 Thread Robert Kern
gt; Would this be a correct definition of the desired behaviour? No. In [1]: {1:2} < {3:4} Out[1]: True In [2]: set({1:2}.iteritems()) < set({3:4}.iteritems()) Out[2]: False > Anyone a reference? The function dict_compare in dictobject.c . -- Robert Kern [EMAIL PROTECTED] "In

Re: python plotting with greek symbols within labels recommendations?

2005-10-04 Thread Robert Kern
range of TeX without calling out to TeX. If you want to improve the non-TeX fallback for matplotlib's mathtext module to support math-mode text embedded in plain text, I'm sure John would love to see your contribution. It shouldn't be that hard; it's just nobody's had

Re: python plotting with greek symbols within labels recommendations?

2005-10-04 Thread Robert Kern
]: s Out[41]: u'This is \u0393reek to me' In [42]: rc('font', serif=['Code2000']) In [43]: title(s) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionary interface

2005-10-04 Thread Robert Kern
Tom Anderson wrote: > On Tue, 4 Oct 2005, Robert Kern wrote: > >>Antoon Pardon wrote: >> >>> class Tree: >>> >>>def __lt__(self, term): >>> return set(self.iteritems()) < set(term.iteritems()) >>> >>>def __eq

Re: Can Python replace TCL/Expect

2005-10-05 Thread Robert Kern
creen (not in the packet). I can do it > easily with Expect but I still don't have any idea with Python. > If possible, can you introduce me some book or website that I can get > infor about automation programming with Python You'll probably want to take a look at pexpect: h

Re: updating local()

2005-10-06 Thread Robert Kern
... > > some_function(**variables) > > but its a pain in the neck to have to refer to them as > variables['whatever']... > > dont you think? Use a Bunch. class Bunch(dict): def __init__(self, *args, **kwds): dict.__init__(self, *args, **kwds) self.

Re: Simple prototype text editor in python

2005-10-06 Thread Robert Kern
xt somewhere. Since your code is so short, then I highly recommend using a short, permissive license. It does no one any good to attach a license that's longer than the program itself. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the grav

Re: Continuous system simulation in Python

2005-10-06 Thread Robert Kern
l (discrete events) don't apply terribly well to simulating many (continuous systems) like airplane dynamics. For example, an ODE integrator would probably want to adaptively select its timesteps as opposed to laying out a uniform discretization upfront. -- Robert Kern [EMAIL PROT

Re: Continuous system simulation in Python

2005-10-07 Thread Robert Kern
François Pinard wrote: > [Robert Kern] > >>[...] an ODE integrator would probably want to adaptively select its >>timesteps as opposed to laying out a uniform discretization upfront. > > Eons ago, I gave myself such a little beast (but really found in an > Appen

Re: Python interpreter bug

2005-10-07 Thread Robert Kern
ded in python which is unfortunate. Two > objects could have the same rank while still being different. In that case, define __lt__ and __eq__ separately instead of __cmp__. list.sort() will use __lt__ if it's provided rather than __cmp__. -- Robert Kern [EMAIL PROTECTED] "In the fields

Re: 2d array slicing problem

2005-10-07 Thread Robert Kern
fits.py module. does anyone know any obvious reason this > should be happening? Not without having the data and the machines in front of me. You'll get better luck asking on numarray's mailing list. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass

Re: Simulating low bandwidth network on localhost

2005-10-07 Thread Robert Pagano
check out dummynet... http://www.freebsd.org/cgi/man.cgi?query=dummynet&sektion=4 On 7 Oct 2005 16:48:13 -0700, "qvx" <[EMAIL PROTECTED]> wrote: >I would like to test my CherryPy application in varying network >conditions, ranging from localhost full speed to low badwidth (ie. >14.4kbps) and v

Re: GUI on Macintosh

2005-10-07 Thread Robert Kern
e of them recent). I don't think there's a whole lot of documentation, but if Tkinter won't work, that's your only bet. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Force flushing buffers

2005-10-08 Thread Robert Wierschke
Madhusudan Singh schrieb: > Hi > > I have a python application that writes a lot of data to a bunch of > files > from inside a loop. Sometimes, the application has to be interrupted and I > find that a lot of data has not yet been writen (and hence is lost). How do > I flush the buffer an

RE: Will python never intend to support private, protected and public?

2005-10-08 Thread Robert Brewer
s on topics which I would not otherwise have read. ;) Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: non descriptive error

2005-10-09 Thread Robert Kern
decimal wasn't part of 2.3, but atleast > now when if anyone gets that terse message they know where to start > looking :) [~]$ cat foo.py from decimal import Decimal a = Decimal('0' [~]$ python2.3 foo.py File "foo.py", line 4 ^ SyntaxError: invalid syn

Re: searching a project to contribute to

2005-10-09 Thread Robert Kern
ntroducing yourself on the scipy-dev list. I can give you more direct advice about what's missing and what we would like to include. http://scipy.org/ http://scipy.net/mailman/listinfo/scipy-dev http://svn.scipy.org/svn/scipy_core/branches/newcore/ http://svn.scipy.org/svn/scipy/branches/ne

Re: Pythot doc problem: lambda keyword...

2005-10-10 Thread Robert Kern
Xah Lee wrote: > i'm trying to lookup on the detail of language Python's “lambda” > function feature. google("site:docs.python.org lambda") -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allow

Re: Confused on Kid

2005-10-10 Thread Robert Kern
> you do after you have a kid template? Did you read the documentation? http://kid.lesscode.org/guide.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: scipy.plt legend?

2005-10-11 Thread Robert Kern
nd. > The scipy.plt.legend('whatever') command doesn't seem to exist. I > can't even get started! scipy.plt is incredibly obsolete, unmaintained, and deprecated. Don't use it. Please use matplotlib instead: http://matplotlib.sourceforge.net -- Robert Kern [EMAIL PROT

Re: Wrapper function

2005-10-11 Thread Robert Kern
uff(PyObject *, PyObject *args) { PyObject *wrap_doStuff(PyObject *self, PyObject *args) { > ...when I try to compile this I get > "error C2055: expected formal parameter list, not a type list" and it > points to line 31...which is the line "PyObject *wrap_doStuff(...)&quo

Re: Wrapper function

2005-10-11 Thread Robert Kern
DLL.dll : fatal error LNK1120: 1 unresolved externals > Error executing link.exe. > > MyDLL.dll - 2 error(s), 0 warning(s) > > ..Any ideas? Are you using distutils to build your extension module? You should be. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wher

Re: are there internal functions for these ?

2005-10-11 Thread Robert Kern
p://docs.python.org/lib/module-shutil.html This is the second hit for the google search: site:docs.python.org copy -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.p

Re: calling matlab

2005-10-12 Thread Robert Kern
on how interactive it is, you should look at the subprocess module in the stdlib or pexpect. http://docs.python.org/lib/module-subprocess.html http://pexpect.sourceforge.net/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves o

Re: how to make this code faster

2005-10-12 Thread Robert Kern
(x*y) + 8*x def main(): n = 2000 ycoor = linspace(0.0, 1.0, n) xcoor = transpose(atleast_2d(ycoor)) a = f(xcoor, ycoor) print a[1000, 1000] -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: 1-liner to iterate over infinite sequence of integers?

2005-10-13 Thread Robert Kern
Neal Becker wrote: > I can do this with a generator: > > def integers(): > x = 1 > while (True): > yield x > x += 1 > > for i in integers(): > > Is there a more elegant/concise way? from itertools import count for

Re: matching elements of numeric arrays

2005-10-13 Thread Robert Kern
Numeric.searchsorted(b, a). Otherwise: In [28]: import Numeric as N In [29]: a = N.array([2,4,6]) In [30]: b = N.array([2,3,4,5,6]) In [31]: match = N.equal.outer(a, b) In [32]: idx = N.compress(N.sum(match), N.arange(len(b))) In [33]: idx Out[33]: array([0, 2, 4]) -- Robert Kern [EMA

Re: Numeric array equivalent of index ?

2005-10-14 Thread Robert Kern
wers there. http://numeric.scipy.org/ And no, no one has bothered adding a .index() equivalent for general, unsorted arrays. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading IEEE 754 format strings directly into a floating point array

2005-10-14 Thread Robert Kern
se directly into a floating point array of the > size of the string ? > > Alternatively, I could write a routine to do it, but wanted to find out if > there was a simpler solution. http://docs.python.org/lib/module-array.html http://numeric.scipy.org -- Robert Kern [EMAIL PROTECTED] &q

Re: Problem splitting a string

2005-10-14 Thread Robert Kern
27; and '_' as > the delimiters at once? You could use regular expressions as Jason Stitt mentions, or you could replace '_' with ' ' and then split. In [2]: mystr = 'this_NP is_VL funny_JJ' In [3]: mystr.replace('_', ' ').

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Robert Kern
Jari Aalto wrote: > Thanks, is there equivalent to this Perl statement in Python? > >@list = @ARGV[1 .. @ARGV]; > > or something similar so that I could avoid the 1 > 1 (sys.argv) check > altogether? for arg in sys.argv[1:]: ... -- Robert Kern [EMAIL PROTECTE

Re: UI toolkits for Python

2005-10-16 Thread Robert Hicks
practical approach, but it sure makes you feel dirty. > Dirty or not, it allows Python to utilitze any new features of Tk much faster than an actual Tk binding would. That is Perl/Tk's problem...it is slow to adopt new Tk features. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: A Logging System for Python

2005-10-17 Thread Robert Kern
on. > > Am I correct and if so is there any trend to include it in Python 2.5 ? http://docs.python.org/lib/module-logging.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harte

Re: Hygenic Macros

2005-10-17 Thread Robert Kern
, I have to type > > import Numeric > matrixmultiply(A,B) > > which makes my code almost unreadable. Well, dot(A, B) is better. But if you must: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/384122 -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the gr

Re: Hygenic Macros

2005-10-18 Thread Robert Kern
ple was trivial. When you have more complicated matrix expressions with transposes and conjugations and more matrixmultiplies than you can shake a stick at, it gets ugly pretty fast. F = dot(dot(Z, F),transpose(conjugate(Z))) versus from scipy import * F = mat(F) Z = mat(Z) F = Z*F*Z.H --

Dealing with Excel

2005-10-18 Thread Robert Hicks
I need to pull data out of Oracle and stuff it into an Excel spreadsheet. What modules have you used to interface with Excel and would you recommend it? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Dealing with Excel

2005-10-18 Thread Robert Hicks
I just want to be and maybe I am not reading your response right. I am talking about reading in bunch of rows out of Oracle and writing them to an excel file, not using macros. Robert -- http://mail.python.org/mailman/listinfo/python-list

RE: How to get listed on planet.python.org

2005-10-18 Thread Robert Brewer
t=Python I'm pretty sure you should just email [EMAIL PROTECTED] with your request. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Dealing with Excel

2005-10-18 Thread Robert Hicks
No, I have to format fields and everything sad to say. Another poster up the chain of this posting gave me the nudge in the direction I needed. Thanks all, Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Python variables are bound to types when used?

2005-10-19 Thread Robert Kern
d Pythonistas, no I don't think it's wrong. When you're talking about Python versus other languages where "variable" corresponds with "a possibly typed memory location", or you're talking with someone who is coming from such a language, then it's probably be

Re: fun with lambdas

2005-10-20 Thread Robert Kern
ct in [0,1,2] once the iteration is finished. Try this (although I'm sure there are better ways): In [4]: fs = [lambda x, o=o: f(x, o) for o in [0,1,2]] In [5]: fs[0](0) Out[5]: 0 In [6]: fs[0](1) Out[6]: 1 In [7]: fs[0](2) Out[7]: 2 -- Robert Kern [EMAIL PROTECTED] "In the fields

RE: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread Robert Brewer
gt;>> print model.person > >SELECT > >person.* > >FROM > >[person] person > > The [bracket] syntax is unique to Microsoft. > Everyone else, including Microsoft SQL Server, > uses "double quotes" to protect special characters > in identifiers. E

Re: Python extension module segmentation fault

2005-10-21 Thread Robert Kern
lude/python2.4/Numeric mytest_wrap.cpp -o mytest_wrap.o > > g++ -shared -L/usr/local/lib/python2.4/config/ mytest_wrap.o > -lpython2.4 -lm -o _mytest.so > > > the Python file reads: > > import _mytest > from Numeric import * > mat = ones(100,Float64) > print

Re: Should i pick up Numeric, Numarray or SciPy.core?

2005-10-21 Thread Robert Kern
ing and port your code to scipy_core using the provided conversion script. The API on the Python side hasn't changed too dramatically. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

RE: How to add one month to datetime?

2005-10-21 Thread Robert Brewer
h + 1, olddate.day) will roll over any values which are out-of-bounds for their container. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-21 Thread Robert Boyd
On 10/19/05, Jason Stitt <[EMAIL PROTECTED]> wrote: > > How can we improve Python's competitiveness in this arena? "Pie"? Or > can we do even better than Lua? Ptooey! I'm sure I could really evangelize use of it at work were it called Ptooey ;) As if Plone, Zope, and (non-Python) Shibboleth were

Re: C extension modules in Python

2005-10-22 Thread Robert Kern
the "-lnumarray" option to the linker)? You shouldn't be. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: execution order in list/generator expression

2005-10-23 Thread Robert Kern
s used up on the first time. In [7]: a=(x for x in [1,2,3,4]) In [8]: p = [4, 5, 2, 3] In [9]: c=[x for x in p if x in list(a)] In [10]: c Out[10]: [4] -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die."

Question: New editions of Python books?

2005-10-27 Thread Robert Boyd
Hi, Are any new editions in the works for either "Python Essential Reference" or "Python in a Nutshell"? I'm holding off buying one or the other existing editions, although my library overdue fines for them would have paid for them by now! Thanks, Rob -- http://mail.python.org/mailman/listinfo/p

Is bytecode machine (in)dependent?

2005-10-28 Thread Robert McLay
I'm trying to understand bytecodes generated on different machines. I understand that the bytecodes can change between version. But since I'm told that .pyc files are version dependent but not machine dependent, I'm wondering why the bytecodes are machine dependent. my friend and I created this s

Re: Generic utility class for passing data

2005-10-28 Thread Robert Kern
the record, my favorite variation is as follows: class Bunch(dict): def __init__(self, *args, **kwds): dict.__init__(self, *args, **kwds) self.__dict__ = self -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams

Re: Python's website does a great disservice to the language

2005-11-01 Thread Robert Boyd
On 11/1/05, CppNewB <[EMAIL PROTECTED]> wrote: ...First comment; "I hope the language is designed better than the site."  Thesite is readable, but is amateurish.  If I had an ounce of design skills inme, I would take a stab at it. Does boss have a problem with java.sun.com as well? The main visual

Re: Add attribute using pyxml

2005-11-01 Thread Robert Boyd
On 1 Nov 2005 11:09:10 -0800, PyPK <[EMAIL PROTECTED]> wrote: How do I add a new attribute to the existing xml Document tree??? Add an attribute of an element, or add a new element? I hope I've understood your question correctly...this demonstrates both adding a brand new element (tag) and an att

<    2   3   4   5   6   7   8   9   10   11   >