>>> sys.version
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> s = 'Straße'
>>> assert len(s) == 6
>>> assert s[5] == 'e'
>>>
jmf
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, January 12, 2014 7:04:04 AM UTC+1, Chris Angelico wrote:
> On Sun, Jan 12, 2014 at 4:14 PM, ngangsia akumbo wrote:
i am not sure i will give up, i will start with a small app for stock registry.
>From there i think the others will come latter.
>From the info u have given me , i will c
On Sat, Jan 11, 2014 at 9:44 PM, Ethan Furman wrote:
> On 01/11/2014 06:19 PM, Daniel da Silva wrote:
>
>>
>> One use case is:
>> Suppose you have existing function that accepts a /bytes/ object. If you
>> subclass /bytes/ and want it to be guaranteed
>> to work with that function, you can overri
On Sun, Jan 12, 2014 at 4:14 PM, ngangsia akumbo wrote:
> What options do you think i can give the Ceo. Because from what you have
> outline, i think i will like to follow your advice.
>
> If it is just some recording data stuff then some spreadsheet can do the work.
>
> From all indication it is
On Sun, Jan 12, 2014 at 4:08 PM, Steve Hayes wrote:
> So the question is, which kinds of programs is Python best for?
>
> I'm a novice at it, so it's a question that concerns me. From what I've heard
> and read, it seems to be a fairly good general-purpose language, and it seems
> to be most used
On 01/11/2014 08:56 PM, Daniel da Silva wrote:
I agree with you that realistic use cases are hard to think of.
Does that answer your question better?
Well, since I was asking if anybody was already using the feature, no. ;)
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, January 11, 2014 11:10:20 PM UTC+1, Dennis Lee Bieber wrote:
> On Sat, 11 Jan 2014 09:55:57 -0800 (PST), ngangsia akumbo
>
> declaimed the following:
What options do you think i can give the Ceo. Because from what you have
outline, i think i will like to follow your advice.
If i
On Sat, 11 Jan 2014 10:45:53 -0500, Roy Smith wrote:
>In article <18b67e59-39d1-41e2-8977-b1c449b13...@googlegroups.com>,
> pintreo mardi wrote:
>
>> Hi, I've just begun to learn programming, I have an open question for the
>> group:
>> Is the Python language an all in one computer language whi
In article ,
"W. Trevor King" wrote:
> On Sat, Jan 11, 2014 at 08:00:05PM -0800, CraftyTech wrote:
> > I'm finding it hard to use unittest in a for loop. Perhaps something like:
> >
> > for val in range(25):
> > self.assertEqual(val,5,"not equal)
> >
> > The loop will break after the first
On Sat, Jan 11, 2014 at 08:00:05PM -0800, CraftyTech wrote:
> I'm finding it hard to use unittest in a for loop. Perhaps something like:
>
> for val in range(25):
> self.assertEqual(val,5,"not equal)
>
> The loop will break after the first failure. Anyone have a good
> approach for this? ple
CraftyTech writes:
> I'm trying parametize my unittest so that I can re-use over and over,
> perhaps in a for loop.
The ‘testscenarios’ https://pypi.python.org/pypi/testscenarios>
library allows you to define a set of data scenarios on your
FooBarTestCase and have all the test case functions in
hello all,
I'm trying parametize my unittest so that I can re-use over and over,
perhaps in a for loop. Consider the following:
'''
import unittest
class TestCalc(unittest.TestCase):
def testAdd(self):
self.assertEqual(7, 7, "Didn't add up")
if __name__=="__ma
One use case is:
Suppose you have existing function that accepts a *bytes* object. If you
subclass *bytes* and want it to be guaranteed to work with that function,
you can override* __bytes__()* to use the logistics of your subclass
implementation.
On Sat, Jan 11, 2014 at 7:56 PM, Ethan Furman w
On 01/11/2014 06:19 PM, Daniel da Silva wrote:
One use case is:
Suppose you have existing function that accepts a /bytes/ object. If you
subclass /bytes/ and want it to be guaranteed
to work with that function, you can override/__bytes__()/ to use the logistics
of your subclass implementation.
On Sat, Jan 11, 2014 at 12:07 AM, pintreo mardi wrote:
> Hi, I've just begun to learn programming, I have an open question for the
> group:
> Is the Python language an all in one computer language which could replace C,
> C++, Java etc.. I only ask becuase I am starting off with python and I wan
On 1/11/14 8:28 PM, Sam wrote:
I have python modules which are used only in specific functions and the
functions are not called all the time. Is it better to import the function
inside the function only or is it a better practice to always import all
modules at the top of the script? If I impo
On Sun, Jan 12, 2014 at 12:28 PM, Sam wrote:
> I have python modules which are used only in specific functions and the
> functions are not called all the time. Is it better to import the function
> inside the function only or is it a better practice to always import all
> modules at the top of
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2014-01-11, 08:07 GMT, you wrote:
> Hi, I've just begun to learn programming, I have an open question for the
> group:
> Is the Python language an all in one computer language which could replace C,
> C++, Java etc.. I only ask becuase I am starti
I have python modules which are used only in specific functions and the
functions are not called all the time. Is it better to import the function
inside the function only or is it a better practice to always import all
modules at the top of the script? If I import the module inside the function
On Sunday, January 12, 2014 12:34:35 AM UTC+8, Michael Torrie wrote:
> On 01/11/2014 07:35 AM, Andriy Kornatskyy wrote:
>
>
> On Linux you could access the /sys/devices/virtual/net/
>
> file in the sysfs filesystem. I'm sure there are other ways.
>
Thank you to everyone for the helpful answer
Where did you read this? I can't find any documentation about __bytes__ on
google.
Regards,
Daniel
On Sat, Jan 11, 2014 at 7:24 PM, Ethan Furman wrote:
> Python 3 has a new method, __bytes__. The docs say: Called by bytes() to
> compute a byte-string representation of an object. This should r
On Sun, Jan 12, 2014 at 8:55 AM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> We had a connection set up a few years
>> ago where the ISP tech recorded the source MAC into the far end, and
>> only that MAC would work - so when I stuck in a different router, I
>> needed to switch
On 01/11/2014 04:53 PM, Daniel da Silva wrote:
Where did you read this? I can't find any documentation about __bytes__ on
google.
http://docs.python.org/3.3/reference/datamodel.html?highlight=__bytes__#object.__bytes__
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
Python 3 has a new method, __bytes__. The docs say: Called by bytes() to compute a byte-string representation of an
object. This should return a bytes object.
I must admit I'm not entirely clear how this should be used. Is anyone using
this now? If so, how?
--
~Ethan~
--
https://mail.python
pintreo mardi Wrote in message:
> Hi, I've just begun to learn programming, I have an open question for the
> group:
> Is the Python language an all in one computer language which could replace C,
> C++, Java etc.. I only ask becuase I am starting off with python and I want
> to learn everythi
ngangsia akumbo Wrote in message:
> On Saturday, January 11, 2014 2:06:41 PM UTC+1, Dave Angel wrote:
>>
>> I second the recommendation for version 3. And I suggest that if
>>
>> this is a business assignment, it's a lot harder than you think.
>>
>> For example, handling dollars and cent
On Saturday, January 11, 2014 3:35:13 PM UTC-8, maxer...@gmail.com wrote:
> On Saturday, January 11, 2014 5:53:00 PM UTC-5, DPod wrote:
>
>
>
> >
>
> > I'd like to write a Python script for ArcGIS 10.x (ArcPy or Python 2.6.5)
> > >that would record the pixel value for all pixels in a raster.
On Saturday, January 11, 2014 5:53:00 PM UTC-5, DPod wrote:
>
> I'd like to write a Python script for ArcGIS 10.x (ArcPy or Python 2.6.5)
> >that would record the pixel value for all pixels in a raster. Furthermore,
> I'd >like to only record a given value once in the results. For example, if
A scripting newbie question...
I'd like to write a Python script for ArcGIS 10.x (ArcPy or Python 2.6.5) that
would record the pixel value for all pixels in a raster. Furthermore, I'd like
to only record a given value once in the results. For example, if there are 23
values of 180 overall, onl
On Sun, Jan 12, 2014 at 9:10 AM, Dennis Lee Bieber
wrote:
> Producing fancy reports for the CEO may be the last thing you
> implement, as it relies upon having a stable database design, business
> logic, and data entry.
>From the sound of things, it might be the ONLY thing to implement,
t
Hi folks.
I have a setup.py problem that's driving me nuts.
I have a treap.py file that tries to "import * from pyx_treap.so", and
failing that, it'll "import * from py_treap.py" (sans extensions of
course). Naturally, all 3 of these should be included - although in
the case of pyx_treap.so, it
In article ,
Chris Angelico wrote:
> We had a connection set up a few years
> ago where the ISP tech recorded the source MAC into the far end, and
> only that MAC would work - so when I stuck in a different router, I
> needed to switch it to the old MAC before it could establish a
> connection.
On 01/11/2014 01:51 PM, Mark Lawrence wrote:
I've now found this
https://mail.python.org/pipermail/python-dev/2008-December/083951.html
QUOTE
It is a public mailing list open to everyone. We expect active participation
of many people porting their
libraries/programs, and hope that the list c
On 10/01/2014 21:31, Mark Lawrence wrote:
On 10/01/2014 20:38, Skip Montanaro wrote:
Anyone in the
know who can explain this phenomenon?
I don't think I can explain it authoritatively, but I can hazard a
guess. Skimming the archives sorted by author, it looks like most/all
the correspondents a
On Sun, Jan 12, 2014 at 3:29 AM, Roy Smith wrote:
> If you don't believe that two machines can have the same MAC address,
> look up Hot Standby Router Protocol. And if you don't believe a machine
> can ignore the BIA and assign a new MAC address in software, look up
> Decnet .
Most people should
> i am programming a system that will be giving details about finance,
> purchase(bills pending bills and paid bill), employees record and
> salary details, warehouse records.
>
> That is just all i intend to do this all on one GUI application
> window and to make it to be able to keep records for
hello
i am working on selenium module of python, i know how to make extension
of firebug with selenium, but i want to know how to use firebug extension
with request module / mechanize . i search a lot but unable to find it , please
help .
technique similar like :-
from selenium impo
On Saturday, January 11, 2014 6:17:13 PM UTC+1, Dennis Lee Bieber wrote:
On Fri, 10 Jan 2014 20:18:32 -0800 (PST), ngangsia akumbo
> Do you have a requirements or use-case documentation, or even a manual
paper system which you would be "duplicating" on the computer? This
document
On 11/01/2014 16:31, ngangsia akumbo wrote:
On Saturday, January 11, 2014 5:29:39 AM UTC+1, Chris Angelico wrote:
Incidentally, is there a strong reason for using Python 2 for this? If
not, I'd recommend moving immediately to Python 3, as there are an
increasing number of advantages. Unless s
On 01/11/2014 07:35 AM, Andriy Kornatskyy wrote:
> Sam,
>
> How about this?
>
> from uuid import getnode as get_mac
> '%012x' % get_mac()
This seems to work if you have only one ethernet adapter. Most
computers have two (wired and wireless) adapters.
Getting a mac address is platform-specific,
On 2014-01-10, Terry Reedy wrote:
> On 1/10/2014 12:38 PM, Albert-Jan Roskam wrote:
>> In Python Cookbook, one of the authors (I forgot who) consistently used the
>> "L[:]" idiom like below. If the second line simply starts with "L =" (so no
>> "[:]") only the name "L" would be rebound, not the
On Saturday, January 11, 2014 5:29:39 AM UTC+1, Chris Angelico wrote:
> On Sat, Jan 11, 2014 at 3:18 PM, ngangsia akumbo wrote:
>
> > purch_price = input("Please enter the price for purchase made: ")
>
> > purch_p = raw_input("Please enter the reason of this purchase made: ")
>
>
>
>
In article ,
"James Harris" wrote:
> "Andriy Kornatskyy" wrote in message
> news:mailman.5329.1389450993.18130.python-l...@python.org...
> > Sam,
> >
> > How about this?
> >
> > from uuid import getnode as get_mac
> > '%012x' % get_mac()
>
> AIUI that will return a mac address even if there i
On Saturday, January 11, 2014 2:06:41 PM UTC+1, Dave Angel wrote:
> ngangsia akumbo Wrote in message:
>
> > Hi everyone,
>
> >
>
> > I have been around this group for some time and i saw that we have very
> > helpful people here.
>
> >
>
> Welcome to the group, and to Python.
>
>
>
>
On Fri, 10 Jan 2014 20:18:32 -0800, ngangsia akumbo wrote:
> i have been learning python just for about 5 months now and i have been
> given a task to do. This will be a leap into the programming industry
> for me.
>
> i am programming a system that will be giving details about finance,
> purchas
"Andriy Kornatskyy" wrote in message
news:mailman.5329.1389450993.18130.python-l...@python.org...
> Sam,
>
> How about this?
>
> from uuid import getnode as get_mac
> '%012x' % get_mac()
AIUI that will return a mac address even if there isn't one. That may or may
not suit the OP.
To the OP, de
In article <18b67e59-39d1-41e2-8977-b1c449b13...@googlegroups.com>,
pintreo mardi wrote:
> Hi, I've just begun to learn programming, I have an open question for the
> group:
> Is the Python language an all in one computer language which could replace C,
> C++, Java etc.. I only ask becuase I a
"Simeon Chaos" wrote in message
news:d7878ab7-2f6d-4bc4-9a28-3ea567bdf...@googlegroups.com...
> Thank you, James. I didn't know this group before. I'll post this message
> there.
You're welcome. It can be hard to find apt groups on Usenet because there
are so many. I don't think there was ever
This is slightly longer than ChrisA's second solution:
>>> import uuid
>>> s = "%12x" % uuid.getnode()
>>> ":".join(x+y for x, y in zip(s[::2], s[1::2]))
'18:03:73:cb:2a:ee'
Skip
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Jan 12, 2014 at 1:35 AM, Andriy Kornatskyy
wrote:
> from uuid import getnode as get_mac
> '%012x' % get_mac()
>
Code golf! Put colons in that, with as little code as possible.
# Way too verbose.
import uuid
l=list("%012x"%uuid.getnode())
l[10:10]=l[8:8]=l[6:6]=l[4:4]=l[2:2]=':'
mac = ''.
On Sun, Jan 12, 2014 at 1:26 AM, Sam wrote:
> I would like to use python to retrieve the mac address of the ethernet port.
> Can this be done? Thank you.
>
Did you try searching the web for 'python retrieve mac address' or similar?
There are several options offered.
ChrisA
--
https://mail.pyt
Sam,
How about this?
from uuid import getnode as get_mac
'%012x' % get_mac()
Thanks.
Andriy Kornatskyy
On Jan 11, 2014, at 4:26 PM, Sam wrote:
> I would like to use python to retrieve the mac address of the ethernet port.
> Can this be done? Thank you.
> --
> https://mail.python.org/mailma
I would like to use python to retrieve the mac address of the ethernet port.
Can this be done? Thank you.
--
https://mail.python.org/mailman/listinfo/python-list
ngangsia akumbo Wrote in message:
> Hi everyone,
>
> I have been around this group for some time and i saw that we have very
> helpful people here.
>
Welcome to the group, and to Python.
> i have been learning python just for about 5 months now and i have been given
> a task to do. This w
On Sat, 11 Jan 2014 11:10:41 +, Alister wrote:
> On Sat, 11 Jan 2014 07:52:36 +, Bob Martin wrote:
>we dont have "Daylight saving time" we switch between GMT (Greenwich
>Mean Time) and BST (British Summer Time) at some point in the past we
>have also used DST (Double Summer Tim
On Sat, 11 Jan 2014 11:10:41 +, Alister wrote:
> On Sat, 11 Jan 2014 07:52:36 +, Bob Martin wrote:
>we dont have "Daylight saving time" we switch between GMT (Greenwich
>Mean Time) and BST (British Summer Time) at some point in the past we
>have also used DST (Double Summer Tim
On Sat, 11 Jan 2014 07:52:36 +, Bob Martin wrote:
we dont have "Daylight saving time" we switch between GMT (Greenwich
Mean Time) and BST (British Summer Time) at some point in the past we
have also used DST (Double Summer Time).
>>>
>>> British Summer Time *is* Daylight Saving Time
INTRODUCING ISLAM
I. ISLAM AND MUSLIMS
The name of this religion is Islam, the root of which is Silm and Salam which
means peace. Salam may also mean greeting one another with peace. One of the
beautiful names of God is that He is the Peace. It means more than that:
submission to the One God,
On 11/01/2014 10:10, pintreo mardi wrote:
On Saturday, January 11, 2014 1:51:53 PM UTC+5:30, Chris Angelico wrote:
On Sat, Jan 11, 2014 at 7:07 PM, pintreo mardi wrote:
Hi, I've just begun to learn programming, I have an open question for the group:
Is the Python language an all in one com
On 11/01/2014 08:07, pintreo mardi wrote:
Hi, I've just begun to learn programming, I have an open question for the group:
Is the Python language an all in one computer language which could replace C,
C++, Java etc.. I only ask becuase I am starting off with python and I want to
learn everythin
On Saturday, January 11, 2014 1:51:53 PM UTC+5:30, Chris Angelico wrote:
> On Sat, Jan 11, 2014 at 7:07 PM, pintreo mardi wrote:
>
> > Hi, I've just begun to learn programming, I have an open question for the
> > group:
>
> > Is the Python language an all in one computer language which could re
I understand the problem now. the echo is a string, wich can contain text but
no array.
I've changed the PHP script so I get only text separated with comma's and in
python I separate the textfields and declare them in the array. With the split
methode I saw in the answer of J. Gordon. Thank yo
Thank you, James. I didn't know this group before. I'll post this message there.
在 2014年1月11日星期六UTC+8下午3时47分33秒,James Harris写道:
> "Simeon Chaos" wrote in message
>
> news:bb7d8d30-845a-4a3d-9b03-dee71ef42986 @googlegroups.com...
>
> > ? 2014?1?11UTC+8??10?17?33?,Chris Angelico??:
>
> > >
Mark Heieis, 11.01.2014 06:47:
> I need to convert the following existing c extension code to support Python 3.
>
> // --- existing code --
>
> // PyBuffer_New() deprecated in python3
> if (!(pyBuf = PyBuffer_New(len)))
> {
> return NULL;
> }
>
> // should use mem
On Friday 10 January 2014 21:52:49 Dennis Lee Bieber did opine:
> On Fri, 10 Jan 2014 19:55:37 + (UTC), Grant Edwards
>
> declaimed the following:
> >It got darned cold here in Minnesota on Monday (-23F in Minneapolis,
> >-35F in Embarass), but Hell is in Michigan -- where it only got down
>
Hi
I need to convert the following existing c extension code to support
Python 3.
// --- existing code --
// PyBuffer_New() deprecated in python3
if (!(pyBuf = PyBuffer_New(len)))
{
return NULL;
}
// should use memoryview object in python3
if (PyObject_AsW
On Sat, Jan 11, 2014 at 7:07 PM, pintreo mardi wrote:
> Hi, I've just begun to learn programming, I have an open question for the
> group:
> Is the Python language an all in one computer language which could replace C,
> C++, Java etc.. I only ask becuase I am starting off with python and I want
Hi, I've just begun to learn programming, I have an open question for the group:
Is the Python language an all in one computer language which could replace C,
C++, Java etc.. I only ask becuase I am starting off with python and I want to
learn everything in basic and advanced programming with pyt
68 matches
Mail list logo