Python as network protocol

2009-11-10 Thread Cooch
Hi, guys! I want to implement such specific feature: I have a server written in Python. I have a client written in C++. I want to use Python as network protocol between them. I mean: client send to server such string: "a = MyObject()", so object of this type will appear in server. Any ideas how to

Re: Python as network protocol

2009-11-10 Thread Diez B. Roggisch
Cooch schrieb: Hi, guys! I want to implement such specific feature: I have a server written in Python. I have a client written in C++. I want to use Python as network protocol between them. I mean: client send to server such string: "a = MyObject()", so object of this type will appear in server.

Re: how to close not response win32 IE com interface

2009-11-10 Thread Michel Claveau - MVP
Hi! The only way I know is to use sendkeys. @+ Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: how to create a pip package

2009-11-10 Thread Wolodja Wentland
On Mon, Nov 09, 2009 at 19:48 -0800, Phlip wrote: > I have a single file that I need my crew to pip install. Where do you plan to host this file? Will it be available on PiPy? > When I Google for "how to create a pip package" I don't hit anything. > Of course that info is out there; I can't seem

Re: Choosing GUI Module for Python

2009-11-10 Thread Dave Cook
On 2009-11-09, Antony wrote: > 1. PyGTK > 2. PyQT > 3. PySide > 4. wxPython > 5 . TKinter For cross-platform work, I'd choose either PyQt or wxPython. If you're not too worried about the dual license, I find PyQt the best combination of ease of use and features, particularly when used wit

Re: Req. comments on "first version" ch 2 progr. intro (using Python 3.x in Windows)

2009-11-10 Thread Jon Clements
[posts snipped] The only other thing is that line_length is used as a constant in one of the programs. However, it's being mutated in the while loop example. It may still be in the reader's mind that line_length == 10. (Or maybe not) Cheers, Jon. -- http://mail.python.org/mailman/listinfo/pyt

Re: Choosing GUI Module for Python

2009-11-10 Thread Grant Edwards
On 2009-11-09, Dave Cook wrote: > On 2009-11-09, Antony wrote: > >> 1. PyGTK >> 2. PyQT >> 3. PySide >> 4. wxPython >> 5 . TKinter > > For cross-platform work, I'd choose either PyQt or wxPython. > > If you're not too worried about the dual license, I find PyQt > the best combination of eas

Re: Choosing GUI Module for Python

2009-11-10 Thread Lorenzo Gatti
On Nov 9, 9:01 pm, Simon Hibbs wrote: > The main objection to using PyQT untill now was that for commercial > development you needed to buy a license (it was free for GPL > projects). That's rapidly becoming a non-issue as the core QT > framework is now LGPL and Nokia have a project underway to p

Re: how to close not response win32 IE com interface

2009-11-10 Thread elca
Michel Claveau - MVP-2 wrote: > > Hi! > > The only way I know is to use sendkeys. > > @+ > > Michel Claveau > -- > http://mail.python.org/mailman/listinfo/python-list > > Hello, actually this is not hang status, i mean..it slow response, so in that case, i would like to close IE and want

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-10 Thread Ognjen Bezanov
Hey, Thanks for all the responses guys. In hindsight I probably should have explained why on earth I'd need the physical address from an interpreted language. I'm trying to see if there is any way I can make Python share data between two hosts using DMA transfers over a firewire connection,

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-10 Thread Maxim Khitrov
On Tue, Nov 10, 2009 at 6:32 AM, Ognjen Bezanov wrote: > Hey, > > Thanks for all the responses guys. In hindsight I probably should have > explained why on earth I'd need the physical address from an interpreted > language. > > I'm trying to see if there is any way I can make Python share data bet

Re: Newbie advice

2009-11-10 Thread lkcl
On Oct 29, 7:00 am, alex23 wrote: > However, if you're already comfortable with HTML/CSS, I'd recommend > taking a look atPyjamas, which started as a port of the Google Web > Toolkit, taking Python code and compiling it into javascript. The > associated project,Pyjamas-Desktop, is a webkit-based

Re: My own accounting python euler problem

2009-11-10 Thread Gerry
On Nov 8, 2:42 pm, Ozz wrote: > vsoler schreef: > And, of course, you'd want to take a look a this: http://xkcd.com/287/ Gerry > > > Instead of subsets, do you mean permutations/combinations?  Since 2 > > invoices can have the same amount perhaps the terms permutation is > > better. > > As some

Re: comparing alternatives to py2exe

2009-11-10 Thread Philip Semanchuk
On Nov 9, 2009, at 9:16 PM, Gabriel Genellina wrote: En Fri, 06 Nov 2009 17:00:17 -0300, Philip Semanchuk > escribió: On Nov 3, 2009, at 10:58 AM, Jonathan Hartley wrote: Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives to

Re: Most efficient way to "pre-grow" a list?

2009-11-10 Thread gil_johnson
On Nov 9, 10:56 pm, "Gabriel Genellina" wrote: > > [much cutting] > > def method3a(): >    newArray = array.array('I', [INITIAL_VALUE]) * SIZE >    assert len(newArray)==SIZE >    assert newArray[SIZE-1]==INITIAL_VALUE > > [more cutting] > > So arrays are faster than lists, and in both cases one_it

Re: My own accounting python euler problem

2009-11-10 Thread Steven D'Aprano
On Sun, 08 Nov 2009 12:31:26 -0500, geremy condra wrote: > What you're describing is the powerset operation. Here's the example > from the python docs: [...] > What I find interesting is that running it through timeit, it is much > slower than the code suggested by Dan Bishop. Your test doesn't s

Re: how to create a pip package

2009-11-10 Thread Phlip
On Nov 10, 1:54 am, Wolodja Wentland wrote: > http://docs.python.org/library/distutils.html#module-distutils > http://packages.python.org/distribute/ ktx... now some utterly retarded questions to prevent false starts. the distutils page starts with "from distutils.core import setup". but a sam

Re: My own accounting python euler problem

2009-11-10 Thread geremy condra
On Tue, Nov 10, 2009 at 8:59 AM, Steven D'Aprano wrote: > On Sun, 08 Nov 2009 12:31:26 -0500, geremy condra wrote: > >> What you're describing is the powerset operation. Here's the example >> from the python docs: > [...] >> What I find interesting is that running it through timeit, it is much >>

Re: Serious Privileges Problem: Please Help

2009-11-10 Thread Victor Subervi
For others who discover this error, here's what happened as I've traced it: 1) I never before had built a python interpreter on my Windoze box. That was kind of silly, since I was uploading to my server every time I wanted to test. So I built on my Windoze box. Thereafter, Windoze assumed that all

Re: Serious Privileges Problem: Please Help

2009-11-10 Thread Scott David Daniels
Dave Angel wrote: Victor Subervi wrote: On Mon, Nov 9, 2009 at 2:30 PM, Victor Subervi wrote: On Mon, Nov 9, 2009 at 2:27 PM, Rami Chowdhury wrote: Hold everything. Apparently line-endings got mangled. What I don't ... What I've diagnosed as happening when a python script with Windows li

Create object from variable indirect reference?

2009-11-10 Thread NickC
I can't seem to find a way to do something that seems straighforward, so I must have a mental block. I want to reference an object indirectly through a variable's value. Using a library that returns all sorts of information about "something", I want to provide the name of the "something" via

Re: Create object from variable indirect reference?

2009-11-10 Thread Jon Clements
On Nov 10, 2:59 pm, NickC wrote: > I can't seem to find a way to do something that seems straighforward, so I > must have a mental block.  I want to reference an object indirectly > through a variable's value. > > Using a library that returns all sorts of information about "something", I > want to

Re: Create object from variable indirect reference?

2009-11-10 Thread Rami Chowdhury
On Tue, 10 Nov 2009 06:59:25 -0800, NickC wrote: I can't seem to find a way to do something that seems straighforward, so I must have a mental block. I want to reference an object indirectly through a variable's value. Using a library that returns all sorts of information about "something

Re: Python as network protocol

2009-11-10 Thread Daniel Fetchinson
>> I want to implement such specific feature: >> I have a server written in Python. I have a client written in C++. I >> want to use Python as network protocol between them. I mean: client >> send to server such string: "a = MyObject()", so object of this type >> will appear in server. Any ideas ho

Re: pythonw.exe under Windows-7 (Won't run for one admin user)

2009-11-10 Thread SD_V897
Rhodri James wrote: On Fri, 06 Nov 2009 21:19:44 -, SD_V897 wrote: Rhodri James wrote: On Tue, 03 Nov 2009 16:00:16 -, SD_V897 wrote: I have a perplexing issue, I have four users set up on a W7 computer. The program runs fine for all users except the admin user who needs it for s

Re: Python as network protocol

2009-11-10 Thread Martin
On Tue, Nov 10, 2009 at 16:31, Daniel Fetchinson wrote: >> This is a *really* bad idea. > > How do you know for sure? Maybe the OP wants to use this thing with 3 > known researchers working on a cluster that is not even visible to the > outside world. In such a setup the model the OP suggested is

Re: is None or == None ?

2009-11-10 Thread Grant Edwards
On 2009-11-10, Rhodri James wrote: > On Sun, 08 Nov 2009 19:45:31 -, Terry Reedy wrote: > >> I believe the use of tagged pointers has been considered and so far >> rejected by the CPython developers. And no one else that I know of has >> developed a fork for that. It would seem more feasi

Re: is None or == None ?

2009-11-10 Thread Marco Mariani
Grant Edwards wrote: MacOS applications made the same mistake on the 68K. And and awful lot of the Amiga software, with the same 24/32 bit CPU. I did it too, every pointer came with 8 free bits so why not use them? It wasn't the decades-long global debacle that was the MS-DOS memory model,

Re: Python as network protocol

2009-11-10 Thread Steven D'Aprano
On Tue, 10 Nov 2009 16:31:13 +0100, Daniel Fetchinson wrote about using exec: >> This is a *really* bad idea. > > How do you know for sure? Maybe the OP wants to use this thing with 3 > known researchers working on a cluster that is not even visible to the > outside world. In such a setup the mo

Re: My own accounting python euler problem

2009-11-10 Thread MRAB
Gerry wrote: On Nov 8, 2:42 pm, Ozz wrote: vsoler schreef: And, of course, you'd want to take a look a this: http://xkcd.com/287/ I've found 2 solutions. (And I really should get back to what I was doing...) Gerry Instead of subsets, do you mean permutations/combinations? Since 2 invo

Re: Create object from variable indirect reference?

2009-11-10 Thread NickC
Many thanks for the replies. getattr() works great: >>> name='Moon' >>> m2 = getattr(ephem,name)() >>> m2.compute(home) >>> print ephem.localtime(m2.rise_time) 2009-11-11 01:30:36.02 shows the moon will rise at 1:30am localtime tonight at my home location. Excellent. -- NickC -- http://

Re: how to create a pip package

2009-11-10 Thread Floris Bruynooghe
On Nov 10, 2:30 pm, Phlip wrote: > On Nov 10, 1:54 am, Wolodja Wentland > wrote: > > >http://docs.python.org/library/distutils.html#module-distutils > >http://packages.python.org/distribute/ > > ktx... now some utterly retarded questions to prevent false starts. > > the distutils page starts with

Re: Create object from variable indirect reference?

2009-11-10 Thread Hrvoje Niksic
NickC writes: > moon2 = ephem.${!options.body}() moon2 = getattr(ephem, options.body)() -- http://mail.python.org/mailman/listinfo/python-list

Re: is None or == None ?

2009-11-10 Thread Chris Kaynor
On Tue, Nov 10, 2009 at 7:56 AM, Marco Mariani wrote: > Grant Edwards wrote: > > MacOS applications made the same mistake on the 68K. >> > > And and awful lot of the Amiga software, with the same 24/32 bit CPU. > > I did it too, every pointer came with 8 free bits so why not use them? > > > > I

Re: My own accounting python euler problem

2009-11-10 Thread Mel
Gerry wrote: > On Nov 8, 2:42 pm, Ozz wrote: >> vsoler schreef: >> > And, of course, you'd want to take a look a this: http://xkcd.com/287/ :) I remember that. mwil...@tecumseth:~/sandbox$ python xkcd_complete.py [1, 0, 0, 2, 0, 1] 1505 [7] 1505 Mel. -- http://mail.python.org/mailma

Re: is None or == None ?

2009-11-10 Thread Grant Edwards
On 2009-11-10, Marco Mariani wrote: > Grant Edwards wrote: > >> MacOS applications made the same mistake on the 68K. > And and awful lot of the Amiga software, with the same 24/32 > bit CPU. > > I did it too, every pointer came with 8 free bits so why not > use them? TANSTAFB ;) I should prob

Re: Python as network protocol

2009-11-10 Thread Grant Edwards
On 2009-11-10, Steven D'Aprano wrote: > On Tue, 10 Nov 2009 16:31:13 +0100, Daniel Fetchinson wrote about using > exec: > >>> This is a *really* bad idea. >> >> How do you know for sure? Maybe the OP wants to use this thing >> with 3 known researchers working on a cluster that is not even >> vis

Re: how to create a pip package

2009-11-10 Thread Wolodja Wentland
On Tue, Nov 10, 2009 at 06:30 -0800, Phlip wrote: > On Nov 10, 1:54 am, Wolodja Wentland > wrote: > > > http://docs.python.org/library/distutils.html#module-distutils > > http://packages.python.org/distribute/ > > ktx... now some utterly retarded questions to prevent false starts. > the distuti

Re: how to create a pip package

2009-11-10 Thread Phlip
> >     from setuptools import setup, find_packages > > It will be enough to use the method outlined in the distutils > documentation. Setuptools is a third-party library that used to be the > de-facto standard for Python packaging. I don't want to go into detail > why setuptools might not be the b

Re: Python as network protocol

2009-11-10 Thread Diez B. Roggisch
Daniel Fetchinson schrieb: I want to implement such specific feature: I have a server written in Python. I have a client written in C++. I want to use Python as network protocol between them. I mean: client send to server such string: "a = MyObject()", so object of this type will appear in server

Re: Python as network protocol

2009-11-10 Thread geremy condra
On Tue, Nov 10, 2009 at 10:56 AM, Steven D'Aprano wrote: > On Tue, 10 Nov 2009 16:31:13 +0100, Daniel Fetchinson wrote about using > exec: > >>> This is a *really* bad idea. >> >> How do you know for sure? Maybe the OP wants to use this thing with 3 >> known researchers working on a cluster that i

Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-10 Thread Syeberman
On Nov 8, 3:42 pm, Mick Krippendorf wrote: > Wells wrote: > > I'm not quite understanding why a tuple is hashable but a list is not. > > The short answer has already been given. > The short answer isn't entirely correct, however. Tuples are only hashable so long as their elements are all hashable

Calendar Stuff

2009-11-10 Thread Victor Subervi
Hi; I have the following code: import calendar, datetime def cal(): ... myCal = calendar.Calendar(calendar.SUNDAY) today = datetime.date.today() day = today.day mo = today.month yr = today.year # month = myCal.monthdayscalendar(int(time.strftime("%Y")) month = myCal.monthdayscalend

Python-URL! - weekly Python news and links (Nov 10)

2009-11-10 Thread Gabriel Genellina
QOTW: "Don't get me wrong - innovation often comes from scratching ones personal itch. But you seem to be suffering from a rather bad case of neurodermatitis." - Diez B. Roggisch, on ... well, personal style in problem-solving http://groups.google.com/group/comp.lang.python/msg/4cf102bdd3a326

Re: Python as network protocol

2009-11-10 Thread Daniel Fetchinson
>>> This is a *really* bad idea. >> >> How do you know for sure? Maybe the OP wants to use this thing with 3 >> known researchers working on a cluster that is not even visible to the >> outside world. In such a setup the model the OP suggested is a >> perfectly reasonable one. I say this because I

Threaded import hang in cPickle.dumps

2009-11-10 Thread Zac Burns
Using python 2.6 cPickle.dumps has an import which is causing my application to hang. (figured out by overriding builtin.__import__ with a print and seeing that this is the last line of code being run. I'm running cPickle.dumps in a thread, which leads me to believe that the first restriction here

Re: Threaded import hang in cPickle.dumps

2009-11-10 Thread Zac Burns
Oh, I'm pickling an NotImplementedError and it's importing exceptions. -- Zachary Burns (407)590-4814 Aim - Zac256FL Production Engineer (Digital Overlord) Zindagi Games On Tue, Nov 10, 2009 at 10:50 AM, Zac Burns wrote: > Using python 2.6 > > cPickle.dumps has an import which is causing my app

Re: Python as network protocol

2009-11-10 Thread Daniel Fetchinson
>>> This is a *really* bad idea. >> >> How do you know for sure? Maybe the OP wants to use this thing with 3 >> known researchers working on a cluster that is not even visible to the >> outside world. In such a setup the model the OP suggested is a perfectly >> reasonable one. I say this because I

Re: is None or == None ?

2009-11-10 Thread Steven D'Aprano
On Tue, 10 Nov 2009 15:46:10 +, Grant Edwards wrote: > On 2009-11-10, Rhodri James wrote: >> On Sun, 08 Nov 2009 19:45:31 -, Terry Reedy >> wrote: >> >>> I believe the use of tagged pointers has been considered and so far >>> rejected by the CPython developers. And no one else that I kno

Re: Calendar Stuff

2009-11-10 Thread MRAB
Victor Subervi wrote: Hi; I have the following code: import calendar, datetime def cal(): ... myCal = calendar.Calendar(calendar.SUNDAY) today = datetime.date.today() day = today.day mo = today.month yr = today.year # month = myCal.monthdayscalendar(int(time.strftime("%Y")) month

Re: Python as network protocol

2009-11-10 Thread Steven D'Aprano
On Tue, 10 Nov 2009 12:28:49 -0500, geremy condra wrote: > Steven, remember a few weeks ago when you tried to explain to me that > the person who was storing windows administrative passwords using a 40 > byte xor cipher with the hardcoded password might not be doing something > stupid because I di

Python C api: create a new object class

2009-11-10 Thread lallous
Hello I have 3 questions, hope someone can help: 1) How can I create an instance class in Python, currently I do: class empty: pass Then anytime I want that class (which I treat like a dictionary): o = empty() o.myattr = 1 etc Is there is a one line syntax to instantiate an instance? A

Re: advice needed for lazy evaluation mechanism

2009-11-10 Thread Steven D'Aprano
On Sun, 08 Nov 2009 14:41:27 -0800, markolopa wrote: > Hi, > > Could you please give me some advice on the piece of code I am writing? > > My system has several possible outputs, some of them are not always > needed. I started to get confused with the code flow conditions needed > to avoid doing

New syntax for blocks

2009-11-10 Thread r
Forgive me if i don't properly explain the problem but i think the following syntax would be quite beneficial to replace some redundant "if's" in python code. if something_that_returns_value() as value: #do something with value # Which can replace the following syntactical construct... value

New to Python need on advice on this script

2009-11-10 Thread Jim Valenza
Hello all - I'm new to the world of Python as I am a GIS guy who would like to broaden his horizons. I have a question about a script that we've been working on: The purpose of the code is to *Syncronize SDE DropBox with Regulatory Project working files. I am looking for where the script dumps the

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-10 Thread Dave Angel
Ognjen Bezanov wrote: Hey, Thanks for all the responses guys. In hindsight I probably should have explained why on earth I'd need the physical address from an interpreted language. I'm trying to see if there is any way I can make Python share data between two hosts using DMA transfers over

Re: Calendar Stuff

2009-11-10 Thread Victor Subervi
On Tue, Nov 10, 2009 at 2:02 PM, MRAB wrote: > Victor Subervi wrote: > >> Hi; >> I have the following code: >> >> import calendar, datetime >> >> def cal(): >> ... >> myCal = calendar.Calendar(calendar.SUNDAY) >> today = datetime.date.today() >> day = today.day >> mo = today.month >> yr = t

Re: Python as network protocol

2009-11-10 Thread Diez B. Roggisch
My point is that hacking can still be a fun and easy-going activity when one writes code for himself (almost) without regards to security and nasty things like that creeping in from the outside. I'm the king in my castle, although I'm fully aware of the fact that my castle might be ugly from the o

Re: Python as network protocol

2009-11-10 Thread Robert Latest
Grant Edwards wrote: > On 2009-11-10, Steven D'Aprano wrote: >>> How do you know for sure? Maybe the OP wants to use this thing >>> with 3 known researchers working on a cluster that is not even >>> visible to the outside world. > > And those three researchers are perfect? They've never even > ma

Re: New to Python need on advice on this script

2009-11-10 Thread MRAB
Jim Valenza wrote: Hello all - I'm new to the world of Python as I am a GIS guy who would like to broaden his horizons. I have a question about a script that we've been working on: The purpose of the code is to *Syncronize SDE DropBox with Regulatory Project working files. * I am looking for

Re: New syntax for blocks

2009-11-10 Thread Robert Latest
r wrote: > Forgive me if i don't properly explain the problem but i think the > following syntax would be quite beneficial to replace some redundant > "if's" in python code. > > if something_that_returns_value() as value: > #do something with value > > # Which can replace the following syntacti

DHT for Python 3.x?

2009-11-10 Thread Salim Fadhley
There are plenty of good DHT projects for Python 2.x, however from what I can tell none of them have made the jump to 3.x yet. I'm really keen to support Python 3.x for a project I'm working on. I know that many developers (correctly) consider switching to Python 3 foolish since it is less support

Can't Write File

2009-11-10 Thread Victor Subervi
Hi; I've determined the problem in a script is I can't open a file to write it: script = open(getpic, "w") # where getpic is already defined Here are the permissions: -rwxr-xr-x 1 root root 4649 Nov 10 12:31 start.py What am I doing wrong? TIA, Victor -- http://mail.python.org/mailman/listinfo/

ANN: eGenix pyOpenSSL Distribution 0.9.0-0.9.8l

2009-11-10 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.9.0-0.9.8l An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface fo

Re: Can't Write File

2009-11-10 Thread Victor Subervi
On Tue, Nov 10, 2009 at 3:41 PM, Rami Chowdhury wrote: > On Tue, 10 Nov 2009 12:38:36 -0800, Victor Subervi < > victorsube...@gmail.com> wrote: > > Hi; >> I've determined the problem in a script is I can't open a file to write >> it: >> script = open(getpic, "w") # where getpic is already define

Re: Can't Write File

2009-11-10 Thread Rami Chowdhury
On Tue, 10 Nov 2009 12:57:30 -0800, Victor Subervi wrote: On Tue, Nov 10, 2009 at 3:41 PM, Rami Chowdhury wrote: On Tue, 10 Nov 2009 12:38:36 -0800, Victor Subervi < victorsube...@gmail.com> wrote: Hi; I've determined the problem in a script is I can't open a file to write it: script =

Re: Calendar Stuff

2009-11-10 Thread Dave Angel
(Comments inline, and at end) Victor Subervi wrote: On Tue, Nov 10, 2009 at 2:02 PM, MRAB wrote: Victor Subervi wrote: Hi; I have the following code: import calendar, datetime def cal(): ... myCal = calendar.Calendar(calendar.SUNDAY) today = datetime.date.today() day = today.d

Re: New syntax for blocks

2009-11-10 Thread steve
Hi, On 11/11/2009 12:53 AM, r wrote: Forgive me if i don't properly explain the problem but i think the following syntax would be quite beneficial to replace some redundant "if's" in python code. if something_that_returns_value() as value: #do something with value # Which can replace the

Re: Can't Write File

2009-11-10 Thread Rami Chowdhury
On Tue, 10 Nov 2009 12:38:36 -0800, Victor Subervi wrote: Hi; I've determined the problem in a script is I can't open a file to write it: script = open(getpic, "w") # where getpic is already defined Here are the permissions: -rwxr-xr-x 1 root root 4649 Nov 10 12:31 start.py What am I do

Re: New syntax for blocks

2009-11-10 Thread steve
On 11/11/2009 02:05 AM, steve wrote: Hi, On 11/11/2009 12:53 AM, r wrote: [...snip...] i dunno, just seems to make good sense. You save one line of code but more importantly one indention level. However i have no idea how much trouble the implementation would be? I guess the problem would b

Re: New syntax for blocks

2009-11-10 Thread Bearophile
r: > i think the following syntax would be quite beneficial > to replace some redundant "if's" in python code. http://python.org/dev/peps/pep-3003/ bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: how to create a pip package

2009-11-10 Thread Phlip
except... will pip pull from a simple GitHub repo? or do I need to package something up and put it in a pythonic repository somewhere? -- http://mail.python.org/mailman/listinfo/python-list

RE: New to Python need on advice on this script

2009-11-10 Thread Valentina Boycheva
Jim, In Python 2.5 under ArcMap 9.3 domains can be only listed. To get to the domain values, they need to be converted to tables. Also, the default value cannot be obtained from the existing GP API. Very annoying! The workaround is to use VBA ArcObjects or connect to the database directly, if

Re: module imports and st_mtime

2009-11-10 Thread Aahz
In article , tow wrote: > >Does anyone have any ideas what might be going on, or where further to >look? I'm at a bit of a loss. Try asking on pythonmac-...@python.org -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ [on old computer technologies and programmers

Re: Python as network protocol

2009-11-10 Thread Daniel Fetchinson
>> My point is that hacking can still be a fun and easy-going activity >> when one writes code for himself (almost) without regards to security >> and nasty things like that creeping in from the outside. I'm the king >> in my castle, although I'm fully aware of the fact that my castle >> might be u

Re: Can't Write File

2009-11-10 Thread Dave Angel
Victor Subervi wrote: Hi; I've determined the problem in a script is I can't open a file to write it: script = open(getpic, "w") # where getpic is already defined Here are the permissions: -rwxr-xr-x 1 root root 4649 Nov 10 12:31 start.py What am I doing wrong? TIA, Victor Wrong? 1) you

Re: Python as network protocol

2009-11-10 Thread Ethan Furman
Daniel Fetchinson wrote: I'm the king in my castle, although I'm fully aware of the fact that my castle might be ugly from the outside :) +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as network protocol

2009-11-10 Thread Ethan Furman
Steven D'Aprano wrote: I can only repeat what I said to Daniel: can you guarantee that the nice safe, low-risk environment will never change? If not, then choose a more realistic threat model, and build the walls of your locked box accordingly. Seems to me you can't really *guarentee* anythin

Python-URL! - weekly Python news and links (Nov 10)

2009-11-10 Thread Cameron Laird
QOTW: "Don't get me wrong - innovation often comes from scratching ones personal itch. But you seem to be suffering from a rather bad case of neurodermatitis." - Diez B. Roggisch, on ... well, personal style in problem-solving http://groups.google.com/group/comp.lang.python/msg/4cf102bdd3a3267

Re: New syntax for blocks

2009-11-10 Thread r
On Nov 10, 2:08 pm, Robert Latest wrote: (..snip..) > Also it's not the "if" that is (if at all) redundant here but the assignment. Not exactly. The assignment happens only once just as the boolean check of "if " happens once. The redundancy is in validating the existence of a truthful value cont

Re: can i configure IDLE to use python 3.2 on fedora?

2009-11-10 Thread Aahz
In article , Robert P. J. Day wrote: > > on fedora 11 system, there is no python 3 package so i downloaded >and manually installed (svn checkout) python pre-3.2 in >/usr/local/bin. works fine, but if i install the python-tools >package, "idle" that comes with it is hard-coded(?) to still refer t

Re: Choosing GUI Module for Python

2009-11-10 Thread Simon Hibbs
On 10 Nov, 10:40, Lorenzo Gatti wrote: > I also would like to use PySide, but unlike PyQt and Qt itself it > doesn't seem likely to support Windows in the foreseeable future. A > pity, to put it mildly. It's not been ruled out. They don't officialy support the Mac either, but according to posts

Re: DHT for Python 3.x?

2009-11-10 Thread Martin v. Löwis
Salim Fadhley wrote: > There are plenty of good DHT projects for Python 2.x, however from > what I can tell none of them have made the jump to 3.x yet. > > I'm really keen to support Python 3.x for a project I'm working on. I > know that many developers (correctly) consider switching to Python 3 >

Re: Python C api: create a new object class

2009-11-10 Thread Martin v. Löwis
> How can I create an instance class in Python, currently I do: > > class empty: > pass > > Then anytime I want that class (which I treat like a dictionary): > > o = empty() > o.myattr = 1 > etc > > Is there is a one line syntax to instantiate an instance? > > Any other ways than this: >

Re: Python C api: create a new object class

2009-11-10 Thread Benjamin Peterson
lallous lgwm.org> writes: > Is there is a one line syntax to instantiate an instance? You can't instantiate an instance; it's already instantiated. > > Any other ways than this: > o = new.classobj('object', (), {}) class x: pass > How can I, similarly, create an object "o" in C api: Use PyOb

Re: Threaded import hang in cPickle.dumps

2009-11-10 Thread Benjamin Peterson
Zac Burns gmail.com> writes: > What can I do about this? Not run it in a thread. -- http://mail.python.org/mailman/listinfo/python-list

Re: on "Namespaces"

2009-11-10 Thread Ben Finney
Steven D'Aprano writes: > Modules are namespaces. So are packages. > > Classes and class instances are namespaces. > > Even function scopes are namespaces. Steven implies it with his wording, but to make it explicit: When you have a module, package, class, or instance-of-a-class object, those o

Re: My own accounting python euler problem

2009-11-10 Thread John Machin
On Nov 8, 8:39 am, vsoler wrote: > In the accounting department I am working for we are from time to time > confronted to the following problem: [snip] > My second question is: > 2. this time there are also credit notes outstanding, that is, > invoices with negative amounts. For example,  I=[500,

Re: CGI vs mod_python

2009-11-10 Thread John Nagle
sstein...@gmail.com wrote: On Nov 9, 2009, at 10:18 AM, Victor Subervi wrote: Yes, obviously. But if CGI is enabled, it should work anyway, should it not? Depends on what "CGI is enabled" means. Usually, web servers are not set to just handle cgi scripts from anywhere, but only from specif

Re: how to create a pip package

2009-11-10 Thread Wolodja Wentland
On Tue, Nov 10, 2009 at 13:09 -0800, Phlip wrote: > will pip pull from a simple GitHub repo? or do I need to package > something up and put it in a pythonic repository somewhere? I don't quite understand, but would say: both ;-) You can't tell pip to pull from arbitrary git repositories, but only

Re: is None or == None ?

2009-11-10 Thread Rhodri James
On Tue, 10 Nov 2009 18:55:25 -, Steven D'Aprano wrote: On Tue, 10 Nov 2009 15:46:10 +, Grant Edwards wrote: On 2009-11-10, Rhodri James wrote: On Sun, 08 Nov 2009 19:45:31 -, Terry Reedy wrote: I believe the use of tagged pointers has been considered and so far rejected by

Re: futures - a new package for asynchronous execution

2009-11-10 Thread Aahz
In article , Brian Quinlan wrote: > >I recently implemented a package that I'd like to have include in the >Python 3.x standard library (and maybe Python 2.x) and I'd love to >have the feedback of this list. Any recently implemented library has an extremely high bar before it gets adopted in

Re: pythonw.exe under Windows-7 (Won't run for one admin user)

2009-11-10 Thread Rhodri James
On Tue, 10 Nov 2009 15:39:46 -, SD_V897 wrote: Rhodri James wrote: On Fri, 06 Nov 2009 21:19:44 -, SD_V897 wrote: Rhodri James wrote: On Tue, 03 Nov 2009 16:00:16 -, SD_V897 wrote: I have a perplexing issue, I have four users set up on a W7 computer. The program runs fi

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-10 Thread Carl Banks
On Nov 10, 3:32 am, Ognjen Bezanov wrote: > Hey, > > Thanks for all the responses guys. In hindsight I probably should have > explained why on earth I'd need the physical address from an interpreted > language. > > I'm trying to see if there is any way I can make Python share data > between two ho

Re: Python as network protocol

2009-11-10 Thread geremy condra
On Tue, Nov 10, 2009 at 2:08 PM, Steven D'Aprano wrote: > On Tue, 10 Nov 2009 12:28:49 -0500, geremy condra wrote: > >> Steven, remember a few weeks ago when you tried to explain to me that >> the person who was storing windows administrative passwords using a 40 >> byte xor cipher with the hardco

Re: is None or == None ?

2009-11-10 Thread Vincent Manis
On 2009-11-10, at 07:46, Grant Edwards wrote: > MacOS applications made the same mistake on the 68K. They > reserved the high-end bits At the time the 32-bit Macs were about to come on the market, I saw an internal confidential document that estimated that at least over 80% of the applications

Re: My own accounting python euler problem

2009-11-10 Thread Steven D'Aprano
On Tue, 10 Nov 2009 14:46:49 -0800, John Machin wrote: > The problems that you mention are only a SUBSET of the total problem. > Example: oustanding invoices are for 300, 200, and 100 and the cheque is > for 450 -- in general the total of the cheque amounts does not equal the > total of any possib

Re: Choosing GUI Module for Python

2009-11-10 Thread Antony
On Nov 11, 3:08 am, Simon Hibbs wrote: > On 10 Nov, 10:40, Lorenzo Gatti wrote: > > > I also would like to use PySide, but unlike PyQt and Qt itself it > > doesn't seem likely to support Windows in the foreseeable future. A > > pity, to put it mildly. > > It's not been ruled out. They don't offic

LinkedIn Messages, 11/10/2009

2009-11-10 Thread LinkedIn Communication
LinkedIn REMINDERS: Invitation Reminders: * View Invitation from Frank Pan http://www.linkedin.com/e/I2LlXdLlWUhFABKmxVOlgGLlWUhFAfhMPPF/blk/I379833192_3/0PnP8VcjcPe3ATcQALqnpPbOYWrSlI/svi/ PENDING MESSAGES: There are a total of 4 messages awaiting your res

Re: is None or == None ?

2009-11-10 Thread Steven D'Aprano
On Tue, 10 Nov 2009 16:05:01 -0800, Vincent Manis wrote: > At the time the 32-bit Macs were about to come on the market, I saw an > internal confidential document that estimated that at least over 80% of > the applications that the investigators had looked at (including many > from that company na

  1   2   >