On Thu, Apr 19, 2012 at 4:04 PM, Cameron Simpson wrote:
> Bah! To get into a function's docstring they need to be parsed by the
> Python compiler. Ergo, not comments.
>
> Calling them comments in disguise is a bit of a stretch.
They're fundamentally the same thing as Doxygen/Javadoc/etc comments.
Ervin Hegedüs wrote:
> On Wed, Apr 18, 2012 at 10:41:00PM +0200, Peter Otten wrote:
>> Python Email wrote:
>>
>> > how do i merge two seqs alernative;
>> >
>> > ("xyz", "7890")
>> > output: x7y8z90
>>
>> >>> import itertools
>> >>> "".join(a+b for a, b in itertools.izip_longest("xyz", "7890",
Sania writes:
> So I am trying to get the number of casualties in a text. After 'death
> toll' in the text the number I need is presented as you can see from
> the variable called text. Here is my code
> I'm pretty sure my regex is correct, I think it's the group part
> that's the problem.
> I am
On 18Apr2012 23:11, Sania wrote:
| So I am trying to get the number of casualties in a text. After 'death
| toll' in the text the number I need is presented as you can see from
| the variable called text. Here is my code
| I'm pretty sure my regex is correct, I think it's the group part
| that's t
Sania wrote:
> So I am trying to get the number of casualties in a text. After 'death
> toll' in the text the number I need is presented as you can see from
> the variable called text. Here is my code
> I'm pretty sure my regex is correct, I think it's the group part
> that's the problem.
No. A r
Sania wrote:
> Hi,
> So I am trying to get the number of casualties in a text. After 'death
> toll' in the text the number I need is presented as you can see from
> the variable called text. Here is my code
> I'm pretty sure my regex is correct, I think it's the group part
> that's the problem.
N
hi,
On Wed, Apr 18, 2012 at 10:41:00PM +0200, Peter Otten wrote:
> Python Email wrote:
>
> > how do i merge two seqs alernative;
> >
> > ("xyz", "7890")
> > output: x7y8z90
>
> >>> import itertools
> >>> "".join(a+b for a, b in itertools.izip_longest("xyz", "7890",
> fillvalue=""))
> 'x7y8z90'
Hi,
So I am trying to get the number of casualties in a text. After 'death
toll' in the text the number I need is presented as you can see from
the variable called text. Here is my code
I'm pretty sure my regex is correct, I think it's the group part
that's the problem.
I am using nltk by python. G
On 19Apr2012 15:13, Chris Angelico wrote:
| On Thu, Apr 19, 2012 at 2:29 PM, Cameron Simpson wrote:
| > On 18Apr2012 22:07, Jordan Perr wrote:
| > | I came across this case while debugging some Python code that contained an
| > | error stemming from the use of multiline strings as comments. The
On Thu, Apr 19, 2012 at 2:29 PM, Cameron Simpson wrote:
> On 18Apr2012 22:07, Jordan Perr wrote:
> | I came across this case while debugging some Python code that contained an
> | error stemming from the use of multiline strings as comments. The code
> | contained a very long list of objects, and
On Thu, Apr 19, 2012 at 12:29 AM, Cameron Simpson wrote:
> I'd just do this:
>
> list = [
> Object1(arg),
> ## Object2(arg),
> ## Object3(arg),
> Object4(arg)
> ]
>
> Multiple lines of single line comments. Frankly, I find this much easier
> to see (all the disabled lines are delineated with
On Apr 11, 9:11 pm, biofob...@gmail.com wrote:
> I am new to python and only have read the Byte of Python ebook, but want to
> move to the web. I am tired of being a CMS tweaker and after I tried python,
> ruby and php, the python language makes more sense (if that makes any "sense"
> for the r
On 18Apr2012 22:07, Jordan Perr wrote:
| I came across this case while debugging some Python code that contained an
| error stemming from the use of multiline strings as comments. The code
| contained a very long list of objects, and I had commented out some of the
| objects using the multiline st
On Apr 17, 9:54 am, Bryan wrote:
> If by rebuilding your portfolio you mean to position yourself for a
> job, then popularity counts a lot. As measured by job openings, Django
> is king.
yeah i can attest to that. i never get the jobs, though :)
--
http://mail.python.org/mailman/listinfo/pyth
On Thu, 19 Apr 2012 09:31:05 +0800
contro opinion wrote:
> i have download file (gpg4win-2.1.0.exe from
> http://www.gpg4win.org/download.html)
> when i run :
>
> Type "help", "copyright", "credits" or "license" for
> >>> import md5
> >>> f=open('c:\gpg4win-2.1.0.exe','r')
> >>> print md5.new(
>>> import md5
>>> f=open('c:\gpg4win-2.1.0.exe','rb')
>>> print md5.new(f.read()).hexdigest()
ad6245f3238922bb7afdc4a6d3402a65
it is still not equal f619313cb42241d6837d20d24a814b81a1fe7f6d
please try it on your computer ,
what is wrong?
2012/4/19 Dan Sommers
> On Thu, 19 Apr 2012 09:31:05
On 19/04/2012 02:43, Jerry Hill wrote:
On Wed, Apr 18, 2012 at 9:31 PM, contro opinion wrote:
i have download file (gpg4win-2.1.0.exe from
http://www.gpg4win.org/download.html)
when i run :
Type "help", "copyright", "credits" or "license" for
import md5
f=open('c:\gpg4win-2.1.0.exe','
I came across this case while debugging some Python code that contained an
error stemming from the use of multiline strings as comments. The code
contained a very long list of objects, and I had commented out some of the
objects using the multiline string. This caused a string to be appended to
the
On Thu, 19 Apr 2012 09:31:05 +0800
contro opinion wrote:
> >>> import md5
> >>> f=open('c:\gpg4win-2.1.0.exe','r')
> >>> print md5.new(f.read()).hexdigest()
> 'd41d8cd98f00b204e9800998ecf8427e'
>
> it is not = f619313cb42241d6837d20d24a814b81a1fe7f6d
> gpg4win-2.1.0.exe please see :gpg4win-2
On Wed, Apr 18, 2012 at 9:31 PM, contro opinion wrote:
> i have download file (gpg4win-2.1.0.exe from
> http://www.gpg4win.org/download.html)
> when i run :
>
> Type "help", "copyright", "credits" or "license" for
import md5
f=open('c:\gpg4win-2.1.0.exe','r')
print md5.new(f.read(
i have download file (gpg4win-2.1.0.exe from
http://www.gpg4win.org/download.html)
when i run :
Type "help", "copyright", "credits" or "license" for
>>> import md5
>>> f=open('c:\gpg4win-2.1.0.exe','r')
>>> print md5.new(f.read()).hexdigest()
'd41d8cd98f00b204e9800998ecf8427e'
it is not = f61
On 19/04/12 08:32, Lovda, Kathryn wrote:
Hello,
I'm having trouble trying to script for a fellow graduate student who is
doing research on frogs and their homeranges. He asked me to help him by
using python to manipulate his data on ArcMap 10. Here is a summary of
the situation:
"A fellow gradu
On Wed, 18 Apr 2012 17:16:08 -0700, Miki Tebeka wrote:
>> So I'm interested in suggestions/examples where a user can update a
>> config file to specify by which means they want (in this case) the ssh
>> functionality to be supplied.
> You can do something like that (it's called a factory):
>
> CO
On Wed, 18 Apr 2012 08:56:24 -0700, cheung wrote:
> how does the function "dir" works, where can I get the python-c source
> of dir in py2.7 project.
Look for the function builtin_dir in Python/bltinmodule.c of the source
code.
> I looked the python_c source for hours, can't find how dir wor
> So I'm interested in suggestions/examples where a user can update a
> config file to specify by which means they want (in this case) the ssh
> functionality to be supplied.
You can do something like that (it's called a factory):
COMMANDS = {
'win32': 'win32 command goes here',
'linux2':
> I would like to execute shell commands, but only if their execution
> time is not longer than n seconds. Like so:
See example at http://docs.python.org/library/signal.html#example
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 19, 2:28 am, tinn...@isbd.co.uk wrote:
> Richard Shea wrote:
> > On a *nix box this is a reasonable bit of Python :
>
> > cmd = "ssh -o StrictHostKeyChecking=no -i %s %s@%s '%s' > %s" % (key,
> > user, dns, "echo CONNECTION READY", tmp_file)
> > result = os.system(cmd)
>
> > ... on a Window
Functional programing is getting the presses in mainstream. I ran
across this dialogue where a imperative coder was trying to get into
functional programing:
A: What are the design patterns that help structure functional
systems?
B: Design patterns? Hey everyone, look at the muggle try to get
Hello,
I'm having trouble trying to script for a fellow graduate student who is
doing research on frogs and their homeranges. He asked me to help him by
using python to manipulate his data on ArcMap 10. Here is a summary of the
situation:
"A fellow graduate student working in the Boone Herp
On Wed, Apr 18, 2012 at 7:02 AM, Richard Shea wrote:
> On Apr 19, 1:56 am, Irmen de Jong wrote:
> > On 18-4-2012 15:35, Richard Shea wrote:
> >
> > > ... which I think would work and be sufficiently flexible to deal with
> > > alternatives to putty.exe but is there a more established (...
> > >
On Tue, Apr 17, 2012 at 5:52 PM, Chris Angelico wrote:
>
> isatty() is supported on Windows (the underlying C API is different,
> but the beauty of a high-level language is that you no longer need to
> care), but the standard Windows console doesn't support ANSI
> sequences. I think there is a wa
On 4/18/2012 11:56 AM, cheung wrote:
how does the function "dir" works,
> where can I get the python-c source of dir in py2.7 project.
Interesting question.
The CPython source is here: hg.python.org/cpython/
From there, select branches, 2.7, and browse.
From there, Python/bltinmodule.c has so
Python Email wrote:
> how do i merge two seqs alernative;
>
> ("xyz", "7890")
> output: x7y8z90
>>> import itertools
>>> "".join(a+b for a, b in itertools.izip_longest("xyz", "7890",
fillvalue=""))
'x7y8z90'
--
http://mail.python.org/mailman/listinfo/python-list
how do i merge two seqs alernative;
("xyz", "7890")
output: x7y8z90
any help would be appreciated..
--
http://mail.python.org/mailman/listinfo/python-list
On 4/18/2012 10:22 AM, Kiuhnm wrote:
The bug was confirmed and a patch is now available:
http://bugs.python.org/issue14612
And applied to 2.7, 3.2, and 3.3.
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
There are several things I'd like to do with the exceptions.
Printing the 3rd party applications log via their own printf-like function.
Also, calling one of their functions that stores an error string on a stack.
In either case, I need access to the error string as a char*.
On Tue, Apr 17, 2012 a
On 18/04/2012 19:36, vijay swaminathan wrote:
Hi Experts,
I'm a new bie to python and need some assistance in the usage of regular
expression.
I have a string something like this:
New builds available Version: 20120418-abcdef-1 (based on SDK 0.0.0.1)
from the above string I want to ex
Hi Experts,
I'm a new bie to python and need some assistance in the usage of regular
expression.
I have a string something like this:
New builds available Version: 20120418-abcdef-1 (based on SDK 0.0.0.1)
from the above string I want to extract the following text using regular
expre
I was sent via email an alternative solution which is working even
better for me.
In Python code use:
class AppFileHandler(logging.FileHandler):
def __init__(self, *args):
filename, mode = args
if not os.path.isabs(filename):
filename = os.path.join(os.environ['APPD
Le 18/04/12 18:15, Ian Kelly a écrit :
> On Wed, Apr 18, 2012 at 9:56 AM, cheung wrote:
>> how does the function "dir" works, where can I get the python-c source of
>> dir in py2.7 project.
>>
>> I looked the python_c source for hours, can't find how dir works.
> http://hg.python.org/cpython/fi
On Wed, Apr 18, 2012 at 9:56 AM, cheung wrote:
> how does the function "dir" works, where can I get the python-c source of
> dir in py2.7 project.
>
> I looked the python_c source for hours, can't find how dir works.
http://hg.python.org/cpython/file/67be12ab8948/Objects/object.c#l1957
> for
how does the function "dir" works, where can I get the python-c source of dir
in py2.7 project.
I looked the python_c source for hours, can't find how dir works.
for example:
if a user input a *.py source file like foo.py, i wanna parse the file, and
find all the functions and all the cla
On Wed, Apr 18, 2012 at 6:35 AM, Richard Shea wrote:
> On a *nix box this is a reasonable bit of Python :
>
> cmd = "ssh -o StrictHostKeyChecking=no -i %s %s@%s '%s' > %s" % (key,
> user, dns, "echo CONNECTION READY", tmp_file)
> result = os.system(cmd)
It's slightly less reasonable considering t
On 2012-04-18, tinn...@isbd.co.uk wrote:
> Richard Shea wrote:
>> On a *nix box this is a reasonable bit of Python :
>>
>> cmd = "ssh -o StrictHostKeyChecking=no -i %s %s@%s '%s' > %s" % (key,
>> user, dns, "echo CONNECTION READY", tmp_file)
>> result = os.system(cmd)
>>
>> ... on a Windows box
Richard Shea wrote:
> On a *nix box this is a reasonable bit of Python :
>
> cmd = "ssh -o StrictHostKeyChecking=no -i %s %s@%s '%s' > %s" % (key,
> user, dns, "echo CONNECTION READY", tmp_file)
> result = os.system(cmd)
>
> ... on a Windows box it will fail because 'ssh' isn't part of Windows.
The bug was confirmed and a patch is now available:
http://bugs.python.org/issue14612
Kiuhnm
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 19, 1:56 am, Irmen de Jong wrote:
> On 18-4-2012 15:35, Richard Shea wrote:
>
> > ... which I think would work and be sufficiently flexible to deal with
> > alternatives to putty.exe but is there a more established (...
> > better !) way of doing this stuff ?
>
> Perhaps install Cygwin and
Paramiko provides SSH2 support and is platform-independent (implemented
purely in Python). Try it and see if it works for you. Link:
http://www.lag.net/paramiko/..
On 04/18/2012 04:35 PM, Richard Shea wrote:
On a *nix box this is a reasonable bit of Python :
cmd = "ssh -o StrictHostKeyCheckin
On 18-4-2012 15:35, Richard Shea wrote:
> ... which I think would work and be sufficiently flexible to deal with
> alternatives to putty.exe but is there a more established (...
> better !) way of doing this stuff ?
Perhaps install Cygwin and use its ssh.exe?
Or use the paramiko library? (which, I
On a *nix box this is a reasonable bit of Python :
cmd = "ssh -o StrictHostKeyChecking=no -i %s %s@%s '%s' > %s" % (key,
user, dns, "echo CONNECTION READY", tmp_file)
result = os.system(cmd)
... on a Windows box it will fail because 'ssh' isn't part of Windows.
There *are* ways of achieving the
Hello,
I am using python 2.7 and kinterbasdb. How could I find out default
charset used by database? I need to check it and then according to
used charset decode returned strings. thank you
--
http://mail.python.org/mailman/listinfo/python-list
http://pypi.python.org/pypi/Pyjamas-GitWeb/0.1
Pyjamas-Gitweb is a pure python git repository browser, comprising an
independent JSONRPC back-end service written in 130 lines that can be
used by any JSONRPC client (a python command-line example is
included), and a front-end python (pyjamas) writte
Alek Storm gmail.com> writes:
>
> Connecting with either Firefox 11 or Chrome (which both support NPN) causes
> this to print None, rather than a protocol name. What's going on?
Ok, I've just tried with Firefox 11. You have to go in "about:config" and set
"network.http.spdy.enabled" to true. The
On 4/18/2012 6:47, Hans Mulder wrote:
On 18/04/12 03:08:08, Kiuhnm wrote:
print(1)
print(2)
print(3)
with open('test') as f:
data = f.read()
with open('test') as f:
data = f.read()
I get the same result with Pythin 3.3.0a0 on MacOS X 10.6:
93> ./python.exe -m pdb /tmp/script.py
/
Terry randomly wrote:
> > Pyjamas is slowly converting to running its own infrastructure using pyjamas
> > applications (which also operate as Desktop applications). This includes:
> >
> > * http://pyjs.org/pygit/ - a git repository viewer using python-git
> seems to work fine
yaay. thanks fo
Jeffrey Britton wrote:
Hi,
An alternative is to subclass FileHandler with a handler customized for your
app.
class AppFileHandler(FileHandler):
def __init__(filename):
if not os.path.isabs(filename):
filename = os.path.join(os.environ['APPDATA'], 'whateverdir',
filename)
Fil
56 matches
Mail list logo