Here is one simple solution :
>>> intext = """Lorem [ipsum] dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut [labore] et [dolore] magna aliqua."""
>>> intext.replace('[', '{').replace(']',
'}')
'Lorem {ipsum} dolor sit amet, consectetur adipisicing elit, sed do ei
On Feb 7, 12:52 am, duncan smith
wrote:
> import platform
> if platform.architecture()[0].startswith('64'):
> TINY = 2.2250738585072014e-308
> else:
> TINY = 1.1754943508222875e-38
As Christian said, whether you're using 32-bit or 64-bit shouldn't
make a difference here. Just use the f
On 07 Feb 2010, at 10:03, Shashwat Anand wrote:
Here is one simple solution :
>>> intext = """Lorem [ipsum] dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt ut [labore] et
[dolore] magna aliqua."""
>>> intext.replace('[', '{').replace(']', '}')
'Lorem {ipsum
I'm not quite familiar with python serialization but the picle module,
at least, doesn't seem to be able to serialize a ctypes Structure with
array-fields. Even if it was, the ASCII file produced is not in a
human-friendly format.
Could someone please suggest a method of saving and loading the fie
Steven D'Aprano wrote:
> If you want iterator operations "similar to itertools", why does this
> mean you need to replace anything? Just create your own iterators.
>
> Or use pre-processing and post-processing to get what you want.
>
> Can you show an example of what you would like to happen?
S
Christian Heimes wrote:
> If you *really* need to overwrite __iter__ on your instance rather
> than defining it on your class, you need to proxy the method call:
>
> class MyObject(object):
>def __iter__(self):
> return self.myiter()
>
> obj = MyObject()
> obj.myiter = myiter
>
> Tha
Hi JM,
Jean-Michel Pichavant wrote:
> News123 wrote:
>> Jean-Michel Pichavant wrote:
>>
>>
>> Well This was exactly my question.
>> for virtual web servers I cannot just use the IP-address.
>> some XMLRPC servers do need the histname within the HTTP-POST request.
>>
>>
> a valid IP address w
Hi Jerry,
Jerry Hill wrote:
> On Sat, Feb 6, 2010 at 7:07 PM, News123 wrote:
>> Hi,
>>
>> I wondered which modules would be best to perform following task:
>>
>> A user uses a standard ssh (e.g. putty or openssh) client and performs
>> an ssh to a windows host
>>
>> The windows host would run a p
Hi Jerry,
Jerry Hill wrote:
> On Sat, Feb 6, 2010 at 7:07 PM, News123 wrote:
>> Hi,
>>
>> I wondered which modules would be best to perform following task:
>>
>> A user uses a standard ssh (e.g. putty or openssh) client and performs
>> an ssh to a windows host
>>
>> The windows host would run a p
Hi Jerry,
Jerry Hill wrote:
> On Sat, Feb 6, 2010 at 7:07 PM, News123 wrote:
>> Hi,
>>
>> I wondered which modules would be best to perform following task:
>>
>> A user uses a standard ssh (e.g. putty or openssh) client and performs
>> an ssh to a windows host
>>
>> The windows host would run a p
I would want to get the output from `logging.exception` but with
traceback from the caller function (I've already all that
information).
This would be the error with logging.exception:
ERROR:
PipeError('/bin/ls -l | ', 'no command after of pipe')
Traceback (most recent call
Dear Folks,
I have read that one should use a dictionary in python to accommodate
dynamic variable names. Yet, I am puzzled how to achieve that in my
case. Here is what I want to do:
1. The user inputs a number of six-digit hex numbers as a
comma-separated list. These numbers represent colou
Aahz wrote:
> In article
> <0c535d15-967d-4909-a9bb-b59708181...@l24g2000prh.googlegroups.com>,
> Xah Lee wrote:
>> This is a short complaint on admin abuse on #python irc channel on
>> freenode.net.
>
> Let's see, you are complaining about getting banned from #python by
> CROSS-POSTING between
bartc wrote:
> "Arnaud Delobelle" wrote in message
> news:m28wb6ypfs@googlemail.com...
>> "Gabriel Genellina" writes:
>>
>>> En Fri, 05 Feb 2010 19:22:39 -0300, bartc escribió:
"Steve Holden" wrote in message
news:mailman.1998.1265399766.28905.python-l...@python.org...
> Arnau
Nobody wrote:
> On Sat, 06 Feb 2010 21:31:52 +0100, Alf P. Steinbach wrote:
>
>> The size-8 tabs look really bad in an editor configured with tab size 4,
>> as is common in Windows. I'm concluding that the CPython programmers
>> configure their Visual Studio's to *nix convention.
>
> 8-column tab
Dennis Lee Bieber wrote:
> On Sun, 07 Feb 2010 05:49:28 +, Nobody
> declaimed the following in gmane.comp.python.general:
>
>
>> 8-column tabs aren't a "*nix convention"; that's been the norm since
>> the mechanical typewriter.
>>
> Really? None of the various Royal, Remington, and Oli
Martin Drautzburg wrote:
> Steven D'Aprano wrote:
>
>> If you want iterator operations "similar to itertools", why does this
>> mean you need to replace anything? Just create your own iterators.
>>
>> Or use pre-processing and post-processing to get what you want.
>>
>> Can you show an example of
>>> This is a short complaint on admin abuse on #python irc channel on
>>> freenode.net.
>>
>> Let's see, you are complaining about getting banned from #python by
>> CROSS-POSTING between c.l.py and comp.lang.lisp. From my POV, that's
>> grounds for extending the IRC ban permanently.
>
> It certai
hzh...@gmail.com wrote:
>> So it seems we both misunderstood the problem.
>>
>> I didn't read the top level article until now, and reading it, I can't make
>> sense of it.
>>
>
> Seems that you should read the whole thing before making a post, or
> else you cannot know what we are talking about.
>
Schif Schaf wrote:
On Feb 7, 12:19 am, "Alf P. Steinbach" wrote:
I haven't used regexps in Python before, but what I did was (1) look in the
documentation,
[snip]
import re
text = (
"Lorem [ipsum] dolor sit amet, consectetur",
"adipisicing elit, sed do eiusmod tempor",
"incid
LOL
pow(funny, sys.maxint)
On Sun, Feb 7, 2010 at 6:27 PM, Daniel Fetchinson wrote:
> >>> This is a short complaint on admin abuse on #python irc channel on
> >>> freenode.net.
> >>
> >> Let's see, you are complaining about getting banned from #python by
> >> CROSS-POSTING between c.l.py and com
duncan smith wrote:
> Christian Heimes wrote:
>> duncan smith wrote:
>>> Hello,
>>>I'm trying to find a clean and reliable way of uncovering
>>> information about 'extremal' values for floats on versions of Python
>>> earlier than 2.6 (just 2.5 actually). I don't want to add a
>>> dependen
@ Rocteur CC wrote:
>
> On 07 Feb 2010, at 10:03, Shashwat Anand wrote:
>
>> Here is one simple solution :
>> >>> intext = """Lorem [ipsum] dolor sit amet, consectetur adipisicing
>> elit, sed do eiusmod tempor incididunt ut [labore] et [dolore] magna
>> aliqua."""
>>
>> >>> intext.replace('[',
> LOL
assert funny > 1
> pow(funny, sys.maxint)
>> >>> This is a short complaint on admin abuse on #python irc channel on
>> >>> freenode.net.
>> >>
>> >> Let's see, you are complaining about getting banned from #python by
>> >> CROSS-POSTING between c.l.py and comp.lang.lisp. From my POV, tha
R (Chandra) Chandrasekhar wrote:
> Dear Folks,
>
> I have read that one should use a dictionary in python to accommodate
> dynamic variable names. Yet, I am puzzled how to achieve that in my
> case. Here is what I want to do:
>
> 1. The user inputs a number of six-digit hex numbers as a
> comma-s
Schif Schaf writes:
> (brackets replaced by braces). I can do that with Perl pretty easily:
>
>
> for (<>) {
> s/\[(.+?)\]/\{$1\}/g;
> print;
> }
>
Just curious, but since this is just transpose, then why not simply
tr/[]/{}/? I.e. why use a regular expression at all for this?
Tim Chase wrote:
> Schif Schaf wrote:
>> On Feb 7, 12:19 am, "Alf P. Steinbach" wrote:
>>> I haven't used regexps in Python before, but what I did was (1) look
>>> in the
>>> documentation,
> [snip]
>>>
>>> import re
>>>
>>> text = (
>>> "Lorem [ipsum] dolor sit amet, consectetur",
>>>
Shashwat Anand wrote:
> LOL
> pow(funny, sys.maxint)
>
Yes, funny, but it overlooks the point that Xah is a nuisance to
multiple communities, not just to ours, and quite often concurrently.
I'm all in favor of tolerance, but I'd like to see some evidence that
rehabilitation is practical before th
hzh...@gmail.com wrote:
"Given the function hashlib.sha256, enumerate all the possible inputs
that give the hexadecimal result
0a2591aaf3340ad92faecbc5908e74d04b51ee5d2deee78f089f1607570e2e91."
This is a hash collision problem. Nobody has proved that SHA-256 is
collision free
It's actually pr
Steve Holden wrote:
Tim Chase wrote:
And to answer those who are reaching for other non-regex (whether string
translations or .replace(), or pyparsing) solutions, it depends on what
you want to happen in pathological cases like
s = """Dangling closing]
with properly [[nested]] and
c
>> LOL
>> pow(funny, sys.maxint)
>>
> Yes, funny, but it overlooks the point that Xah is a nuisance to
> multiple communities, not just to ours, and quite often concurrently.
I don't think we need to worry about other communities or every
internet related problem. The only thing we need to make su
>>> LOL
>>> pow(funny, sys.maxint)
>>>
>> Yes, funny, but it overlooks the point that Xah is a nuisance to
>> multiple communities, not just to ours, and quite often concurrently.
>
> I don't think we need to worry about other communities or every
> internet related problem. The only thing we need
jonny lowe writes:
> The result is the same as before. I've tested in fedora11.
I don't think script is the answer here, since it only stores what's
displayed on a terminal and your program's input comes from a file and
is not displayed on the terminal.
Simplest solution is probably that you ha
On Sun, 7 Feb 2010 15:11:41 +0100
Daniel Fetchinson wrote:
> I'd say let's designate a post Python Community Jester, or PCJ for
> short, let's name Xah Lee the PCJ and make it clear that he can engage
> in his activities on c.l.p and #python as he wishes without
> retribution and fear, and nobody
Steve Holden wrote:
>> y = s1*2 + s2(align=10)
>>
>> which should iterate as
>>
>> Time=1,'a'
>> Time=2,'a'
>> Time=10,'b'
>>
>> I have no difficulty passing "align" to the object (using __call__)
>> and use it while I furnish my own __iter__() method. However I don't
>> quite see how I can do
>
> And I really don't see how simple enumeration of range(2^2048) breaks
> RSA-2048, since that problem requires you to find two factors which,
> when multiplied together, give that specific value.
>
I can tell you why is that. RSA-2048 has a composite of length less
than 2^2048, which is a prod
Martin Drautzburg wrote:
> Steve Holden wrote:
>
>
>>> y = s1*2 + s2(align=10)
>>>
>>> which should iterate as
>>>
>>> Time=1,'a'
>>> Time=2,'a'
>>> Time=10,'b'
>>>
>>> I have no difficulty passing "align" to the object (using __call__)
>>> and use it while I furnish my own __iter__() method. How
I have attached the file that the game is on. feel free to modify it to make
it better. all suggestions are welcome. if you don't want to download the
file then here's the code:
hzh...@gmail.com wrote:
>> And I really don't see how simple enumeration of range(2^2048) breaks
>> RSA-2048, since that problem requires you to find two factors which,
>> when multiplied together, give that specific value.
>>
>
> I can tell you why is that. RSA-2048 has a composite of length less
Jordan Uchima wrote:
> I have attached the file that the game is on. feel free to modify it to
> make it better. all suggestions are welcome. if you don't want to
> download the file then here's the code:
>
[...]
>
> my problem is that i can't get it to make the players have more than 1
> turn ea
In article <188bfb67-3334-4325-adfc-3fa4d28f0...@d27g2000yqn.googlegroups.com>,
lofic wrote:
>
>Works fine on RHEL5/python 2.4.3
>Hangs on RHEL4/python 2.3.4
Then use Python 2.4 -- surely you don't expect anyone to provide bugfixes
for a release that's several years old?
--
Aahz (a...@pythoncra
In article ,
Chris Rebert wrote:
>On Tue, Feb 2, 2010 at 5:24 AM, mk wrote:
>>
>> Is there an easy way to get an editing (readline) in Python that would
>> contain string for editing and would not just be empty?
>>
>> I googled but found nothing.
>
>Er...: http://docs.python.org/library/readline
Hi Alf,
I think you talk too much... :-) Basically I am all for a verbose
approach in a text for beginners, but on the other hand it is necessary
to stick to the point you are making.
When, for example, you introduce your reader to the thoughts of Francis
Glassborrow on page 5 of chapter three
On 2/7/2010 7:39 AM, Steve Holden wrote:
Clearly written by someone who has never *used* a mechanical typewriter.
The original mechanisms had "tab set" and "tab clear" keys, so you had
variable tabbing according to the needs of the particular document you
were working on. Look under "T" in
h
On Feb 6, 10:19 pm, Nobody wrote:
> On Fri, 05 Feb 2010 21:05:53 -0800, darnzen wrote:
> > I've written an app using thewcklibrary (widget construction kit,
> > seehttp://www.effbot.org), in addition to the wckGraph module. What
> > I'd like to do, is take the output of one of my windows (happens
Hi!
I'm finishing a project writen in Python, and I realize about the document
PEP8 - Style Guide for Python Code [1].
Is there any app or script that checks if my project pass that style guide?
I also worked with Drupal, and I know there is some modules and scripts that
checks its coding standar
I have a script, which runs as a Windows service under the LocalSystem
account, that I wish to have execute some commands. Specifically, the
program will call plink.exe to create a reverse SSH tunnel. Right now
I'm using subprocess.Popen to do so. When I run it interactively via
an admin account
pylint and pychecker are good options
On Sun, Feb 7, 2010 at 1:36 PM, Pablo Recio Quijano
wrote:
> Hi!
> I'm finishing a project writen in Python, and I realize about the document
> PEP8 - Style Guide for Python Code [1].
> Is there any app or script that checks if my project pass that style guid
On Sun, Feb 7, 2010 at 11:02 AM, T wrote:
> I have a script, which runs as a Windows service under the LocalSystem
> account, that I wish to have execute some commands. Specifically, the
> program will call plink.exe to create a reverse SSH tunnel. Right now
> I'm using subprocess.Popen to do s
On Sun, 07 Feb 2010 19:36:10 +0100, Pablo Recio Quijano wrote:
> Hi!
>
> I'm finishing a project writen in Python, and I realize about the
> document PEP8 - Style Guide for Python Code [1].
>
> Is there any app or script that checks if my project pass that style
> guide? I also worked with Drupa
Thanks!
Pylint was what i was loking for
2010/2/7 Gerald Britton
> pylint and pychecker are good options
>
> On Sun, Feb 7, 2010 at 1:36 PM, Pablo Recio Quijano
> wrote:
> > Hi!
> > I'm finishing a project writen in Python, and I realize about the
> document
> > PEP8 - Style Guide for Python C
On Feb 7, 8:22 pm, Kev Dwyer wrote:
> On Sun, 07 Feb 2010 19:36:10 +0100, Pablo Recio Quijano wrote:
> > Hi!
>
> > I'm finishing a project writen in Python, and I realize about the
> > document PEP8 - Style Guide for Python Code [1].
>
> > Is there any app or script that checks if my project pass
Steven D'Aprano wrote:
On Sun, 07 Feb 2010 03:02:05 +, duncan smith wrote:
The precise issue is that I'm supplying a default value of
2.2250738585072014e-308 for a parameter (finishing temperature for a
simulated annealing algorithm) in an application. I develop on
Ubuntu64, but (I am told
On Feb 7, 8:45 pm, duncan smith wrote:
[...]
> interested, but the following pseudo-python gives the idea. For an
[...]
> try:
> yield rand() < exp(dF / temp)
Practically speaking, the condition rand() < exp(dF / temp) is never
going to be satisfied if dF / temp <
Aahz:
> BTW, in case anyone is confused, it's "svn blame" vs "cvs annotate".
Possibly earlier versions of SVN only supported "blame" but the
variants "annotate", "ann", and "praise" all work with the version of
SVN (1.6.5) I have installed.
Neil
--
http://mail.python.org/mailman/listinfo/
In case someone else finds it useful here is a program I wrote a year
or so ago to help manage tab characters. It will convert tabs to runs
of spaces, convert runs of spaces to tabs, or count or check for tab
characters as required. It supports tab stops at regular and irregular
positions.
http:
On Feb 7, 11:02 am, T wrote:
> I have a script, which runs as a Windows service under the LocalSystem
> account, that I wish to have execute some commands. Specifically, the
> program will call plink.exe to create a reverse SSH tunnel. Right now
> I'm using subprocess.Popen to do so. When I run
On Feb 7, 4:43 pm, Sean DiZazzo wrote:
> On Feb 7, 11:02 am, T wrote:
>
> > I have a script, which runs as a Windows service under the LocalSystem
> > account, that I wish to have execute some commands. Specifically, the
> > program will call plink.exe to create a reverse SSH tunnel. Right now
Hi,
I have a number of relatively large number *tar.gzip files to
process. With the py module tarfile, I see that I can access and
extract them, one at a time to a temporary dir, but that of course
takes time.
All that I need to do is to read the first and last lines of each file
and then move o
That is a method called brute force. According to my computation,
2^2048=
32317006071311007300714876688669951960444102669715484032130345427524655138867890
89319720141152291346368871796092189801949411955915049092109508815238644828312063
087736730099609175019775038965210679605763838406756827679221864
On Sun, 07 Feb 2010 03:53:49 +0100, Alf P. Steinbach wrote:
>> "Given the function hashlib.sha256, enumerate all the possible inputs
>> that give the hexadecimal result
>> 0a2591aaf3340ad92faecbc5908e74d04b51ee5d2deee78f089f1607570e2e91."
>
> I tried some "parrot" variants but no dice. :-(
Oh, e
* T:
On Feb 7, 4:43 pm, Sean DiZazzo wrote:
On Feb 7, 11:02 am, T wrote:
I have a script, which runs as a Windows service under the LocalSystem
account, that I wish to have execute some commands. Specifically, the
program will call plink.exe to create a reverse SSH tunnel. Right now
I'm us
On Sun, Feb 7, 2010 at 8:24 AM, Aahz wrote:
> In article ,
> Chris Rebert wrote:
>>On Tue, Feb 2, 2010 at 5:24 AM, mk wrote:
>>>
>>> Is there an easy way to get an editing (readline) in Python that would
>>> contain string for editing and would not just be empty?
>>>
>>> I googled but found not
Is there a way to do this, without decompressing each file to a temp
dir? Like is there a method using some tarfile interface adapter to
read a compressed file? Otherwise I'll just access each file, extract
it, grab the 1st and last lines and then delete the temp file.
I think you're looking
On 7 Feb, 21:25, James Harris wrote:
> In case someone else finds it useful here is a program I wrote a year
> or so ago to help manage tab characters. It will convert tabs to runs
> of spaces, convert runs of spaces to tabs, or count or check for tab
> characters as required. It supports tab stop
On Sun, 07 Feb 2010 05:49:28 +, Nobody wrote:
>> The size-8 tabs look really bad in an editor configured with tab size 4,
>> as is common in Windows. I'm concluding that the CPython programmers
>> configure their Visual Studio's to *nix convention.
>
> 8-column tabs aren't a "*nix convention"
Julian writes:
> I've asked this question at stackoverflow a few weeks ago, and to make
> it clear: this should NOT be a copy of the stackoverflow-thread
> "hidden features of Python".
Thanks for the hint, interesting stuff in there.
> For those guys would be a poster quite cool which describes
On Feb 7, 5:01 pm, Tim Chase wrote:
> > Is there a way to do this, without decompressing each file to a temp
> > dir? Like is there a method using some tarfile interface adapter to
> > read a compressed file? Otherwise I'll just access each file, extract
> > it, grab the 1st and last lines and
I am having a heck of a time doing the simplest thing: installing
Python and the pywin extensions, including the PythonWin editor I have
always relied on, into my new Windows 7 Professional 64-bit OS. I
tried the Python package from python.org and pywin32 from sourceforge.
But the latter would not
On Sun, Feb 7, 2010 at 4:26 PM, escalation746 wrote:
> I am having a heck of a time doing the simplest thing: installing
> Python and the pywin extensions, including the PythonWin editor I have
> always relied on, into my new Windows 7 Professional 64-bit OS. I
> tried the Python package from pyth
On Feb 8, 1:26 am, escalation746 wrote:
> I am having a heck of a time doing the simplest thing: installing
> Python and the pywin extensions, including the PythonWin editor I have
> always relied on, into my new Windows 7 Professional 64-bit OS. I
> tried the Python package from python.org and py
Andrej Mitrovic wrote:
> Perhaps you've accidentally downloaded the wrong version of PythonWin?
Erk, yes, my bad.
Thanks for the quick help! Though I still wonder why the ActiveState
build does not include this.
-- robin
--
http://mail.python.org/mailman/listinfo/python-list
Ok, just looking for a sanity check here, or maybe something I'm
missing. I have a class Test, for example:
class Test:
def __init__(self, param1, param2, param3):
self.param1 = param1
self.param2 = param2
self.param3 = param3
Next, I have a dictionary mytest that con
On Sun, Feb 7, 2010 at 5:05 PM, T wrote:
> Ok, just looking for a sanity check here, or maybe something I'm
> missing. I have a class Test, for example:
>
> class Test:
> def __init__(self, param1, param2, param3):
> self.param1 = param1
> self.param2 = param2
> self.param
Steven D'Aprano wrote:
> On Sun, 07 Feb 2010 03:53:49 +0100, Alf P. Steinbach wrote:
>
>>> "Given the function hashlib.sha256, enumerate all the possible inputs
>>> that give the hexadecimal result
>>> 0a2591aaf3340ad92faecbc5908e74d04b51ee5d2deee78f089f1607570e2e91."
>> I tried some "parrot" vari
On Feb 7, 8:16 pm, Chris Rebert wrote:
> On Sun, Feb 7, 2010 at 5:05 PM, T wrote:
> > Ok, just looking for a sanity check here, or maybe something I'm
> > missing. I have a class Test, for example:
>
> > class Test:
> > def __init__(self, param1, param2, param3):
> > self.param1 = para
Steve Holden wrote:
Shashwat Anand wrote:
LOL
pow(funny, sys.maxint)
Yes, funny, but it overlooks the point that Xah is a nuisance to
multiple communities, not just to ours, and quite often concurrently.
I'm all in favor of tolerance, but I'd like to see some evidence that
rehabilitat
T wrote:
> Ok, just looking for a sanity check here, or maybe something I'm
> missing. I have a class Test, for example:
>
> class Test:
> def __init__(self, param1, param2, param3):
> self.param1 = param1
> self.param2 = param2
> self.param3 = param3
>
> Next, I have
Jean-Michel Pichavant wrote:
Steve Holden wrote:
Shashwat Anand wrote:
LOL
pow(funny, sys.maxint)
Yes, funny, but it overlooks the point that Xah is a nuisance to
multiple communities, not just to ours, and quite often concurrently.
I'm all in favor of tolerance, but I'd like to see s
* Chris Rebert:
On Sun, Feb 7, 2010 at 5:05 PM, T wrote:
Ok, just looking for a sanity check here, or maybe something I'm
missing. I have a class Test, for example:
class Test:
def __init__(self, param1, param2, param3):
self.param1 = param1
self.param2 = param2
self.p
Alf P. Steinbach wrote:
* Chris Rebert:
On Sun, Feb 7, 2010 at 5:05 PM, T wrote:
Ok, just looking for a sanity check here, or maybe something I'm
missing. I have a class Test, for example:
class Test:
def __init__(self, param1, param2, param3):
self.param1 = param1
self.para
* MRAB:
Alf P. Steinbach wrote:
* Chris Rebert:
On Sun, Feb 7, 2010 at 5:05 PM, T wrote:
Ok, just looking for a sanity check here, or maybe something I'm
missing. I have a class Test, for example:
class Test:
def __init__(self, param1, param2, param3):
self.param1 = param1
On Sun, 07 Feb 2010 20:19:53 -0500, Steve Holden wrote:
> Steven D'Aprano wrote:
>> On Sun, 07 Feb 2010 03:53:49 +0100, Alf P. Steinbach wrote:
>>
"Given the function hashlib.sha256, enumerate all the possible inputs
that give the hexadecimal result
0a2591aaf3340ad92faecbc5908e74d0
Alf P. Steinbach wrote:
> * MRAB:
>> Alf P. Steinbach wrote:
>>> * Chris Rebert:
On Sun, Feb 7, 2010 at 5:05 PM, T wrote:
> Ok, just looking for a sanity check here, or maybe something I'm
> missing. I have a class Test, for example:
>
> class Test:
>def __init__(self
On Feb 7, 8:57 am, Tim Chase wrote:
> Steve Holden wrote:
>
> > Really? Under what circumstances does a simple one-for-one character
> > replacement operation fail?
>
> Failure is only defined in the clarified context of what the OP
> wants :) Replacement operations only fail if the OP's desired
On Sun, Feb 7, 2010 at 5:51 PM, Alf P. Steinbach wrote:
> Incorrect; Python uses neither. See
>> http://effbot.org/zone/call-by-object.htm for a excellent explanation
>>
>> of what Python does use.
>>
>
> Hm. While most everything I've seen at effbot.org has been clear and to
> the point, that pa
On Feb 6, 1:36 pm, "hzh...@gmail.com" wrote:
> Hi,
>
> I am a fresh man with python. I know there is regular expressions in
> Python. What I need is that given a particular regular expression,
> output all the matches. For example, given “[1|2|3]{2}” as the regular
> expression, the program should
On Sun, 07 Feb 2010 22:03:06 -0500, Steve Holden wrote:
> Alf:
>
> This topic was discussed at great, nay interminable, length about a year
> ago. I'd appreciate it if you would search the archives and read what
> was said then rather than hashing the whole topic over again to nobody's
> real adv
"Alf P. Steinbach" wrote:
> Hm. While most everything I've seen at effbot.org has been clear and to the
> point, that particular article reads like a ton of obfuscation.
Must. Resist. Ad hominem.
> Python passes pointers by value, just as e.g. Java does.
>
> There, it needed just 10 words or so.
* Steve Holden:
Alf P. Steinbach wrote:
* MRAB:
Alf P. Steinbach wrote:
* Chris Rebert:
On Sun, Feb 7, 2010 at 5:05 PM, T wrote:
Ok, just looking for a sanity check here, or maybe something I'm
missing. I have a class Test, for example:
class Test:
def __init__(self, param1, param2, pa
To make the background information short, I am trying to take a
program that uses Python for scripting and recompile it for Linux
since it originally was built to run on Win32. The program itself was
designed to be able to be compiled on Linux and someone made there on
release with source that adde
On Mon, 08 Feb 2010 02:51:05 +0100, Alf P. Steinbach wrote:
> Python passes pointers by value, just as e.g. Java does.
How do I get a pointer in pure Python code (no ctypes)? I tried both
Pascal and C syntax (^x and *x), but both give syntax errors.
For that matter, how do I get a pointer in Ja
Oops, this one was my fault - the object I was having the issues with
was actually a shelve file, not a dictionary..so just re-assigning the
variable isn't working, but re-writing the object to the shelve file
does. So in this case, is there any way to just change a single
value, or am I stuck rew
Hi all,
I'm a python newbie so please excuse me if I am missing something
simple here. I am writing a script which requires a list of
dictionaries (originally a dictionary of dictionaries, but I changed
it to a list to try and overcome the below problem).
Now my understanding is that you create t
On Mon, 08 Feb 2010 03:21:11 +0100, Alf P. Steinbach wrote:
>> A pointer tells you where something is; a reference doesn't.
>
> Sorry, I don't know of any relevant terminology where that is the case.
Taken from Wikipedia:
"A pointer is a simple, less abstracted implementation of the more
abstr
* Steven D'Aprano:
On Mon, 08 Feb 2010 02:51:05 +0100, Alf P. Steinbach wrote:
Python passes pointers by value, just as e.g. Java does.
How do I get a pointer in pure Python code (no ctypes)? I tried both
Pascal and C syntax (^x and *x), but both give syntax errors.
Well, I don't believe t
>
> Please check out this example on the pyparsing wiki,
> invRegex.py:http://pyparsing.wikispaces.com/file/view/invRegex.py. This code
> implements a generator that returns successive matching strings for
> the given regex. Running it, I see that you actually have a typo in
> your example.
>
>
* Steven D'Aprano:
On Mon, 08 Feb 2010 03:21:11 +0100, Alf P. Steinbach wrote:
A pointer tells you where something is; a reference doesn't.
Sorry, I don't know of any relevant terminology where that is the case.
Taken from Wikipedia:
"A pointer is a simple, less abstracted implementation of
In article ,
Jean-Michel Pichavant wrote:
>
>So guys, just ignore him if you don't like him. Mailers & news readers
>have plenty of feature to make it happen.
Unfortunately, unless you have a stable group of people with
self-control, that doesn't work. Idiots like Xah will always get
responses
On Sun, Feb 7, 2010 at 9:08 PM, Chris Stevens wrote:
> Hi all,
>
> I'm a python newbie so please excuse me if I am missing something
> simple here. I am writing a script which requires a list of
> dictionaries (originally a dictionary of dictionaries, but I changed
> it to a list to try and overco
1 - 100 of 106 matches
Mail list logo