just don't work well with your
neurons. And you may still call the former "my languages".
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
gt;>
>> Yes, that's what you said already. My reasoning was in the part you stripped
>> from my quote. *shrug*
>
> Multiple symmetric quote characters breaks one of python's own zen
> rules:
>
> There should be one-- and preferably only one --obvious way t
s, but 'that' is 'that' like 'this'>
... with 'qq' providing the version with inerpolation. I could
always find an arbitrary character for quoting that was _not_ present
in the string, and so, most of the time, avoid quoting altogether.
It was perhaps a bit too magical, but pruced very readable strings.
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
ocol specs and follow them.
Sure, sure. But it still may raise a few eyebrows as people start to
play along while still reading the spces. It's just not something that
I'd expect (yes, I learnt Perl before I discovered Python).
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
kes is to
start playing with generating JSON without the use of specialized
JSON libraries/functions. For testing, for fun, out of curiosity...
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
t the OP requested, i.e. "6 digit random number
*from a given number*"? That is, a random permutation of the set
of its digits?
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
g/
> [2] http://statsmodels.sourceforge.net/
> [3] http://docs.python.org/library/queue.html
> [4]
> http://www.laurentluce.com/posts/python-threads-synchronization-locks-rlocks-semaphores-conditions-events-and-queues/
Thanks for the suggestions.
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
of 15 readings and ring a bell when the data
in buffer form a specific pattern (a spike, a trough, whatever)?
I'll be grateful for a push in the right direction. Thanks,
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
f editing,
e.g. pasting part of an "Alias" at the end of the line for
"AddDefaultCharset" or sth like this.
GS
--
Grzegorz Staniak
Nocturnal Infiltration and Accurate Killing
--
http://mail.python.org/mailman/listinfo/python-list
s thinking about something like:
>
> mylist.index('no*')
>
> Of course this doesn't work.
I guess there's a way to use the glob module in this situation, but
for the specific case I think you can use:
start_with_no = (i for i in mylist if i.startswith("no"))
GS
or _any_ suggestions or comments.
Most of them happened to be along the lines of "phew, that's too easy,
go bother yourself with the rest of the stuff".
> The common denonimator of a workflow (state engine) is so simple, the
> only complexity comes from the environment it
ied any such code? What would you recommend?
>
> There are some packages for zope on pypi:
> Products.DCWorkflow - zope2, cmf
> hurry.workflow and some extensions - zope3
> zope.wfmc - zope3 (not many dependencies on zope3)
Thanks, I'll have a look at them.
GS
--
Grzegorz Sta
tion was pretty
specific: could you comment on/recommend an open source python workflow
engine/module (implied: to go with a web app). Sharepoint doesn't match
the description. I think one could assume that if I'm asking about wheels,
I need a pointer to a wheel shop, and I'm not
framework.
>
> http://www.google.de/search?q=python+state+machine
To be exact, I used the words "engine/library", not "a whole framework".
Thanks for the link, I've googled for articles and recipes myself and
as I said, I more or less know what to do - I just thought it might be
a good idea to ask whether perhaps the wheel has already been invented.
Apparently I was wrong.
GS
--
Grzegorz Staniak
Nocturnal Infiltration and Accurate Killing
--
http://mail.python.org/mailman/listinfo/python-list
dea to start
writing another one? I'd much prefer an existing workflow project that
I could use, test, and contribute to, just as I decided on TG for the
web thing.
GS
--
Grzegorz Staniak
Nocturnal Infiltration and Accurate Killing
--
http://mail.python.org/mailman/listinfo/python-list
tell),
itools.workflow, spiff (AFAIK tied to a CMS), but not much else. I don't
think I'll have enough time to get acquinted with Plone and its offer
of products. Has anyone here tried any such code? What would you recommend?
TIA,
GS
--
Grzegorz Staniak
Nocturnal Infiltration and Accurate
; And some would argue that it was wrong to have such a wide definition
> for the truth value of an expression in the first place...
Just out of idle curiosity, what could be the alternatives? Not to evaluate
e.g. strings to "true"? Aren't such conventions as "whatever is
ink this here is an example where even str_replace
> in Python wouldn't have worked well.
What about mystring.translate(transtable)?
GS
--
Grzegorz Staniak
Nocturnal Infiltration and Accurate Killing
--
http://mail.python.org/mailman/listinfo/python-list
Is there some equivalent in Python ?
The .translate() method of strings?
>>> import string
>>> mystr = "This is just a test"
>>> transtable = string.maketrans("aeiouy","--")
>>> mystr.translate(transtable)
'Th-s -s j-st - t-st'
GS
--
Grzegorz Staniak
Nocturnal Infiltration and Accurate Killing
--
http://mail.python.org/mailman/listinfo/python-list
re some equivalent in Python ?
The .translate() method of strings?
>>> import string
>>> mystr = "This is just a test"
>>> transtable = string.maketrans("aeiouy","--")
>>> mystr.translate(transtable)
'Th-s -s j-st - t-st'
GS
--
Grzegorz Staniak
Nocturnal Infiltration and Accurate Killing
--
http://mail.python.org/mailman/listinfo/python-list
an iterator?
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
ase the length of "os.listdir()" could
suffice, but then you might need to filter out sub-directories, or maybe
count files in them too using "os.walk()".
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
')
>
> but the file extension doesn't work. So how do I open one?
Have you tried the local file URL, like "file:///home/user/file.html"?
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
..
Very sorry, but I just couldn't resist.
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
t;no" and I want
> all of "text5+more Text" because it is after "yes". It is like the yeses are
> bullet points and I want all the info after them. However, all in one
> string.
I guess this can be done with regular expressions:
http://www.python.org/doc/current/lib/module-re.html
Read about groups, then write an appropriate regex.
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
ething like "count and return all occurences of the substring
'abc' in foo"? Looks like you should use the re module.
GS
--
Grzegorz Staniak
--
http://mail.python.org/mailman/listinfo/python-list
26 matches
Mail list logo