> This works great! Do you or anyone else have information on how to do
> the same thing for Windows and/or Solaris.
On Windows, just associate the .pyc extension with Python - the standard
installation will already do that.
On Solaris, I don't think something like this is supported.
Regards,
Ma
On Jan 15, 3:41 pm, Paul McGuire wrote:
> I never represented that this parser would handle any and all Excel
> formulas!
> But I should hope the basic structure of a pyparsing
> solution might help the OP add some of the other features you cited,
> if necessary. It's actually pretty common to ta
I'm trying to create a program that will process files dragged into
its window, however I can't seem to get the cursor to change correctly
when something is dragged over the window. I've created an object that
implements the IDropTarget interface, but it seems the value returned
by its DragEnter me
It has occurred to me that the error may have nothing to do with ctypes. The
DLL was built on one machine and copied to the other (which doesn't have the
compiler installed). Although both machines are running Windows XP, there might
be some subtle differences.
I see that the build machine h
I have a simple demo program (on Windows XP) that uses the ctypes module to load
a DLL. This program works as expected with Python 2.5.4, but fails with Python
2.6.4 (on a different machine, each machine has only one Python version
installed), with these messages:
File "demo.py", line 37, in
Hello All,
i was encoutered some problem while im using mechanize.Browser() with proxy
handling function.
i have working snippet of script about mechanize.urlopen, but i don't know
how to implement with mechanize.Brower module.
if anyone can show me some sample?
if anyone help me much appreciat
* Steve Holden:
Alf P. Steinbach wrote:
[...]
Perhaps you'd also admit to being wrong, and retract your innuoendo etc.?
Disregarding any matters of right or wrong (for this post, at least), I
herebe retract anything I have said about you that you consider
innuendo.
OK.
Feel free to remind
I have a txt file in the following format:
[code]
"confident" => {
count => 4,
trans => {
"ashahvasahta" => 0.74918568,
"atahmavaishahvaasa" => 0.09095465,
"pahraaram\.nbha" => 0.06990729,
"mailatae" => 0.02856427,
"utanai" => 0.01929341,
"anaa" =>
I never represented that this parser would handle any and all Excel
formulas! But I should hope the basic structure of a pyparsing
solution might help the OP add some of the other features you cited,
if necessary. It's actually pretty common to take an incremental
approach in making such a parser,
Alf P. Steinbach wrote:
[...]
> Perhaps you'd also admit to being wrong, and retract your innuoendo etc.?
>
Disregarding any matters of right or wrong (for this post, at least), I
herebe retract anything I have said about you that you consider
innuendo. Feel free to remind me what that was.
regar
Alf P. Steinbach wrote:
> * Steve Holden:
>> Alf P. Steinbach wrote:
>>> * Lie Ryan:
On 01/15/10 05:42, Alf P. Steinbach wrote:
> I'm beginning to believe that you maybe didn't grok that simple
> procedure.
>
> It's very very very trivial, so maybe you were looking for somethin
* Steve Holden:
Alf P. Steinbach wrote:
* Lie Ryan:
On 01/15/10 05:42, Alf P. Steinbach wrote:
I'm beginning to believe that you maybe didn't grok that simple
procedure.
It's very very very trivial, so maybe you were looking for something
more intricate -- they used to say, in the old days,
Paul Rubin wrote:
> Novocastrian_Nomad writes:
>> I know whereof I speak, I have been fortunate enough to work remotely
>> (across the country) for the last ten years, for two different employers.
>
> Some like working remotely, others don't. I had to work remotely for my
> last couple of jobs.
Ethan Furman wrote:
> CM wrote:
>> On Dec 26 2009, 3:46 pm, Shawn Milochik wrote:
>>> The special features of the Shrek DVD showed how the rendering took
>>> so much processing power that everyone's workstation was used
>>> overnight as a rendering farm. Some kind of video rendering would
>>> make
Alf P. Steinbach wrote:
> * Lie Ryan:
>> On 01/15/10 05:42, Alf P. Steinbach wrote:
>>> I'm beginning to believe that you maybe didn't grok that simple
>>> procedure.
>>>
>>> It's very very very trivial, so maybe you were looking for something
>>> more intricate -- they used to say, in the old da
Paul Boddie wrote:
> On 28 Des 2009, 08:32, Andrew Jonathan Fine
> wrote:
>> As a hobby to keep me sane, I am attempting to retrain
>> part time at home as a jeweler and silversmith, and I sometimes used
>> Python for generating and manipulating code for CNC machines.
>
> It occurs
Paul Rubin wrote:
> a...@pythoncraft.com (Aahz) writes:
>> Incidentally, my company has had a fair amount of difficulty finding
>> Python programmers -- anyone in the SF area looking for a job near
>> Mountain View?
>
> I'm surprised there aren't a ton of Python programmers there, given
> that's w
* Lie Ryan:
On 01/15/10 05:42, Alf P. Steinbach wrote:
I'm beginning to believe that you maybe didn't grok that simple procedure.
It's very very very trivial, so maybe you were looking for something
more intricate -- they used to say, in the old days, "hold on, this
proof goes by so fast you
Novocastrian_Nomad writes:
> I know whereof I speak, I have been fortunate enough to work remotely
> (across the country) for the last ten years, for two different employers.
Some like working remotely, others don't. I had to work remotely for my
last couple of jobs. I hated it. I want to actu
Zabin,
The QDoubleValidator class works, but it allows 'intermediate' values
to show in the widget. This problem has been addressed here:
http://qt.nokia.com/developer/faqs/faq.2006-05-15.0450651751, I just
tried to implement this in PyQt again, and it worked! =P
I've posted the working code here
Pierre Quentel wrote:
On 12 jan, 04:26, Alan Harris-Reid wrote:
Hi,
Does anyone know where I can find any decent dynamically-constructed
HTML control classes (dropdown list, table, input field, checkbox, etc.)
written in Python. For example, for a HTML table I would like something
like...
Wolfram Hinderer wrote:
On 14 Jan., 19:48, MRAB wrote:
Arnaud Delobelle wrote:
"D'Arcy J.M. Cain" writes:
On Thu, 14 Jan 2010 09:07:47 -0800
Chris Rebert wrote:
Even more succinctly:
def ishex(s):
return all(c in string.hexdigits for c in s)
I'll see your two-liner and raise you. :-)
On 14 Jan., 19:48, MRAB wrote:
> Arnaud Delobelle wrote:
> > "D'Arcy J.M. Cain" writes:
>
> >> On Thu, 14 Jan 2010 09:07:47 -0800
> >> Chris Rebert wrote:
> >>> Even more succinctly:
>
> >>> def ishex(s):
> >>> return all(c in string.hexdigits for c in s)
> >> I'll see your two-liner and rai
On Thu, 14 Jan 2010 18:36:12 +, MRAB wrote:
>> And here are your unit tests. Every line should print "True".
>>
>> print ishex('123') is True
>> print ishex('abc') is True
>> print ishex('xyz') is False
>> print ishex('0123456789abcdefABCDEF') is True
>> print ishex('0123456789abcdefABCDEFG
* Lie Ryan:
On 01/15/10 05:42, Alf P. Steinbach wrote:
I'm beginning to believe that you maybe didn't grok that simple procedure.
It's very very very trivial, so maybe you were looking for something
more intricate -- they used to say, in the old days, "hold on, this
proof goes by so fast you
On Jan 14, 2:05 pm, "Gabriel Genellina"
wrote:
> En Wed, 13 Jan 2010 05:15:52 -0300, Paul McGuire
> escribió:
>
> >> vsoler wrote:
> >> > Hence, I need toparseExcel formulas. Can I do it by means only of re
> >> > (regular expressions)?
>
> > This might give the OP a running start:
>
> > from p
On Jan 13, 7:15 pm, Paul McGuire wrote:
> On Jan 5, 1:49 pm, Tim Chase wrote:
>
>
>
> > vsoler wrote:
> > > Hence, I need toparseExcel formulas. Can I do it by means only of re
> > > (regular expressions)?
>
> > > I know that for simple formulas such as "=3*A7+5" it is indeed
> > > possible. What
On 01/15/10 09:33, Martin v. Loewis wrote:
>
> P.S. The approach you present for Lua indeed does not work for
> Python.
Actually the approach should work, though with a little workaround; you
can write your wrapper (e.g. #!/usr/bin/mypython) that simply strips the
first line and pass the file to
In article ,
D'Arcy J.M. Cain wrote:
>
>try: x = isinstance(s, int) and s or int(s, 0)
>except ValueError: [handle invalid input]
Why aren't you using the ternary?
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/
"If you think it's expensive to hire a professiona
On Jan 14, 5:33 pm, "Martin v. Loewis" wrote:
> > I've been playing with "Lua" and found something really cool that I'm
> > unable to do in "Python". With "Lua", a script can be compiled to byte
> > code using "luac" and by adding "#!/usr/bin/lua" at the top of the
> > binary, the byte code become
Aahz wrote:
In article <6a12ed15-e7f9-43ab-9b90-984525808...@o28g2000yqh.googlegroups.com>,
Novocastrian_Nomad wrote:
Why is it so many, so called high tech companies, insist on the 19th
century practice of demanding an employee's physical presence in a
specific geographic location.
Because
On Jan 2, 9:35 pm, Dave Angel wrote:
> Steven D'Aprano wrote:
> > On Sat, 02 Jan 2010 09:40:44 -0800, Aahz wrote:
>
> >> OTOH, if you want to do something different depending on whether the
> >> file exists, you need to use both approaches:
>
> >> if os.path.exists(fname):
> >> try:
> >>
CM wrote:
On Dec 26 2009, 3:46 pm, Shawn Milochik wrote:
The special features of the Shrek DVD showed how the rendering took so much processing
power that everyone's workstation was used overnight as a rendering farm. Some kind of
video rendering would make a great example. However, it might
On 28 Des 2009, 08:32, Andrew Jonathan Fine
wrote:
>
> As a hobby to keep me sane, I am attempting to retrain
> part time at home as a jeweler and silversmith, and I sometimes used
> Python for generating and manipulating code for CNC machines.
It occurs to me that in some domains,
In article <6a12ed15-e7f9-43ab-9b90-984525808...@o28g2000yqh.googlegroups.com>,
Novocastrian_Nomad wrote:
>
>Why is it so many, so called high tech companies, insist on the 19th
>century practice of demanding an employee's physical presence in a
>specific geographic location.
Because it works be
On 01/14/10 22:21, luis wrote:
>
> Hi
>
> I am not an expert in programming and using Python for its simplicity
>
> I have 2 versions of python installed on my computer (windos xp) to
> begin the transition from version 2.4 to 2.6 or 3. maintaining the
> operability of my old scripts
>
> Is the
> I've been playing with "Lua" and found something really cool that I'm
> unable to do in "Python". With "Lua", a script can be compiled to byte
> code using "luac" and by adding "#!/usr/bin/lua" at the top of the
> binary, the byte code becomes a single file executable. After I found
> this trick,
On Dec 26 2009, 3:46 pm, Shawn Milochik wrote:
> The special features of the Shrek DVD showed how the rendering took so much
> processing power that everyone's workstation was used overnight as a
> rendering farm. Some kind of video rendering would make a great example.
> However, it might be a
On behalf of the Python development team and the Python community, I'm
happy to announce the release candidate 1 of Python 2.5.5.
This is a source-only release that only includes security fixes. The
last full bug-fix release of Python 2.5 was Python 2.5.4. Users are
encouraged to upgrade to the la
Arnaud Delobelle wrote:
MRAB writes:
Arnaud Delobelle wrote:
"D'Arcy J.M. Cain" writes:
On Thu, 14 Jan 2010 09:07:47 -0800
Chris Rebert wrote:
Even more succinctly:
def ishex(s):
return all(c in string.hexdigits for c in s)
I'll see your two-liner and raise you. :-)
ishex = lambd
On Thu, 14 Jan 2010 17:13:54 -, Reckoner wrote:
I am studying some examples in a tutorial where there are a lot of
leading >>> characters and ellipsis in the text. This makes it hard to
cut and paste into the IPython interpreter since it doesn't like these
strings.
Is there another interpr
On 01/15/10 05:42, Alf P. Steinbach wrote:
> I'm beginning to believe that you maybe didn't grok that simple procedure.
>
> It's very very very trivial, so maybe you were looking for something
> more intricate -- they used to say, in the old days, "hold on, this
> proof goes by so fast you may n
Does anyone know of any SAGE support or help newsgroups or email lists?
I know this is not a SAGE group and there is at least one support group
for SAGE (http://groups.google.com/group/sage-support/), but I have gone
there and asked similar questions twice and gotten zero replies (it's
been abo
Why is it so many, so called high tech companies, insist on the 19th
century practice of demanding an employee's physical presence in a
specific geographic location.
This is the 21st century with climate change, carbon footprints,
broadband internet, telecommuting, tele-presence, telephones, fax
m
On 1/14/10 3:39 PM, Peter wrote:
On Jan 15, 6:24 am, Mark Roseman wrote:
Peter wrote:
Besides, the book is mainly about using Python with Tkinter - and
Tkinter hasn't changed that much since 2000, so I believe it is just
as relevant today as it was back then.
I'd say that Tkinter has subs
On 1/14/2010 12:44 PM, D'Arcy J.M. Cain wrote:
On Thu, 14 Jan 2010 09:07:47 -0800
Chris Rebert wrote:
Even more succinctly:
def ishex(s):
return all(c in string.hexdigits for c in s)
I'll see your two-liner and raise you. :-)
ishex = lambda s: all(c in string.hexdigits for c in s)
T
All:
I've been playing with "Lua" and found something really cool that I'm
unable to do in "Python". With "Lua", a script can be compiled to byte
code using "luac" and by adding "#!/usr/bin/lua" at the top of the
binary, the byte code becomes a single file executable. After I found
this trick, I r
In article <034fd208$0$1277$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
>On Sat, 02 Jan 2010 09:40:44 -0800, Aahz wrote:
>>
>> OTOH, if you want to do something different depending on whether the
>> file exists, you need to use both approaches:
>>
>> if os.path.exists(fname):
>> try:
On Thu, 14 Jan 2010 22:09:20 +0100, News123 wrote:
> Hi,
>
> As you wll notice: I don't have a lot of GUI and only very litte
> PyQT-experience.
>
>
> I have a UI created with qt designer.
>
> The UI contains a few named radio buttons in a button group.
> ( for example radioButton_one to radio
Hi,
As you wll notice: I don't have a lot of GUI and only very litte
PyQT-experience.
I have a UI created with qt designer.
The UI contains a few named radio buttons in a button group.
( for example radioButton_one to radioButton_four )
I am unable locate a signal, that is fired whenever one
On Jan 15, 6:24 am, Mark Roseman wrote:
> Peter wrote:
> > Besides, the book is mainly about using Python with Tkinter - and
> > Tkinter hasn't changed that much since 2000, so I believe it is just
> > as relevant today as it was back then.
>
> I'd say that Tkinter has substantially changed - wi
MRAB writes:
> Arnaud Delobelle wrote:
>> "D'Arcy J.M. Cain" writes:
>>
>>> On Thu, 14 Jan 2010 09:07:47 -0800
>>> Chris Rebert wrote:
Even more succinctly:
def ishex(s):
return all(c in string.hexdigits for c in s)
>>> I'll see your two-liner and raise you. :-)
>>>
>>>
On 08:15 pm, da...@druid.net wrote:
On 14 Jan 2010 19:19:53 GMT
Duncan Booth wrote:
> ishex2 = lambda s: not(set(s)-set(string.hexdigits)) # Yours
> ishex3 = lambda s: not set(s)-set(string.hexdigits) # Mine
>
> I could actually go three better:
>
> ishex3=lambda s:not set(s)-set(strin
In article <7x4omosdly@ruckus.brouhaha.com>,
Paul Rubin wrote:
>a...@pythoncraft.com (Aahz) writes:
>>
>> Incidentally, my company has had a fair amount of difficulty finding
>> Python programmers -- anyone in the SF area looking for a job near
>> Mountain View?
>
>I'm surprised there aren't
In article ,
Robert Kern wrote:
>On 2010-01-14 13:14 PM, Paul Rubin wrote:
>> a...@pythoncraft.com (Aahz) writes:
>>>
>>> Incidentally, my company has had a fair amount of difficulty finding
>>> Python programmers -- anyone in the SF area looking for a job near
>>> Mountain View?
>>
>> I'm surpri
On Thu, 14 Jan 2010 18:36:12 +
MRAB wrote:
> > print ishex('123') is True
> > print ishex('abc') is True
> > print ishex('xyz') is False
> > print ishex('0123456789abcdefABCDEF') is True
> > print ishex('0123456789abcdefABCDEFG') is False
> >
> Don't use 'is', use '=='.
Why? There is only o
On 14 Jan 2010 19:19:53 GMT
Duncan Booth wrote:
> > ishex2 = lambda s: not(set(s)-set(string.hexdigits)) # Yours
> > ishex3 = lambda s: not set(s)-set(string.hexdigits) # Mine
> >
> > I could actually go three better:
> >
> > ishex3=lambda s:not set(s)-set(string.hexdigits)
>
> But non
How about you just isolate the first few lines
On Thu, Jan 14, 2010 at 2:43 PM, Ray Holt wrote:
> try:
> #open file stream
> file = open(file_name, "w"
> except IOError:
> print "There was an error writing to", file_name
> sys.exit()
Notice anything now? Something missing perhaps
Ray Holt wrote:
Why am I getting an invalid systax on the first except in the following
code. It was copid from the python tutorial for beginners. Thanks, Ray
import sys
try:
#open file stream
file = open(file_name, "w"
[snip]
Missing ")".
--
http://mail.python.org/mailman/listinfo/py
Oltmans wrote:
def test_first(self):
print 'first test'
process(123)
All test cases use the pattern "Assemble Activate Assert".
You are assembling a 123, and activating process(), but where is your assert? If
it is inside process() (if process is a test-side method), then
Duncan Booth wrote:
MRAB wrote:
I raise you one character:
ishex2 = lambda s: not(set(s)-set(string.hexdigits)) # Yours
ishex3 = lambda s: not set(s)-set(string.hexdigits) # Mine
I could actually go three better:
ishex3=lambda s:not set(s)-set(string.hexdigits)
But none of those
Why am I getting an invalid systax on the first except in the following
code. It was copid from the python tutorial for beginners. Thanks, Ray
import sys
try:
#open file stream
file = open(file_name, "w"
except IOError:
print "There was an error writing to", file_name
sys.exit()
pri
Paul Rubin wrote:
a...@pythoncraft.com (Aahz) writes:
Incidentally, my company has had a fair amount of difficulty finding
Python programmers -- anyone in the SF area looking for a job near
Mountain View?
I'm surprised there aren't a ton of Python programmers there, given
that's where
On 2010-01-14 13:14 PM, Paul Rubin wrote:
a...@pythoncraft.com (Aahz) writes:
Incidentally, my company has had a fair amount of difficulty finding
Python programmers -- anyone in the SF area looking for a job near
Mountain View?
I'm surprised there aren't a ton of Python programmers there, giv
Phlip wrote:
MRAB wrote:
BTW, ishex('') should return False.
So should int('')!
Did you mean isint('') ?
JM
--
http://mail.python.org/mailman/listinfo/python-list
Peter wrote:
> Besides, the book is mainly about using Python with Tkinter - and
> Tkinter hasn't changed that much since 2000, so I believe it is just
> as relevant today as it was back then.
I'd say that Tkinter has substantially changed - with the introduction
of the 'ttk' themed widgets.
MRAB wrote:
> I raise you one character:
>
> ishex2 = lambda s: not(set(s)-set(string.hexdigits)) # Yours
> ishex3 = lambda s: not set(s)-set(string.hexdigits) # Mine
>
> I could actually go three better:
>
> ishex3=lambda s:not set(s)-set(string.hexdigits)
But none of those pass you
a...@pythoncraft.com (Aahz) writes:
> Incidentally, my company has had a fair amount of difficulty finding
> Python programmers -- anyone in the SF area looking for a job near
> Mountain View?
I'm surprised there aren't a ton of Python programmers there, given
that's where Brand G is and so forth.
>The python 3 version in the 9.10 repo is 3.1.1
>
>Actually, if I/O is important, I'd recommend a full install of 9.10 so that
>you can get the ext4 file system. I have found it offers some very
>impressive speedups with the disk -- especially for deleting files.
Thanks casevh and Lee.
I intend to
On Jan 14, 11:46 pm, exar...@twistedmatrix.com wrote:
> When you run test.py, it gets to the loadTestsFromName line. There, it
> imports the module named "test" in order to load tests from it. To
> import
> that module, it runs test.py again. By the time it finishes running the
> contents of t
Phlip wrote:
MRAB wrote:
BTW, ishex('') should return False.
So should int('')!
Why?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Lee & casevh.
I'm going to remove all python 3 versions, update
to Ubuntu 9.10 and then do a clean installation of
python 3.1.1 via Synaptic. Dave WB3DWE
--
http://mail.python.org/mailman/listinfo/python-list
Arnaud Delobelle wrote:
"D'Arcy J.M. Cain" writes:
On Thu, 14 Jan 2010 09:07:47 -0800
Chris Rebert wrote:
Even more succinctly:
def ishex(s):
return all(c in string.hexdigits for c in s)
I'll see your two-liner and raise you. :-)
ishex = lambda s: all(c in string.hexdigits for c in s
On 06:33 pm, rolf.oltm...@gmail.com wrote:
Hi Python gurus,
I'm quite new to Python and have a problem. Following code resides in
a file named test.py
---
import unittest
class result(unittest.TestResult):
pass
class tee(unittest.TestCase):
def test_first(self):
print 'first te
* Steve Holden:
Alf P. Steinbach wrote:
* Steve Holden:
Grant Edwards wrote:
On 2010-01-14, Alf P. Steinbach wrote:
[bogus hand-waving]
After all, it's the basis of digital representation of sound!
Huh? I've only studied basic DSP, but I've never heard/seen
that as the basis of digital re
MRAB wrote:
BTW, ishex('') should return False.
So should int('')!
--
http://mail.python.org/mailman/listinfo/python-list
D'Arcy J.M. Cain wrote:
On Thu, 14 Jan 2010 07:52:58 -0800 (PST)
chandra wrote:
Folks,
I am new to Python and could not find a function along the lines of
Welcome.
string.ishex in Python. There is however, a string.hexdigits constant
in the string module. I thought I would enhance the exis
Hi Python gurus,
I'm quite new to Python and have a problem. Following code resides in
a file named test.py
---
import unittest
class result(unittest.TestResult):
pass
class tee(unittest.TestCase):
def test_first(self):
print 'first test'
print '-'
def
"D'Arcy J.M. Cain" writes:
> On Thu, 14 Jan 2010 09:07:47 -0800
> Chris Rebert wrote:
>> Even more succinctly:
>>
>> def ishex(s):
>> return all(c in string.hexdigits for c in s)
>
> I'll see your two-liner and raise you. :-)
>
> ishex = lambda s: all(c in string.hexdigits for c in s)
I's
On Dec 26 2009, 2:06 pm, Tim Golden wrote:
> I'm trying to work up a programming course using Python,
> aimed at secondary school students [*] here in London. One
> of my aims is to have a series of compact but functional
> examples, each demonstrating a particular field in which
> Python (and pro
Alf P. Steinbach wrote:
> * Steve Holden:
>> Grant Edwards wrote:
>>> On 2010-01-14, Alf P. Steinbach wrote:
>> [bogus hand-waving]
After all, it's the basis of digital representation of sound!
>>> Huh? I've only studied basic DSP, but I've never heard/seen
>>> that as the basis of digital r
> I'd like to start with two dates as strings, as
> "1961/06/16 04:35:25" and "1973/01/18 03:45:50"
> How do I get the strings into a shape that will accommodate a difference?
Pyfdate http://www.ferg.org/pyfdate/index.html
has a numsplit function that should do the trick:
http://www.ferg.org/pyf
Iain King wrote:
> better would be:
> def ishex(s):
> for c in s:
> if c not in string.hexdigits:
> return False
> return True
Even more elegant and probably a faster solutions:
---
from string import hexdigits
hexdigits = frozenset(hexdigits)
def ishex(s):
return
luis wrote:
> Hi
>
> I am not an expert in programming and using Python for its simplicity
>
> I have 2 versions of python installed on my computer (windos xp) to
> begin the transition from version 2.4 to 2.6 or 3. maintaining the
> operability of my old scripts
>
> Is there any way to indicate
João wrote:
> On Jan 12, 10:07 pm, r0g wrote:
>> João wrote:
>
> for the following data,
> authentication = "UID=somestring&"
> message = 'PROBLEM severity High: OperatorX Plat1(locationY) global
> Succ. : 94.47%'
> dest_number = 'XXX'
>
> url_values = urlencode({'M':message})
> enc_
On Thu, 14 Jan 2010 09:07:47 -0800
Chris Rebert wrote:
> Even more succinctly:
>
> def ishex(s):
> return all(c in string.hexdigits for c in s)
I'll see your two-liner and raise you. :-)
ishex = lambda s: all(c in string.hexdigits for c in s)
--
D'Arcy J.M. Cain | Democracy is
Hello,
I think that's exactly what the cpaste magic function does. Type
'cpaste?' in your IPython session for more information.
Best regards,
Javier
2010/1/14 Reckoner :
>
> Hi,
>
> I am studying some examples in a tutorial where there are a lot of
> leading >>> characters and ellipsis in th
* Steve Holden:
Grant Edwards wrote:
On 2010-01-14, Alf P. Steinbach wrote:
[bogus hand-waving]
After all, it's the basis of digital representation of sound!
Huh? I've only studied basic DSP, but I've never heard/seen
that as the basis of digital represention of sound. I've also
never seen
Hello,
I have a newbie question about using matplotlib
I would like to draw the surface defined by the lists X, Y and the
matrix Z.
I get to a nice graphical output with the following code.
My problem is that the labels on the axes indicate values
corresponding to the indices in Tables X and Y.
I w
Hi,
I am studying some examples in a tutorial where there are a lot of
leading >>> characters and ellipsis in the text. This makes it hard to
cut and paste into the IPython interpreter since it doesn't like these
strings.
Is there another interpreter I could use that will appropriately
ignore an
chandra wrote:
> On Jan 15, 12:22 am, "D'Arcy J.M. Cain" wrote:
>
>> Just return False once you find a non-hex digit.
>>
>> def ishex(s):
>> for c in s:
>> if not c in string.hexdigits: return False
>>
>> return True
>>
>> And here are your unit tests. Every line should print "True".
>>
Grant Edwards wrote:
> On 2010-01-14, Alf P. Steinbach wrote:
[bogus hand-waving]
>> After all, it's the basis of digital representation of sound!
>
> Huh? I've only studied basic DSP, but I've never heard/seen
> that as the basis of digital represention of sound. I've also
> never seen that re
On Thu, Jan 14, 2010 at 8:14 AM, Iain King wrote:
> On Jan 14, 3:52 pm, chandra wrote:
>> Folks,
>>
>> I am new to Python and could not find a function along the lines of
>> string.ishex in Python. There is however, a string.hexdigits constant
>> in the string module. I thought I would enhance th
* Grant Edwards:
On 2010-01-14, Alf P. Steinbach wrote:
It's not clear to me that you can approximate any waveform
with a suitable combination of square waves,
Oh. It's simple to prove. At least conceptually! :-)
[...]
With the goal of just a rough approximation you can go about
it like t
trzewiczek writes:
> On 01/13/2010 05:09 PM, Arnaud Delobelle wrote:
[...]
>> Sure, here are some example of self-evaluating python objects,
>> i.e. for each v below,
>>
>> v == eval(v)
>>
>> I'm quite proud of the last one.
[...]
>> v = "\"%s\" %% ((r\"%s\",)*2)" % ((r"\"%s\" %% ((r\"%s\
On 2010-01-14, Alf P. Steinbach wrote:
>> It's not clear to me that you can approximate any waveform
>> with a suitable combination of square waves,
>
> Oh. It's simple to prove. At least conceptually! :-)
[...]
> With the goal of just a rough approximation you can go about
> it like this:
>
>
Hi,
I try to login, but I get this exception:
File "/home/foo/django/core/mail.py", line 137, in open
self.connection.login(self.username, self.password)
File "/home/foo/smtplib.py", line 587, in login
raise SMTPException("No suitable authentication method found.")
Trace from tcpdum
On Jan 15, 12:22 am, "D'Arcy J.M. Cain" wrote:
> Just return False once you find a non-hex digit.
>
> def ishex(s):
> for c in s:
> if not c in string.hexdigits: return False
>
> return True
>
> And here are your unit tests. Every line should print "True".
>
> print ishex('123') is True
* Peter Otten:
Alf P. Steinbach wrote:
Just as a contribution, since someone hinted that I haven't really
contributed much to the Python community.
The [simple_sound] code will probably go into my ch 3 at http://tinyurl.com/programmingbookP3>, but sans sine wave generation since
I haven't yet
On Thu, 14 Jan 2010 07:52:58 -0800 (PST)
chandra wrote:
> Folks,
>
> I am new to Python and could not find a function along the lines of
Welcome.
> string.ishex in Python. There is however, a string.hexdigits constant
> in the string module. I thought I would enhance the existing modlue
> but a
1 - 100 of 131 matches
Mail list logo