Re: Why an object changes its "address" between adjacent calls?

2018-06-18 Thread sa...@caprilion.com.tw
Grant Edwards at 2018/6/18 PM 10:36 wrote: On 2018-06-17, Jach Fong wrote: C:\Python34\Doc>py Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. import tkinter as tk root = tk.Tk(

Re: Why an object changes its "address" between adjacent calls?

2018-06-17 Thread sa...@caprilion.com.tw
Jim Lee at 2018/6/17 PM 04:10 wrote: On 06/17/2018 12:08 AM, Jach Fong wrote: C:\Python34\Doc>py Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter as tk >>>

Re: What is the "Unpacking Arguments List" rule?

2018-06-13 Thread sa...@caprilion.com.tw
[Of the first part] line 19 is action(progress=progress, *args) where the args is a tuple args = (i, 3) and the function is defined as def action(id, reps, progress): In documents 4.7.2. Keyword Arguments, it says ''' def parrot(voltage, state='a stiff', action='voom', type='Norwe

Installing a newly-built python on windows

2017-04-16 Thread joao . moreira . sa . coutinho
Hi all, I've followed the instructions in the 1st chapter (Getting Started) of the Python Developers's Guide to compile python 3.6 from source, using VS 2017 on a Windows 7 SP1. I successfully built 35 of the 40 subprojects, and the python interpreter in cpython\PCbuild\amd64 is working fine.

Installing a newly-built python on windows

2017-04-16 Thread joao . moreira . sa . coutinho
Hi all, I've followed the instructions in the 1st chapter (Getting Started) of the Python Developers's Guide to compile python 3.6 from source, using VS 2017 on a Windows 7 SP1. I successfully built 35 of the 40 subprojects, and the python interpreter in cpython\PCbuild\amd64 is working fine.

Re: CLI framework using python

2014-10-09 Thread Unix SA
Hello, Go for Optparse.. Look at below docs on how to use it. http://pymotw.com/2/optparse/ Regards, DJ On Thu, Oct 9, 2014 at 5:50 PM, wrote: > Hi, > > I need to develop a python CLI framework. > > For example if i need to set an ip address in linux: > > ifconfig eth0 172.16.25.125 > > I sho

please suggest me best way to learn REST API call with CLI

2014-09-27 Thread Unix SA
Hello, I am intermediate to python and i am familier with OOP, but sometime i lost some where looking at OOP in class and objects :( I am looking at https://github.com/pulp/pulp .. basically it uses okaara to generate CLI and calls API. so for example if i run "pulp-admin -u admin -p admi

Need help in writing some code so i can re-use it in every module or class

2014-02-26 Thread Unix SA
Hello Experts, I have requirement, like i want to use below command in python script. --username --password now my requirement is i want to write some class so i can re-use " --username --password " part via importing as module or class .. and re-use that in other module or classes .. so

Need help with file object

2013-12-12 Thread Unix SA
Hello, I am facing some issue when copying or moving file f=open('/tmp/file1') s=open('/tmp/file2') for line in f: if 'match' not in line: s.write(line) import shutil shutil.move(s, f) With above prog I am getting error TypeError: coercing to Unicode: need sting or buffer, file found W

New Project for rpm spec file creation

2013-12-07 Thread Unix SA
Hello Guys, I am starting new project on github for rpm spec file creation .. currently repository is empty and i am looking for ideas from the people who are experts in creating rpms for different applications please share your ideas to me .. . currently what i know is i can have some templ

Re: Python application for rpm creation

2013-11-29 Thread Unix SA
t; On 11/27/2013 03:28 AM, Amit Saha wrote: > > On Wed, Nov 27, 2013 at 1:39 AM, Unix SA wrote: > >> > >>> Sounds to me more like he is looking to package some other in house > >>> software, as opposed to packaging python specific libraries, etc.

Re: Python application for rpm creation

2013-11-26 Thread Unix SA
mething else for Redhat Linux rpm creation do let me know. Regards, DJ On Mon, Nov 25, 2013 at 10:57 PM, Andrew Heagle wrote: > On Mon, Nov 25, 2013 at 9:17 AM, Unix SA wrote: > >> Hello guys, >> >> Probably not right forum but I thought I should get some suggestio

Re: Python application for rpm creation

2013-11-25 Thread Unix SA
that is that any tool which can help to create SPEC file ?// i am aware of tito.. which can help me for building RPM.. but before that i am looking for tool to create spec file. Regards, DJ On Mon, Nov 25, 2013 at 10:12 PM, Terry Reedy wrote: > On 11/25/2013 9:17 AM, Unix SA wr

Python application for rpm creation

2013-11-25 Thread Unix SA
Hello guys, Probably not right forum but I thought I should get some suggestions. I am looking for some tool written in python which can help users to create rpm spec files and later help to build rpms, this will be for users who are not aware of what spec file is and how to.create rpm. Anyone k

nike shoes , fashi on clothes ; brand hand bags

2010-11-30 Thread SA sada
Dear customers, thank you for your support of our company. Here, there's good news to tell you: The company recently launched a number of new fashion items! ! Fashionable and welcome everyone to come buy. If necessary, please plut: http://www.vipshops.org == http://www.vipshops.org =

Re: Photo gallery software

2008-05-01 Thread Scott SA
On 5/1/08, Jumping Arne ([EMAIL PROTECTED]) wrote: >I've searching for some software that would allow me to present my photos on >the web (I'm not interested a software that generates static pages that I >upload) and there are quite a few, see for example >

Re: Signals/Slots support in Python

2008-05-01 Thread Scott SA
On 5/1/08, Brian Vanderburg II ([EMAIL PROTECTED]) wrote: >I don't know if any such support is already built in, so I ended up >making my own simple signals/slots like mechanism. If anyone is >interested then here it is, along with a simple test. It can connect to >normal functions as well as

Re: PIL and IPTC

2008-04-30 Thread Scott SA
On 4/30/08, Jumping Arne ([EMAIL PROTECTED]) wrote: >I'm completely new to PIL and I'm trying to read IPTC info, I understand that >it's possible but I can't find out how (and for once Google doesn't seem to >be able to help). Does anyone have an example of how it's done? Some basic PIL info: <

Re: @classmethod question

2008-04-29 Thread Scott SA
On 4/23/08, Ivan Illarionov ([EMAIL PROTECTED]) wrote: >On 24 ???, 07:27, Scott SA <[EMAIL PROTECTED]> wrote: >> I'm using the @classemethod decorator for some convenience methods and for > >It would make sense to separate instance-level and class-level >behav

Re: @classmethod question

2008-04-29 Thread Scott SA
On 4/24/08, Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: >> It is a series of convenience methods, in this case I'm interacting >> with a database via an ORM (object-relational model). > >out of curiosity : which one ? I'm rapidly becoming a "django junkie"^TM >> I want the ability >> to call

@classmethod question

2008-04-23 Thread Scott SA
Hi, I'm using the @classemethod decorator for some convenience methods and for some reason, either mental block or otherwise, can't seem to figure out how to elegantly detect if the call is from an instance or not. Here's the problem: Within the class definition, 'isinstance' has nothing to co

Linux Mag's "Introduction to Python Decorators"

2008-04-09 Thread Scott SA
Hi, I've been trying to wrap my head around decorators and in my trails found a very recent article on Linux Mag's website. I didn't see a post here regarding this article and feel it is worth directing interested parties towards: Introduction to Python Decorators Have a web app th

RE: apache/mod_wsgi daemon mode

2008-02-03 Thread Scott SA
On 2/3/08, Brian Smith ([EMAIL PROTECTED]) wrote: >Scott SA wrote: >> I am trying to configure mod_wsgi to run in daemon mode with >> Apache. I can easily get it to run 'normally' under Apache >> but I obtain permission errors _or_ process-failures i

apache/mod_wsgi daemon mode

2008-02-03 Thread Scott SA
HI, I'm posting this here because it is, I believe, a python config issue (mine) that is not correct, but frustration and inexperience has left me without further [visible] options for rectification. I am trying to configure mod_wsgi to run in daemon mode with Apache. I can easily get it to ru

Re: may be a bug in string.rstrip

2007-11-23 Thread Scott SA
On 11/23/07, Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: >> The better option, IMO, is probably to use regex. > >You forgot at least the simplest solution: > >import os.path >os.path.splitext('132.ext')[0] Yes, I did miss that one... and while I was typing there was a nagging feeling I was m

Re: may be a bug in string.rstrip

2007-11-22 Thread Scott SA
On 11/23/07, kyo guan ([EMAIL PROTECTED]) wrote: > Please look at this code: > 'exe.torrent'.rstrip('.torrent') >'ex' <- it should be 'exe', why? > >but this is a right answer: > '120.exe'.rstrip('.exe') >'120' <-- this is a right value. > > the

Re: Interfaces.

2007-11-19 Thread Scott SA
On 11/17/07, Duncan Booth ([EMAIL PROTECTED]) wrote: >Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > >> Benjamin wrote: >>> Python is has duck typing. "If it quacks like a duke, it's duck." >> >> How do dukes quack, exactly? :) > >They quack with a North-eastern Scottish accent of course. > >Th

Re: which Python ? asks beginner

2007-11-17 Thread Scott SA
On 11/17/07, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: >Have given up Java. Want to switch to Python. But _which_ ? >There is ver : > 2.5 out now > 2.6 in beta , final expected Apr 2008 > 3.0 ? in alpha or beta > 3.0 final expected Sep 2008 ? >Will the real python please s

Re: Binary search tree

2007-11-12 Thread Scott SA
On 11/12/07, Scott SA ([EMAIL PROTECTED]) wrote: Uhm sorry, there is a slightly cleaner way of running the second option I presented (sorry for the second post). >If you would find an index and count useful, you could do something like this: > >for idx in range

Re: Binary search tree

2007-11-12 Thread Scott SA
On 11/12/07, Michel Albert ([EMAIL PROTECTED]) wrote: >On Nov 9, 11:45 pm, Bruno Desthuilliers ><[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] a Ècrit : >> >> > Hi, >> >> > I have to get list of URLs one by one and to find the URLs that I have >> > more than one time(can't be more than twice). >>

Looking for contract developer(s) - where can I find them?

2007-02-21 Thread Scott SA
Hi, I've just sent a job listing to python.org and posted this message on comp.lang.python, but am also trying to proactively find python developers through other means. python.org and guru.com notwithstanding, most job-sites to seem only support people/organizations looking for full/part-time e

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread sa
in k: cp:{[c;n;p]+(n#c)_vs(!_ c^n)_dvl,/{2_sv+(,/,/:\:)/(),/:@[x;&x=-1;:[;!c]]}'p} examples: cp[2;3;,0 -1 1] (0 0 0 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1) cp[2;3;(0 -1 1;1 -1 0)] (0 0 0 0 1 0 1 0 1 1 1 1) cp[2;3;(0 -1 1;1 -1 1)] (0 0 0 0 1 0 1 0 0 1 1 0) arguments of cp: c = cardina

bisect and Queue modules in Python 2.4

2006-03-16 Thread SA Trygubenko
Dear All, Python 2.4 (#1, Mar 22 2005, 21:42:42) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Queue >>> q=Queue.Queue() >>> type(q.queue) >>> q.queue used to be a list, and now it is something else?