On Wed, Apr 20, 2011 at 4:44 PM, Bastian Ballmann wrote:
> Yes pickle is like eval, but that doesnt mean that one should never
> ever use it over a socket connection.
> What about ssl sockets where client and server authenticate each other?
> Or you encrypt the pickle dump with symmetric encryptio
http://123maza.com/25/line526/
--
http://mail.python.org/mailman/listinfo/python-list
I want to enter Comments of a picture in a JPeg file.
Is there a library in Python which allow me to do that without having to
reinvent the wheel?
The target is to read those comments in my private webSite using the php
exif_read_data function (http://php.net/manual/fr/book.exif.php)
--
ht
Chris Angelico wrote:
>On Wed, Apr 20, 2011 at 1:45 PM, Chris Rebert wrote:
>> Built-ins aren't quite the same as globals, but essentially yes:
>
>Sure. That might explain some of the weirdness, but it doesn't explain
>why things were still weird with the variable named posttype.
It's because,
Hi,
I have a number of different groups g1, g2, … g100 in my data. Each group is
comprised of a known but different set of members from the population m1, m2,
…m1000. The data has been organized in an incidence matrix:
g1g2g3g4g5
m01
m210010
m301100
m411011
m500110
I need to count how many g
Am Wed, 20 Apr 2011 16:59:19 +1000
schrieb Chris Angelico :
> Even public/private key systems won't
> work here; someone could get hold of your client and its private key,
> and poof.
Oh yeah but than all kinds of trusted computing wont work. Sure
one can see it on the net these days looking at
Hi,
Are there any modules for vector algebra (three dimensional
vectors, vector addition, subtraction, multiplication [scalar
and vector]. Could you give me a reference to such module?
platform - ubuntu 10.10 (Linux), Python 3.1 or higher.
Thanks for your help to avoid re-invention of the whee
On Wed, Apr 20, 2011 at 12:00 AM, Jean-Pierre M
wrote:
> I want to enter Comments of a picture in a JPeg file.
> Is there a library in Python which allow me to do that without having to
> reinvent the wheel?
> The target is to read those comments in my private webSite using the php
> exif_re
On Wed, Apr 20, 2011 at 12:47 AM, Algis Kabaila wrote:
> Hi,
>
> Are there any modules for vector algebra (three dimensional
> vectors, vector addition, subtraction, multiplication [scalar
> and vector]. Could you give me a reference to such module?
Dunno if it has 3D-specific features, but NumPy
Algis Kabaila writes:
> Are there any modules for vector algebra (three dimensional
> vectors, vector addition, subtraction, multiplication [scalar
> and vector]. Could you give me a reference to such module?
NumPy has array (and matrix) types with support for these basic
operations you mentio
Shafique, M. (UNU-MERIT) wrote:
> Hi,
> I have a number of different groups g1, g2, … g100 in my data. Each group
> is comprised of a known but different set of members from the population
> m1, m2, …m1000. The data has been organized in an incidence matrix:
> g1g2g3g4g5
> m01
> m210010
> m301
Am 20.04.2011 09:34, schrieb Bastian Ballmann:
No system is totally secure. You can _always_ poke around if a program
uses user input.
It depends on what the program does with the input. If it treats it
appropriately, nothing can happen.
For example one can totally own a complete computer
On Wed, Apr 20, 2011 at 5:16 PM, Tim Roberts wrote:
> It's because, unlike some other languages (like Pascal), Python doesn't
> have infinitely recursive nested namespaces. Glossing over details, there
> is a global namespace, and there is a local namespace. A new function gets
> a new local nam
Am Wed, 20 Apr 2011 10:25:14 +0200
schrieb Thomas Rachel
:
> It depends on what the program does with the input. If it treats it
> appropriately, nothing can happen.
Yes, but the question seems to be what is appropriately.
> What do yu want with filters here? Not filtering is appropriate
> ag
On Wed, Apr 20, 2011 at 7:17 PM, Bastian Ballmann wrote:
> Well you forgot to escape ; and \ but this seems to slide into OT ;)
The semicolon doesn't need to be escaped in a quoted string, and the
backslash does only if it's the escape character. The
string-safetifier function that I used with DB
Am Wed, 20 Apr 2011 19:26:44 +1000
schrieb Chris Angelico :
> Yes, but the other half of the issue is that you have to treat
> anything that comes over the network as "user input", even if you
> think it's from your own program that you control.
Sure.
> Buffer overruns can happen in all sorts
If someone has ever written a script to convert the Python
Language Reference and Library Reference to man format, I'm
interested.
Thanks in advance.
--
André Majorel http://www.teaser.fr/~amajorel/
"The object of this year's expedition is to see if we can find
trace of last year's expedition."
On Wed, 20 Apr 2011 11:56:35 +1000, James Mills wrote:
> Hi all,
>
> Is there a compatible way to use meteclasses in both Python 2.x (2.6 to
> 2.7) and Python 3.x (3.0 to 3.2).
Untested:
if sys.version >= "3":
kw = {'metaclass': MyMetaClass}
else:
kw = {}
class Foo(object, **kw):
Grant Edwards writes:
> I'm trying to implement a device discovery/configuration protocol that
> uses UDP broadcast packets to discover specific types of devices on
> the local Ethernet segment. The management program broadcasts a
> discovery command to a particular UDP port. All devices who ge
I read it too.
I always preferred Netbeans + their Python plugin over Eclipse and
PyDev.
Perhaps I have another look for working with Aptana + PyDev for my web
development stuff, but I am afraid this enviroment (and the base,
Eclipse as it's main reason) is as user unfriendly as it always was.
But
On Wed, 20 Apr 2011 13:10:21 +1000, Chris Angelico wrote:
> Context: Embedded Python interpreter, version 2.6.6
>
> I have a list of dictionaries, where each dictionary has a "type"
> element which is a string. I want to reduce the list to just the
> dictionaries which have the same "type" as the
On Wed, 20 Apr 2011 10:06:27 +1000, Ben Finney wrote:
> Dan Stromberg writes:
>
>> On Tue, Apr 19, 2011 at 4:03 PM, geremy condra
>> wrote:
>> > When you say 'hacking', you mean ?
>>
>> Presumably he meant the real meaning of the word, not what the press
>> made up and ran with.
>
> To be
Am 20.04.2011 00:21, schrieb Grant Edwards:
I'm have problems figuring out how to receive UDP broadcast packets on
Linux.
[...]
On the receiving machine, I've used tcpdump to verify that broadcast
packets are being seen and have a destination IP of 255.255.255.255 and
destination MAC of ff:ff:
On Wed, 2011-04-20 at 06:07 -0400, Sherm Pendley wrote:
> Grant Edwards writes:
> > I'm trying to implement a device discovery/configuration protocol that
> > uses UDP broadcast packets to discover specific types of devices on
> > the local Ethernet segment. The management program broadcasts a
>
Markus writes:
> Infoworld awarded it as best Python IDE, testing: Boa Constructor,
> Eric, ActiveState's Komodo, Oracle's NetBeans, Aptana's Pydev,
> PyScripter, SPE, Spyder, and WingWare's Wing IDE.
I saw somebody using Geany recently and it looked pretty impressive.
For Python gui debuggers, w
Hi Everyone,
I'm pleased to announce that registrations are now open for PyCon
Australia 2011.
PyCon Australia is Australia's only conference dedicated exclusively to
the Python programming language, and will be held at the Sydney Masonic
Center over the weekend of August 20 and 21. See below f
Chris Angelico wrote:
> Context: Embedded Python interpreter, version 2.6.6
>
> I have a list of dictionaries, where each dictionary has a "type"
> element which is a string. I want to reduce the list to just the
> dictionaries which have the same "type" as the first one.
>
> lst=[{"type":"calc"
On Wed, Apr 20, 2011 at 8:16 PM, Steven D'Aprano
wrote:
> There's your problem. IDEs often play silly buggers with the environment
> in order to be "clever". You've probably found a bug in whatever IDE
> you're using.
>
> And this is why I won't touch the buggers with a 30 ft pole, at least not
>
Thanks for finding that reference in the data model docs! I was about to post
a bug report because in PEP 3119 it says otherwise:
> The primary mechanism proposed here is to allow overloading the built-in
> functions isinstance() and issubclass(). The overloading works as follows:
> The call i
I didn't phrase that very well. I do see the point about this being "an
instance lookup on a class"...
--
http://mail.python.org/mailman/listinfo/python-list
What I do in Lepl is use two stages. The first calls the type/metaclass
directly and the second subclasses that. This avoids using the "sugar" that
changes between 2 and 3.
So, for example, in
http://code.google.com/p/lepl/source/browse/src/lepl/matchers/matcher.py#40 I
have
_Matcher = AB
Hi all
On linux, python 3.2 -
x = input()
xyz
len(x)
3
x
'xyz'
on windows, python 3.2 -
x = input()
xyz
len(x)
4
x
'xyz\r'
Is this expected behaviour?
Frank Millman
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 18, 11:16 pm, James Mills wrote:
> On Tue, Apr 19, 2011 at 2:05 PM, harrismh777 wrote:
> > Are bug reports wanted here, or just in issue tracker?
>
> Pretty sure they're wanted in the Issue Tracker.
My opinion is to report bugs on the tracker AND here since this list
is viewed by more peo
* 2011-04-18T21:17:17-07:00 * Westley Martínez wrote:
> On Tue, 2011-04-19 at 06:51 +0300, Teemu Likonen wrote:
>> * 2011-04-19T00:40:09+10:00 * Alec Taylor wrote:
>>> Please continue recommending
>>
>> Vim.
>>
>> * 2011-04-19T02:41:11+10:00 * Alec Taylor wrote:
>>> Please continue suggesting Py
Given this iterator:
class SomeIterableObject(object):
def __iter__(self):
ukeys = self.updates.keys()
for key in ukeys:
if self.updates.has_key(key):
yield self.updates[key]
for rec in self.inserts:
yield rec
Frank Millman wrote:
> On linux, python 3.2 -
>
x = input()
> xyz
len(x)
> 3
x
> 'xyz'
>
> on windows, python 3.2 -
>
x = input()
> xyz
len(x)
> 4
x
> 'xyz\r'
>
> Is this expected behaviour?
No, that's a bug:
http://bugs.python.org/issue11272
IMO it's severe e
Hello,
I have a C++ application, I used SWIG to call the python code. I pass
myModule.myObject object to the method of python code and what to
store it in JSON format.
The problem is when I do:
o = myModule.myObject()
inside python, the o object has __dict__ property, but if I take the
passed
"Peter Otten" <__pete...@web.de> wrote in message
news:iomla6$p8f$1...@dough.gmane.org...
Frank Millman wrote:
On linux, python 3.2 -
x = input()
xyz
len(x)
3
x
'xyz'
on windows, python 3.2 -
x = input()
xyz
len(x)
4
x
'xyz\r'
Is this expected behaviour?
No, that's a bug:
h
Hi.
I wonder if anyone uses Python DrPython as editor.
I need to know if you can disable the creation of
Pyc files created by the program. In the Geany editor you can
add the parameter -B, but not if it can in this editor.
Thanks in advance.
Regards
Cristian Abarzúa F
--
http://mail.python.o
Laszlo Nagy wrote:
> Given this iterator:
>
> class SomeIterableObject(object):
>
>
>
> def __iter__(self):
> ukeys = self.updates.keys()
> for key in ukeys:
> if self.updates.has_key(key):
> yield self.updates[key]
>
Peter Otten wrote:
> Laszlo Nagy wrote:
>
>> Given this iterator:
>>
>> class SomeIterableObject(object):
>>
>>
>>
>> def __iter__(self):
>> ukeys = self.updates.keys()
>> for key in ukeys:
>> if self.updates.has_key(key):
Hm, I see you a
> Algis Kabaila writes:
>
> > Are there any modules for vector algebra (three dimensional
> > vectors, vector addition, subtraction, multiplication [scalar
> > and vector]. Could you give me a reference to such module?
>
> NumPy has array (and matrix) types with support for these basic
> operati
Hello,
I'm considering using os.rename or shutil for renaming
files on OS X (Snow Leopard). However, I've read that
shutil doesn't copy the resource fork or metadata for
the files on OS X. I'm not sure about os.rename though.
I need to keep the resource fork and metadata. Is it
better if
Chris Angelico wrote:
> On Wed, Apr 20, 2011 at 5:16 PM, Tim Roberts wrote:
>> You can solve this through the common lamba idiom of a closure:
>>
>> lst=filter(lambda x,posttype=posttype: x["type"].lower()==posttype,lst)
>
> Seems a little odd, but sure. I guess this means that a function's
> def
Laszlo Nagy wrote:
> Given this iterator:
>
> class SomeIterableObject(object):
>
>
>
> def __iter__(self):
> ukeys = self.updates.keys()
> for key in ukeys:
> if self.updates.has_key(key):
> yield self.updates[key]
>
On 2011-04-20, Dan Stromberg wrote:
> On Tue, Apr 19, 2011 at 8:12 PM, Dan Stromberg wrote:
>> I agree though that you're kind of pushing IP in a direction it wasn't
>> intended to go.
>
> It just occurred to me: You might get some additional mileage out of
> popping the network adapter into prom
Mel wrote:
> Laszlo Nagy wrote:
> `ukeys` isn't a different dictionary from `self.updates.keys` I'ts merely
> another name referring to the same dict object. I think
>
> ukeys = dict (self.updates.keys)
>
> would do what you want.
Sorry. Belay that. Thought I'd had enough coffee.
Me
On 2011-04-20, Roy Smith wrote:
> In article ,
> Grant Edwards wrote:
>
>> I'm trying to implement a device discovery/configuration protocol that
>> uses UDP broadcast packets to discover specific types of devices on
>> the local Ethernet segment. The management program broadcasts a
>> discover
On Wed, 20 Apr 2011 03:24:00 -0700, Paul Rubin wrote:
> Markus writes:
>> Infoworld awarded it as best Python IDE, testing: Boa Constructor,
>> Eric, ActiveState's Komodo, Oracle's NetBeans, Aptana's Pydev,
>> PyScripter, SPE, Spyder, and WingWare's Wing IDE.
>
> I saw somebody using Geany recen
On 2011-04-20, Heiko Wundram wrote:
> Am 20.04.2011 01:54, schrieb Grant Edwards:
>> I guess the problem is that I expected to receive a packet on an
>> interface anytime a packet was received with a destination IP address
>> that matched that of the the interface. Apprently there's some
>> filte
On 2011-04-20, Dan Stromberg wrote:
> On Tue, Apr 19, 2011 at 6:15 PM, Grant Edwards
> wrote:
>
>>> Or can you simply use a stupid netmask like /1 that picks up all the
>>> IP ranges? That way, the source-IP check wouldn't fail.
>>
>> That would require that the device somehow knows that it's no
On 2011-04-20, Thomas Heller wrote:
> Am 20.04.2011 00:21, schrieb Grant Edwards:
>> I'm have problems figuring out how to receive UDP broadcast packets on
>> Linux.
> [...]
>>
>> On the receiving machine, I've used tcpdump to verify that broadcast
>> packets are being seen and have a destination
On Wed, Apr 20, 2011 at 4:41 AM, Peter Otten <__pete...@web.de> wrote:
> The assignment writes to the local namespace, the lambda function reads from
> the global namespace; this will only work as expected if the two namespaces
> are the same:
>
exec """type = 42; print filter(lambda x: x == t
Am 20.04.2011 16:30, schrieb Grant Edwards:
>> If you need to see the packets regardless, either use a promiscuous mode
>> sniffer (i.e., tcpdump, but that's relatively easy to mirror in Python
>> using SOCK_RAW, capturing packets at the ethernet level), or add a route
>> on your system for the 192
//\ PROJF
//P\ SLOW VER
// GDRAW PROJF DEMO P
//
// P // XEQ GDRAW
//
//P \ PROJF
//
// \ FAST VER
// @ domain [http://meami.org/fastslow.htm]
--
http://mail.python.org/mai
Not a Python question. You should go over to
http://groups.google.com/group/comp.sys.mac.system/ and ask.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
> Not a Python question. You should go over to
> http://groups.google.com/group/comp.sys.mac.system/ and ask.
> -- Gnarlie
What do you mean it's not a python question? os.rename is
python syntax… how does it work on OS X? Is it the same as
the 'mv' command, etc?
Jay
--
http://mail.python.o
On 2011-04-20, Heiko Wundram wrote:
> Am 20.04.2011 16:30, schrieb Grant Edwards:
>>> If you need to see the packets regardless, either use a promiscuous mode
>>> sniffer (i.e., tcpdump, but that's relatively easy to mirror in Python
>>> using SOCK_RAW, capturing packets at the ethernet level), or
On 2011-04-20, Grant Edwards wrote:
> On 2011-04-20, Heiko Wundram wrote:
>>> I've thought about the SOCK_RAW option, but the CPU load of looking
>>> all received Ethernet packets in user-space would be a big down-side.
>>
>> Not necessarily: instead of using UDP datagrams to send the data,
>> u
On Apr 20, 6:43 am, Andreas Tawn wrote:
> > Algis Kabaila writes:
>
> > > Are there any modules for vector algebra (three dimensional
> > > vectors, vector addition, subtraction, multiplication [scalar
> > > and vector]. Could you give me a reference to such module?
>
> > NumPy has array (and mat
On 2011-04-20, Adam Tauno Williams wrote:
> On Wed, 2011-04-20 at 06:07 -0400, Sherm Pendley wrote:
>> Grant Edwards writes:
>> > I'm trying to implement a device discovery/configuration protocol that
>> > uses UDP broadcast packets to discover specific types of devices on
>> > the local Ethernet
On 2011-04-20, Dan Stromberg wrote:
> - Actually, you Might be able to configure your device to have a
> netmask of 0.0.0.0, IP address of 255.255.255.255 and broadcast of
> 255.255.255.255.
255.255.255.255 isn't allowed as an IP address.
I tried a netmask of 0.0.0.0, and it didn't make any
> On Apr 20, 6:43 am, Andreas Tawn wrote:
> > > Algis Kabaila writes:
> >
> > > > Are there any modules for vector algebra (three dimensional
> > > > vectors, vector addition, subtraction, multiplication [scalar
> > > > and vector]. Could you give me a reference to such module?
> >
> > > NumPy ha
On 2011-04-20, Grant Edwards wrote:
> On 2011-04-20, Heiko Wundram wrote:
>> Am 20.04.2011 01:54, schrieb Grant Edwards:
>>> I guess the problem is that I expected to receive a packet on an
>>> interface anytime a packet was received with a destination IP address
>>> that matched that of the the
Hi,
I'm writing and testing an asyncore-based server. Unfortunately, it
doesn't seem to work. The code below is based on the official docs and
examples, and starts a listening and sending dispatcher, where the
sending dispatcher connects and sends a message to the listener - yet
Handler.handle_rea
I found this in one of the online cookbooks:
#Raghunath Reddy Peesari 6 years, 3 months ago # | flag
#There is more simple way. ###
a = 'abcdefghi'
a = a[::-1]
print a
>>> 'ihgfedcba'
As a newbie Pythoner, I understand [] -1]
but would some tell me how '::' does its magic?
Uncle Ben
--
http
> As a newbie Pythoner, I understand [] -1] but would some tell me how
> '::' does its magic?
>
> Uncle Ben
The -1 is the "stride" or "step" argument. It's described at
http://docs.python.org/release/2.3.5/whatsnew/section-slices.html
Dan
--
http://mail.python.org/mailman/listinfo/python-list
Hey everyone.
I've written an online interactive Python tutorial atop Google App Engine:
http://www.learnpython.org.
All you need to do is log in using your Google account and edit the wiki to add
your tutorials.
Read more on the website.
Thanks for your help, and I would appreciate if you he
On Apr 20, 2011, at 10:02 AM, wrote:
> Hello,
>
> I'm considering using os.rename or shutil for renaming
> files on OS X (Snow Leopard). However, I've read that
> shutil doesn't copy the resource fork or metadata for
> the files on OS X. I'm not sure about os.rename though.
> I need to
Awesome project, I really like it. I'll see if I can't help adding
some material that's missing when I get on the train.
Keep up the great work!
On Wed, Apr 20, 2011 at 1:15 PM, Ron wrote:
> Hey everyone.
>
> I've written an online interactive Python tutorial atop Google App Engine:
> http://www
On 20.04.2011 15:21, craf wrote:
Hi.
I wonder if anyone uses Python DrPython as editor.
I need to know if you can disable the creation of
Pyc files created by the program. In the Geany editor you can
add the parameter -B, but not if it can in this editor.
I don't know DrPython, but Python itse
On Thu, Apr 21, 2011 at 12:44 AM, Ian Kelly wrote:
> So, the question for the OP: Is this file being run with execfile?
>
Not execfile per se; the code is fetched from the database and then
executed with:
PyObject *v=PyRun_StringFlags(code,Py_file_input,py_globals,locals,0);
Is Py_file_input t
Thanks! :)
--
http://mail.python.org/mailman/listinfo/python-list
Excellent idea,
I've some ideas on specific subjects misunderstood by beginners.
One idea for facilitating the contribution, create a mercurial repository (or a
git), everyone has not a google account and your contributors will be
developers so they should use a SCM.
Once again, it's an excell
On 20.04.2011 15:21, craf wrote:
> Hi.
>
> I wonder if anyone uses Python DrPython as editor.
> I need to know if you can disable the creation of
> Pyc files created by the program. In the Geany editor you can
> add the parameter -B, but not if it can in this editor.
>I don't know DrPython, but
On Wed, Apr 20, 2011 at 12:03 PM, Chris Angelico wrote:
> On Thu, Apr 21, 2011 at 12:44 AM, Ian Kelly wrote:
>> So, the question for the OP: Is this file being run with execfile?
>>
>
> Not execfile per se; the code is fetched from the database and then
> executed with:
>
> PyObject *v=PyRun_Str
http://scikit-learn.sourceforge.net/
On Fri, Apr 8, 2011 at 6:52 AM, Ranjith Kumar wrote:
> Hi all,
> Can anyone suggest me any best Natural Language Processing in
> python other than nltk.
> --
> Cheers,
> Ranjith Kumar K,
> Chennai.
> http://ranjithtenz.wordpress.com
>
>
>
>
> _
Hi All,
I'm happy to announce a new release of TestFixtures.
This release adds a utcnow method to test_datetime that behaves
identically to the now method:
http://packages.python.org/testfixtures/api.html#testfixtures.tdatetime.utcnow
The package is on PyPI and a full list of all the links t
>> I'm considering using os.rename or shutil for renaming
>> files on OS X (Snow Leopard)...
> Hi Jay,
> I don't know if os.rename() does what you want, but why
> don't you try a simple test and find out? Surely an
> empirical test is at least as useful as an answer from
> someone like me who
Here's something that surprised me about Python regular expressions.
>>> krex = re.compile(r"^([a-z])+$")
>>> s = "abcdef"
>>> ms = krex.match(s)
>>> ms.groups()
('f',)
The parentheses indicate a capturing group within the
regular expression, and the "+" indicates that the
group can appear one o
On 2011-04-20, John Nagle wrote:
> Here's something that surprised me about Python regular expressions.
>
> >>> krex = re.compile(r"^([a-z])+$")
> >>> s = "abcdef"
> >>> ms = krex.match(s)
> >>> ms.groups()
> ('f',)
>
> The parentheses indicate a capturing group within the
> regular expression, an
In article <280cb56a-89b8-4d62-9374-d769b3acf...@semanchuk.com>,
Philip Semanchuk wrote:
> On Apr 20, 2011, at 10:02 AM,
> wrote:
> > I'm considering using os.rename or shutil for renaming
> > files on OS X (Snow Leopard). However, I've read that
> > shutil doesn't copy the resource fork or
On 4/19/11 3:48 AM, Lamont Nelson wrote:
> 1. Are you sure you want to use python because threading is not
good due
to the Global Lock (GIL)? Is this really an issue for multi-threaded
web services as seems to be indicated by the articles from a Google
search? If not, how do you avoid this
On 20/04/2011 20:20, John Nagle wrote:
Here's something that surprised me about Python regular expressions.
>>> krex = re.compile(r"^([a-z])+$")
>>> s = "abcdef"
>>> ms = krex.match(s)
>>> ms.groups()
('f',)
The parentheses indicate a capturing group within the
regular expression, and the "
On Apr 20, 12:25 pm, Dun Peal wrote:
> Hi,
>
> I'm writing and testing an asyncore-based server. Unfortunately, it
> doesn't seem to work. The code below is based on the official docs and
> examples, and starts a listening and sending dispatcher, where the
> sending dispatcher connects and sends a
> In article <280CB56A-89B8-4D62-9374-D769B3ACFEBB at semanchuk.com>,
> Philip Semanchuk wrote:
> > On Apr 20, 2011, at 10:02 AM, > kc.rr.com>
> > wrote:
> > > I'm considering using os.rename or shutil for renaming
> > > files on OS X (Snow Leopard)…
> os.rename() is a simple wrapper around
(1) Python's docs use Sphinx, which uses restructured text as a markup. You
can generate man pages from restructured text using rst2man (which is installed
on my computer, probably as part of python/docutils).
HOWEVER I imagine it's not going to work very well, if at all, because Sphinx
uses l
On 4/20/2011 12:23 PM, Neil Cerutti wrote:
On 2011-04-20, John Nagle wrote:
Here's something that surprised me about Python regular expressions.
krex = re.compile(r"^([a-z])+$")
s = "abcdef"
ms = krex.match(s)
ms.groups()
('f',)
The parentheses indicate a capturing group within the
regular
On Tue, 2011-04-19 at 12:41 -0400, Calvin Spealman wrote:
> I have a great solution : stop using reload. It often dangerous and
> more often silly.
>
Yeah, I'm there. Some of this is just learning a new way of thinking
about the language. I can see that not using reload at all makes more
sense (
On Apr 20, 3:01 pm, Jean-Paul Calderone
wrote:
> You didn't let the program run long enough for the later events to
> happen. loop(count=1) basically means one I/O event will be processed
> - in the case of your example, that's an accept(). Then asyncore is
> done and it never gets to your custo
On 4/20/2011 6:17 AM, Steven D'Aprano wrote:
It's hardly just the press. "Hack" is a fine old English word:
"The jungle explorer hacked at the undergrowth with his machete."
"I was so hungry, I didn't take the time to neatly slice up the meat, but
just hacked off a chunk and stuffed it in my m
On 4/20/2011 1:15 PM, Ron wrote:
I've written an online interactive Python tutorial atop Google App Engine:
http://www.learnpython.org.
Currently giving 500 server error. Hope something clears up.
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
I have two really simple scripts:
C:\Python27\Scripts\foo
---
if __name__ == '__main__':
import bar
bar.main()
C:\Python27\Lib\site-packages\bar.py
---
from multiprocessing import Pool
def task(arg):
return arg
def main():
pool = Pool()
res = pool.apply_async(task, (3.14,))
On 2011-04-19, Grant Edwards wrote:
> I'm have problems figuring out how to receive UDP broadcast packets on
> Linux.
Thanks to everybody for their help with what turned out to have little
or nothing to do with Python itself.
The main problem was reverse-path filtering (which is enabled by
defa
On Wed, Apr 20, 2011 at 10:18 PM, andrew cooke wrote:
> What I do in Lepl is use two stages. The first calls the type/metaclass
> directly and the second subclasses that. This avoids using the "sugar" that
> changes between 2 and 3.
>
> So, for example, in
> http://code.google.com/p/lepl/sour
On Apr 20, 1:01 pm, Dan M wrote:
> > As a newbie Pythoner, I understand [] -1] but would some tell me how
> > '::' does its magic?
>
> > Uncle Ben
>
> The -1 is the "stride" or "step" argument. It's described
> athttp://docs.python.org/release/2.3.5/whatsnew/section-slices.html
>
> Dan
Very help
On Wed, Apr 20, 2011 at 7:21 AM, Grant Edwards wrote:
> On 2011-04-20, Dan Stromberg wrote:
>> On Tue, Apr 19, 2011 at 8:12 PM, Dan Stromberg wrote:
>>> I agree though that you're kind of pushing IP in a direction it wasn't
>>> intended to go.
>>
>> It just occurred to me: You might get some add
On Wed, Apr 20, 2011 at 8:17 PM, Steven D'Aprano
wrote:
> It's hardly just the press. "Hack" is a fine old English word:
>
"Can you teach me how to hack?"
"Sure. Go to the tobacconists and buy him out, then smoke the lot.
You'll be hacking like a pro in no time!"
Chris Angelico
--
http://mail.
well...
they are freshmen wanna know how to learn programming , actually ,python
will be such a great programming language
funded their hobbies ,you are looking for material and some website ,yeah
,why not give this problem to your students ,ask the freshmen to prepare for
some material and webs
Chris Angelico wrote:
Hacking??
1) Tinkering, programming, building furniture with an axe.
2) Breaking and entering in the electronic world.
Not so much.
In the comp.lang.python community hacking is most easily identified with
the many one-liners that show up... that is the underlying spiri
1 - 100 of 107 matches
Mail list logo