Hello all,
I am an experienced Python user and struggle with following statement:
>>> from tklib import *
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'tklib'
I tried to import tklib as shown above on following of my Python installations:
Anaconda
No need to develop another lint tool. Just give the creator of pylint an
improvement proposal. This can be at least reported as a warning.
Even in a highly dynamic language like Python it is good to follow some
style guides. I try to avoid the same names if possible for different
functionality. T
Rafe schrieb:
On Aug 15, 10:27 pm, Wolfgang Grafen <[EMAIL PROTECTED]>
wrote:
Rafe schrieb:
Now if I try to pass this as I would a string, roughly like so...
s = StrLike("test")
Application.AnObject.attribute = "test" # works fine
Application.AnObject.attribute =
Rafe schrieb:
Forgive me if I mangle any terminology here, but please correct me if
I do...
I have an object which acts exactly like a string as long as I stay in
Python land. However, I am using the object in Softimage|XSI, a 3D
application on Windows. I'm getting variant erros when trying to u
Svenn Are Bjerkem schrieb:
Hi again,
when I get far enough to parse the VHDL (which is not currently the
fact, but I have to look at the work coming up downstream) I will have
to put it into an internal data structure and then write some classes
to handle the MVC between whatever data I have and
You could use my mseqdict implementation of a sorted dict.
http://home.arcor.de/wolfgang.grafen/Python/Modules/Modules.html
swap:
This method can only be applied when all values of the dictionary are
immutable. The Python dictionary cannot hold mutable keys! So swap
doesn't work if only one of
I couldn't get it work on Solaris (modified some lines for Python2.3).
One reason was that I had to download pyreadline separately
- I did than but now pyreadline requires either ironpython or
a windows installation. Something is going wrong...
Best regards
Wolfgang
Bob Farrell schrieb:
I re
Armin Ronacher schrieb:
Other implementations of ordered dicts in various Python projects or
standalone libraries, that inspired the API proposed here, are:
- `odict in Babel`_
- `OrderedDict in Django`_
- `The odict module`_
- `ordereddict`_ (a C implementation of the odict module)
- `StableDic
globalrev schrieb:
http://reddit.com/r/programming/info/18td4/comments
claims people take a lot of time to write a simple program like this:
"Write a program that prints the numbers from 1 to 100. But for
multiples of three print "Fizz" instead of the number and for the
multiples of five print
[EMAIL PROTECTED] schrieb:
Hi - I have a list returned from popen/readlines, and am wondering how
to go about iterating over each item which was returned (rather than
currently having the whole lot returned).
so far:
f=os.open("./get_hostnames").readlines
returns ['host1 host2 host3 ... host
ything but I cannot figure
> out how I can do it.
> I want to open a a file (not necessary a txt) and find and replace a
> string.
> I can do it with:
>
> import fileinput, string, sys
> fileQuery = "Text.txt"
> sourceText = '''SOURCE'''
> replaceText = '''REPLACE'''
> def replace(fileName, sourceText, replaceText):
Now how to solve it with a simple regular expression:
>>> import re
>>> re_replace = re.compile("SOURCE").sub
>>>
>>> txt = " SOURCE SOURCE \n SOURCE "
>>>
>>> print re_replace("REPLACE", txt)
' REPLACE REPLACE \n REPLACE '
>>> new_text = re_replace("REPLACE", open(fileName).read())
A regular expression for this task is kind of overkill. Mastering
regular expression is the efford very worth.
Wolfgang Grafen
--
http://mail.python.org/mailman/listinfo/python-list
I had a similar problem with an extension module on Solaris years ago.
My problem at that time:
I requested memory and released it and requested more memory in the next step
and so on.
The reason that the memory was eaten up:
An answer out of this group was that the operating system doesn't releas
Victor Polukcht wrote:
> I have 2 strings:
>
> "Global etsi3 *200 ok30 100% 100%
> Outgoing"
> and
> "Global etsi3 * 4 ok 30 100% 100%
> Outgoing"
>
> The difference is "*200" instead of "* 4". Is there ability to write a
> regular ex
shellon wrote:
> Hi all:
> I want to convert the float number to sortable integer, like the
> function float2rawInt() in java, but I don't know the internal
> expression of float, appreciate your help!
>
You should know you can sort mixed float/integer values in Python
>>> l=[3,2.3,1.45,2,5]
Dan Bishop wrote:
> On Jan 13, 8:49 pm, "lee" <[EMAIL PROTECTED]> wrote:
>> Can anyone tell me the basics about indentation in python..how we
>> use it in loops and constructs..etc
>
> It's just like indentation in other languages, except that it's
> syntactically required.
>
The indent r
spohle wrote:
> hi i have a normal dictionary with key and value pairs. now i wanna
> sort by the keys BUT in a specific order i determine in a list !? any
> ideas
>
> dic = {'key1':'value1', 'key2':'value2', 'key3':'value3'}
>
> list = [key2, key3, key1]
>
You could use the seqdict package at
Use the seqdict.py package:
What is it?
http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/seqdict/
Downloads:
http://home.arcor.de/wolfgang.grafen/Python/Modules/seqdict/seqdict-0.3.zip
http://home.arcor.de/wolfgang.grafen/Python/Modules/AllOs/DOC/HTML/HTMLDoc.zip
http://home.arcor.de
the past...
Just a poll: Who misses the Vaults of Parnassus like me?
Olivier Grisel wrote:
> Wolfgang Grafen a écrit :
>
>> What happened to the Vaults of Parnassus? It was always my
>> favourite resource for Python code since ever. The latest
>> entry is now 8/23
What happened to the Vaults of Parnassus? It was always my
favourite resource for Python code since ever. The latest
entry is now 8/23. It has been up to date for years but now...
What a pity!
wolfgang
--
http://mail.python.org/mailman/listinfo/python-list
19 matches
Mail list logo