Re: Newbie question about Python syntax

2019-08-26 Thread Paul St George
On 25/08/2019 02:39, Cameron Simpson wrote: On 24Aug2019 21:52, Paul St George wrote: [snip]> Aside from "map" being a poor name (it is also a builtin Python function), it seems that one creates one of these to control how some rendering process is done. The class reference page you origina

Re: Newbie question about Python syntax

2019-08-24 Thread Cameron Simpson
On 24Aug2019 21:52, Paul St George wrote: Have you not got one of these handed to you from something? Or are you right at the outside with some "opaque" blender handle or something? (Disclaimer: I've never used Blender.) Thank you once again. If I understand your question, I am right outside

Re: Newbie question about Python syntax

2019-08-24 Thread Barry
Have you tried asking on a blender user mailing list for help with this problem? It seems that someone familiar with blender and its python interface should be able to help get you going. Barry > On 24 Aug 2019, at 20:52, Paul St George wrote: > >> On 24/08/2019 01:23, Cameron Simpson wrote:

Re: Newbie question about Python syntax

2019-08-24 Thread Paul St George
On 24/08/2019 01:23, Cameron Simpson wrote: On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions: So,

Re: Newbie question about Python syntax

2019-08-23 Thread Cameron Simpson
On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions: So, I want to look at the attribute of an instan

Re: Newbie question about Python syntax

2019-08-23 Thread Paul St George
On 22/08/2019 23:21, Kyle Stanley wrote: [snip] The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes: https://docs.python.org/3/tutorial/classes.html Section on instantiating objects from

Re: Newbie question about Python syntax

2019-08-22 Thread Kyle Stanley
> You are right, but it is even worse than you think. I do not have a tutorial so I have no examples to understand. The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes: https://docs.python.

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 20:02, Terry Reedy wrote: On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: i

Re: Newbie question about Python syntax

2019-08-22 Thread Terry Reedy
On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ... >>>print(bpy.types.Composi

Re: Newbie question about Python syntax

2019-08-22 Thread Chris Angelico
On Thu, Aug 22, 2019 at 9:20 PM Paul St George wrote: > > On 22/08/2019 11:49, Cameron Simpson wrote: > > On 22Aug2019 09:34, Paul St George wrote: > >> I have the Python API for the Map Value Node here: > >> . > >> > >>

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 11:49, Cameron Simpson wrote: On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as:

Re: Newbie question about Python syntax

2019-08-22 Thread Cameron Simpson
On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy print(bpy.types.CompositorNodeMapVa

Newbie question about Python syntax

2019-08-22 Thread Paul St George
I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ... >>>print(bpy.types.CompositorNodeMapValue.max[0]) If this works, I will d

First Live Online Python Syntax Checker

2017-02-22 Thread 17chiue
ng to convert this project to an XBlock so that online courses (like 6.00.1x) can embed a live python syntax checker for quizzes and assignments online. -- https://mail.python.org/mailman/listinfo/python-list

Re: need some guidance on Python syntax smart editor for use with speech recognition

2015-01-05 Thread Chris Angelico
On Tue, Jan 6, 2015 at 5:18 AM, Eric S. Johansson wrote: > Is there any problem with keeping the conversation going here or would you > prefer some other way of talking about it? I've been hesitant to put my work > up on github because it's flailing about with also the bloody loose ends > because

Re: need some guidance on Python syntax smart editor for use with speech recognition

2015-01-05 Thread Jacob Kruger
ect: Re: need some guidance on Python syntax smart editor for use with speech recognition On 1/5/2015 7:24 AM, Chris Angelico wrote: On Mon, Jan 5, 2015 at 8:34 PM, Jonas Wielicki wrote: As a first iteration, I would try with any editor written in Python. Are you familiar with the ast[1] mo

Re: need some guidance on Python syntax smart editor for use with speech recognition

2015-01-05 Thread Eric S. Johansson
On 1/5/2015 7:24 AM, Chris Angelico wrote: On Mon, Jan 5, 2015 at 8:34 PM, Jonas Wielicki wrote: As a first iteration, I would try with any editor written in Python. Are you familiar with the ast[1] module? It could be worth trying to use this module and perform some kind of pattern matching o

Re: need some guidance on Python syntax smart editor for use with speech recognition

2015-01-05 Thread Eric S. Johansson
On 1/5/2015 3:12 AM, Chris Angelico wrote: On Mon, Jan 5, 2015 at 6:43 PM, Eric S. Johansson wrote: The obvious answer is saving that meta-information in conjunction with the code but when working in a team environment, that information is going to drive you handies up the wall because it's go

Re: need some guidance on Python syntax smart editor for use with speech recognition

2015-01-05 Thread Chris Angelico
On Mon, Jan 5, 2015 at 8:34 PM, Jonas Wielicki wrote: > As a first iteration, I would try with any editor written in Python. > Are you familiar with the ast[1] module? It could be worth trying to > use this module and perform some kind of pattern matching on the > results to recover the informatio

Re: need some guidance on Python syntax smart editor for use with speech recognition

2015-01-05 Thread Jonas Wielicki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Dear Eric, On 05.01.2015 08:43, Eric S. Johansson wrote: > what's a good open editor ( preferably multiplatform) that > actually decomposes Python code into fundamental components such as > class, expression, etc. and, lets you operate on those comp

Re: need some guidance on Python syntax smart editor for use with speech recognition

2015-01-05 Thread Chris Angelico
On Mon, Jan 5, 2015 at 6:43 PM, Eric S. Johansson wrote: > The obvious answer is saving that meta-information in conjunction with the > code but when working in a team environment, that information is going to > drive you handies up the wall because it's going to visually overwhelm the > actual co

need some guidance on Python syntax smart editor for use with speech recognition

2015-01-04 Thread Eric S. Johansson
Some of you will recognize me as someone who pops up occasionally asking questions as I grope my way to a usable speech driven programming environment. My last set of experiments with a technique called togglename and speech driven template notation hit a pretty nasty wall of usability because

Re: Fwd: What's correct Python syntax?

2014-01-14 Thread Larry Hudson
On 01/14/2014 02:03 AM, Igor Korot wrote: [snip] C:\Documents and Settings\Igor.FORDANWORK\Desktop\winpdb>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. test = "I,like,my,chocolate"

Re: What's correct Python syntax?

2014-01-14 Thread emile
On 01/14/2014 02:05 PM, Terry Reedy wrote: On 1/14/2014 3:46 AM, Igor Korot wrote: Hi, ALL, I'm trying to process a file which has following lines: 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 However, I don't need all the protocol info. All I'm interested in is t

Re: What's correct Python syntax?

2014-01-14 Thread Terry Reedy
On 1/14/2014 3:46 AM, Igor Korot wrote: Hi, ALL, I'm trying to process a file which has following lines: 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 However, I don't need all the protocol info. All I'm interested in is the last field, which is length. To directl

Re: What's correct Python syntax?

2014-01-14 Thread Roy Smith
In article , Igor Korot wrote: > I can do it this way: > > >>> testlist = test.split(',') > >>> print testlist[2] > my > > but it will needlessly creates a list on which I will access by the index. Stop worrying about needlessly creating lists. Write the code in a way that works and is easy

Re: What's correct Python syntax?

2014-01-14 Thread Roy Smith
In article , Igor Korot wrote: > Hi, ALL, > I'm trying to process a file which has following lines: > > 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 > > (this is the text file out of tcpdump) > > Now I can esily split the line twice: once by ':' symbol to separate

Re: What's correct Python syntax?

2014-01-14 Thread Ned Batchelder
On 1/14/14 6:33 AM, Peter Otten wrote: Python has no dedicated syntax for picking arbitrary items from a list If you are only concerned about printing use format(): >>>items = ["alpha", "beta", "gamma", "delta"] >>>print "{1} {3} {0}".format(*items) beta delta alpha .format also supports ite

Re: What's correct Python syntax?

2014-01-14 Thread Peter Otten
Igor Korot wrote: > I am actually looking for a way to get a result from split which is > sliced the way I want. Like in my example above. > I mean I can probably make more variable by creating a tuple, but why? > What is the purpose if I want only couple elements out of split. > Doing it Perl way

Re: What's correct Python syntax?

2014-01-14 Thread Alister
On Tue, 14 Jan 2014 00:46:56 -0800, Igor Korot wrote: > Hi, ALL, > I'm trying to process a file which has following lines: > > 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 > > (this is the text file out of tcpdump) > > Now I can esily split the line twice: once by ':

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 4:05:27 PM UTC+5:30, Igor Korot wrote: > Hi, Rustom, > > > > On Tue, Jan 14, 2014 at 2:16 AM, Rustom Mody wrote: > > You want this? > > > test = "I,like,my,chocolate" > test.split(',') > > ['I', 'like', 'my', 'chocolate'] > test.split(',')[2:4] > > ['m

Re: What's correct Python syntax?

2014-01-14 Thread Igor Korot
Hi, Rustom, On Tue, Jan 14, 2014 at 2:16 AM, Rustom Mody wrote: > On Tuesday, January 14, 2014 3:32:24 PM UTC+5:30, Igor Korot wrote: >> Hi, Rustom, > >> On Tue, Jan 14, 2014 at 1:37 AM, Rustom Mody wrote: >> > On Tuesday, January 14, 2014 2:55:00 PM UTC+5:30, Igor Korot wrote: >> >> What if I w

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 3:32:24 PM UTC+5:30, Igor Korot wrote: > Hi, Rustom, > On Tue, Jan 14, 2014 at 1:37 AM, Rustom Mody wrote: > > On Tuesday, January 14, 2014 2:55:00 PM UTC+5:30, Igor Korot wrote: > >> What if I want field 2 and field 3? ("seq 200" and "length 30") > > Wee you did say:

Re: What's correct Python syntax?

2014-01-14 Thread Igor Korot
Hi, Rustom, On Tue, Jan 14, 2014 at 1:37 AM, Rustom Mody wrote: > On Tuesday, January 14, 2014 2:55:00 PM UTC+5:30, Igor Korot wrote: >> >> What if I want field 2 and field 3? ("seq 200" and "length 30") > > Wee you did say: > >> I'm interesred in only one element, so why should care about everyt

Fwd: What's correct Python syntax?

2014-01-14 Thread Igor Korot
Sorry, that was sent to Mark directly. Resending to the list. -- Forwarded message -- From: Igor Korot Date: Tue, Jan 14, 2014 at 1:50 AM Subject: Re: What's correct Python syntax? To: Mark Lawrence Hi, Mark, On Tue, Jan 14, 2014 at 1:37 AM, Mark Lawrence wrote: >

Re: What's correct Python syntax?

2014-01-14 Thread Jussi Piitulainen
Chris Angelico writes: > Alternatively, you can split on the space and take just the very > last word: > > for data in f: > length = data.split(" ")[-1] > # process length Also, data.rsplit(' ', 1) will split data in two at the last space. help(str.rsplit) -- https://mail.python.org/ma

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 2:55:00 PM UTC+5:30, Igor Korot wrote: > > What if I want field 2 and field 3? ("seq 200" and "length 30") Wee you did say: > I'm interesred in only one element, so why should care about everything else? So its not clear what you want! Do you want a one-liner? You

Re: What's correct Python syntax?

2014-01-14 Thread Mark Lawrence
On 14/01/2014 09:25, Igor Korot wrote: Hi, Rustom, On Tue, Jan 14, 2014 at 12:54 AM, Rustom Mody wrote: On Tuesday, January 14, 2014 2:16:56 PM UTC+5:30, Igor Korot wrote: Hi, ALL, I'm trying to process a file which has following lines: 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, s

Re: What's correct Python syntax?

2014-01-14 Thread Igor Korot
Hi, Rustom, On Tue, Jan 14, 2014 at 12:54 AM, Rustom Mody wrote: > On Tuesday, January 14, 2014 2:16:56 PM UTC+5:30, Igor Korot wrote: >> Hi, ALL, >> I'm trying to process a file which has following lines: >> >> 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 >> >> (this

Re: What's correct Python syntax?

2014-01-14 Thread Chris Angelico
On Tue, Jan 14, 2014 at 7:46 PM, Igor Korot wrote: > 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 > > However, I don't need all the protocol info. All I'm interested in is > the last field, which is length. You can split on any string. If you're confident that this is

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 2:16:56 PM UTC+5:30, Igor Korot wrote: > Hi, ALL, > I'm trying to process a file which has following lines: > > 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 > > (this is the text file out of tcpdump) > > > Now I can esily split the line t

What's correct Python syntax?

2014-01-14 Thread Igor Korot
Hi, ALL, I'm trying to process a file which has following lines: 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 (this is the text file out of tcpdump) Now I can esily split the line twice: once by ':' symbol to separate address and the protocol information and the secon

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread BlueFielder
Thanks guys … that too failed. It's late here and I'm bushed. I'll get back to this tomorrow morning. Much appreciated. It's probably important that I point out that I put the file ' fxp2aupreset.py ' in the root directory (ddd) . Just to keep things all together. Again …. I have NO idea how to

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread Chris Angelico
On Sun, Sep 8, 2013 at 1:34 PM, Michael Torrie wrote: > On 09/07/2013 09:09 PM, BlueFielder wrote: >> I 'think' I did as you instructed …. but that too failed. :( >> >> >> CiMac:ddd camforx$ find -type d -execdir bash -c 'cd {}; python >> ./fxp2aupreset.py ./ aumu Alb3 LinP vstdata' \; >> find: i

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread Michael Torrie
On 09/07/2013 09:09 PM, BlueFielder wrote: > I 'think' I did as you instructed …. but that too failed. :( > > > CiMac:ddd camforx$ find -type d -execdir bash -c 'cd {}; python > ./fxp2aupreset.py ./ aumu Alb3 LinP vstdata' \; > find: illegal option -- t > usage: find [-H | -L | -P] [-EXdsx] [-f

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread BlueFielder
I 'think' I did as you instructed …. but that too failed. :( CiMac:ddd camforx$ find -type d -execdir bash -c 'cd {}; python ./fxp2aupreset.py ./ aumu Alb3 LinP vstdata' \; find: illegal option -- t usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression] find [-H | -L | -P] [

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread Chris Angelico
On Sun, Sep 8, 2013 at 12:59 PM, BlueFielder wrote: > > Failed: > > Here is the command with the results: > > > CiMac:ddd camforx$ $ find -type d -execdir bash -c 'cd {}; python > ./fxp2aupreset.py ./ aumu Alb3 LinP vstdata' \; > -bash: $: command not found Oh! Omit the dollar sign, tha

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread BlueFielder
Failed: Here is the command with the results: CiMac:ddd camforx$ $ find -type d -execdir bash -c 'cd {}; python ./fxp2aupreset.py ./ aumu Alb3 LinP vstdata' \; -bash: $: command not found -- With CiMac = HD ddd = folder on the desktop of user camforx -- https://mail.python.o

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread BlueFielder
On Saturday, September 7, 2013 9:56:25 PM UTC-4, Chris Angelico wrote: > Your initial command and path suggest you're on a Unix-like system > > (these days that most likely means either Linux or Mac OS), but the > > FOR command at the end is a Windows command, so that's not going to > > work. H

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread Chris Angelico
On Sun, Sep 8, 2013 at 11:41 AM, BlueFielder wrote: > 3. Then I run the script from terminal : python ./fxp2aupreset.py ./ aumu > Alb3 LinP vstdata > > It executes fine and does it's job. > > BUT… I have per 7600 files that are segregated into 86 folders. > I want to keep this folder structure. >

Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread BlueFielder
I'm NOT a programmer…. but I have a little Python script that converts files, that are in a folder, from one format to another. Script = fxp2aupreset.py I can successfully run it from the command line: 1st, I placed the folder that I named 'ddd' on the desktop so that it's easy to get to. 2

Re: Help Documenting Python Syntax

2010-11-10 Thread RJB
On Nov 9, 8:14 am, Grant Edwards wrote: > On 2010-11-09, Terry Reedy wrote: > > > On 11/9/2010 10:26 AM, RJB wrote: > >> I have been trying to redevelop a syntax page for Python at > >>      http://cse.csusb.edu/dick/samples/python.syntax.html > > > Page does not load correctly; had to hit refres

Re: Help Documenting Python Syntax

2010-11-10 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > My question is why bother with 2.5? In mitigation, your honour, let me plead that the latest Debian Stable still ships with that version. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help Documenting Python Syntax

2010-11-09 Thread Terry Reedy
On 11/9/2010 10:26 AM, RJB wrote: I have been trying to redevelop a syntax page for Python at http://cse.csusb.edu/dick/samples/python.syntax.html Page does not load correctly; had to hit refresh to get entire page. It should specify that this is the syntax for Python 2.5. To me "the Pyt

Re: Help Documenting Python Syntax

2010-11-09 Thread Grant Edwards
On 2010-11-09, Terry Reedy wrote: > On 11/9/2010 10:26 AM, RJB wrote: >> I have been trying to redevelop a syntax page for Python at >> http://cse.csusb.edu/dick/samples/python.syntax.html > > Page does not load correctly; had to hit refresh to get entire page. > It should specify that this

Help Documenting Python Syntax

2010-11-09 Thread RJB
I have been trying to redevelop a syntax page for Python at http://cse.csusb.edu/dick/samples/python.syntax.html I would appreciate and encouragement or corrections -- because I know there is at least one gross error in there. By the way, this is part of a suite of language definitions... go

Re: History of python syntax development?

2009-04-14 Thread Chris Rebert
On Tue, Apr 14, 2009 at 10:01 AM, Ritwik wrote: > Hi all, > I'm doing some work in programming languages and I'm looking for a > short history of python development, from the point of view of the > initial development of the syntax. I know I can go through the mailing > lists and news groups (and

Re: History of python syntax development?

2009-04-14 Thread Daniel Fetchinson
> I'm doing some work in programming languages and I'm looking for a > short history of python development, from the point of view of the > initial development of the syntax. I know I can go through the mailing > lists and news groups (and I am doing that at the moment), and the > python history bl

History of python syntax development?

2009-04-14 Thread Ritwik
Hi all, I'm doing some work in programming languages and I'm looking for a short history of python development, from the point of view of the initial development of the syntax. I know I can go through the mailing lists and news groups (and I am doing that at the moment), and the python history blog

Re: Python syntax

2009-04-08 Thread Mensanator
On Apr 7, 11:39 pm, Lawrence D'Oliveiro wrote: > In message , Steve > > Holden wrote: > > Lawrence D'Oliveiro wrote: > > >> In message <7dd228af- > >> e549-444d-8623-11e951851...@y9g2000yqg.googlegroups.com>, janus99 wrote: > > >>> I messed around with my own comp (windos xp) command prompt ... >

Re: Python syntax

2009-04-07 Thread Lawrence D'Oliveiro
In message , Steve Holden wrote: > Lawrence D'Oliveiro wrote: > >> In message <7dd228af- >> e549-444d-8623-11e951851...@y9g2000yqg.googlegroups.com>, janus99 wrote: >> >>> I messed around with my own comp (windos xp) command prompt ... >> >> Try a Linux command prompt. You'll learn a bit more t

Re: Python syntax

2009-04-07 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <7dd228af- > e549-444d-8623-11e951851...@y9g2000yqg.googlegroups.com>, janus99 wrote: > >> I messed around with my own comp (windos xp) command prompt ... > > Try a Linux command prompt. You'll learn a bit more that way. > Great advice when Linux is availa

Re: Python syntax

2009-04-07 Thread Lawrence D'Oliveiro
In message <7dd228af- e549-444d-8623-11e951851...@y9g2000yqg.googlegroups.com>, janus99 wrote: > I messed around with my own comp (windos xp) command prompt ... Try a Linux command prompt. You'll learn a bit more that way. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax

2009-04-07 Thread Dave Angel
ompt and i currently play a mud, but the python syntax is completly diffrent, i was wondering if u could expalin how to syntax goes, i've tried the "hello world" but it keep displaying syntax error, i've tried entering random commands, e.g find,search, collect,... dorzey&

Re: Python syntax

2009-04-07 Thread dorzey
http://wiki.python.org/moin/BeginnersGuide is probably a good place to start. I found lots of useful info from the links on this page when I started programming in Python. Dorzey -- http://mail.python.org/mailman/listinfo/python-list

Python syntax

2009-04-07 Thread janus99
play a mud, but the python syntax is completly diffrent, i was wondering if u could expalin how to syntax goes, i've tried the "hello world" but it keep displaying syntax error, i've tried entering random commands, e.g find,search, collect,... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax question

2008-10-21 Thread Gabriel Genellina
En Mon, 13 Oct 2008 13:50:03 -0300, Daniel <[EMAIL PROTECTED]> escribió: RPyC is use in pyscripter to provide remote debugging. I was having trouble getting the RPyC module working, and the reason is that the RPyC site only provides a download for Python 3 (not sure why, since I suspect that

Re: Python syntax question

2008-10-13 Thread Daniel
> > David Blubaugh > > -Original Message- > From: Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 08, 2008 3:11 PM > To: [EMAIL PROTECTED] > Subject: Re: Python syntax question > > On Oct 8, 12:07 pm, Marc 'BlackJack' Rintsch <[EMAIL PRO

Re: Python syntax question

2008-10-08 Thread Diez B. Roggisch
Blubaugh, David A. schrieb: Sir, I was just wondering that the module that you are utilizing (Rpyc) is a remote process call module for python? Is this what you are developing with at this time? Are you internetically challenged? http://www.google.de/search?q=rpyc&ie=utf-8&oe=utf-8&aq=t&rls

RE: Python syntax question

2008-10-08 Thread Blubaugh, David A.
, 2008 3:11 PM To: python-list@python.org Subject: Re: Python syntax question On Oct 8, 12:07 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 08 Oct 2008 11:02:49 -0700, Daniel wrote: > > Here is one error I get when I try to import it: > > >&

Re: Python syntax question

2008-10-08 Thread Daniel
On Oct 8, 12:07 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 08 Oct 2008 11:02:49 -0700, Daniel wrote: > > Here is one error I get when I try to import it: > > import Rpyc > > Traceback (most recent call last): > >   File "", line 1, in > >   File "C:\Python25\lib\site-pa

Re: Python syntax question

2008-10-08 Thread Marc 'BlackJack' Rintsch
On Wed, 08 Oct 2008 11:02:49 -0700, Daniel wrote: > Here is one error I get when I try to import it: > import Rpyc > Traceback (most recent call last): > File "", line 1, in > File "C:\Python25\lib\site-packages\Rpyc\__init__.py", line 7, in > > from Rpyc.Lib import rpyc_excepthook

Python syntax question

2008-10-08 Thread Daniel
I hope this question is OK for this list. I've downloaded Rpyc and placed it in my site packages dir. On some machines it works fine, on others not so much. Here is one error I get when I try to import it: >>> import Rpyc Traceback (most recent call last): File "", line 1, in File "C:\Pyth

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Aaron "Castironpi" Brady
On Sep 24, 9:49 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > On Sep 25, 11:57 am, "Aaron \"Castironpi\" Brady" > > <[EMAIL PROTECTED]> wrote: > > On Sep 24, 8:40 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > > > ... I think > > > your last version ('%d thing%s' % (i, 's' if i != 1 else '')), holding

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Asun Friere
On Sep 25, 11:57 am, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Sep 24, 8:40 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > > ... I think > > your last version ('%d thing%s' % (i, 's' if i != 1 else '')), holding > > all variables for placeholders in the tuple, is better. It's certa

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Aaron "Castironpi" Brady
On Sep 24, 8:40 pm, Asun Friere <[EMAIL PROTECTED]> wrote: > On Sep 25, 3:16 am, Pete Forman <[EMAIL PROTECTED]> wrote: > > > Asun Friere <[EMAIL PROTECTED]> writes: > > >  > A canonical use of the conditional operator is in > >  > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). > >

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Asun Friere
On Sep 25, 3:16 am, Pete Forman <[EMAIL PROTECTED]> wrote: > Asun Friere <[EMAIL PROTECTED]> writes: > > > A canonical use of the conditional operator is in > > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). > > That fails for n == 1. So what is best? > Sorry missing paranthese

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Asun Friere
On Sep 25, 3:16 am, Pete Forman <[EMAIL PROTECTED]> wrote: > Asun Friere <[EMAIL PROTECTED]> writes: > > > A canonical use of the conditional operator is in > > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). > > That fails for n == 1. So what is best? > Sorry missing parenthese

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Pete Forman
Asun Friere <[EMAIL PROTECTED]> writes: > A canonical use of the conditional operator is in > pluralising words, (eg. '%s dollar' % n + 's' if n!=1 else ''). That fails for n == 1. So what is best? for i in range(4): print '%d thing' % i + ('s' if i != 1 else '') for i in range(4): p

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Asun Friere
On Sep 24, 9:52 am, Neal Becker <[EMAIL PROTECTED]> wrote: > In hindsight, I am disappointed with the choice of conditional syntax. I > know it's too late to change. The problem is > > y = some thing or other if x else something_else > > When scanning this my eye tends to see the first phrase an

Re: python syntax for conditional is unfortunate

2008-09-24 Thread Bruno Desthuilliers
Neal Becker a écrit : (snip) I find I'm often tripped up by: x = Y (lots of constructor arguments) if something ... on first glance, I don't notice the if. Indeed. The inline conditionnal syntax is obviously innappropriate here. It's just like list-comprehensions : just fine for simple

Re: python syntax for conditional is unfortunate

2008-09-23 Thread Roy Smith
"Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > You're out of options. You have to express it somehow. How about: Assignith z the value of x if the value of b is such that it is true, else assignith it the value of y. Assignith z not the value of w, nor the value of v, lest you ra

Re: python syntax for conditional is unfortunate

2008-09-23 Thread namekuseijin
On 23 set, 22:50, Neal Becker <[EMAIL PROTECTED]> wrote: > I find I'm often tripped up by: > > x = Y (lots of  constructor arguments) if something ... > > on first glance, I don't notice the if. Nobody does. This peculiar syntax has much better usage in short expressions. dothis if this else

Re: python syntax for conditional is unfortunate

2008-09-23 Thread Aaron "Castironpi" Brady
On Sep 23, 8:50 pm, Neal Becker <[EMAIL PROTECTED]> wrote: > Aaron "Castironpi" Brady wrote: > > On Sep 23, 6:52 pm, Neal Becker <[EMAIL PROTECTED]> wrote: > >> In hindsight, I am disappointed with the choice of conditional syntax.  I > >> know it's too late to change.  The problem is > > >> y = so

Re: python syntax for conditional is unfortunate

2008-09-23 Thread Neal Becker
Aaron "Castironpi" Brady wrote: > On Sep 23, 6:52 pm, Neal Becker <[EMAIL PROTECTED]> wrote: >> In hindsight, I am disappointed with the choice of conditional syntax. I >> know it's too late to change. The problem is >> >> y = some thing or other if x else something_else >> >> When scanning this

Re: python syntax for conditional is unfortunate

2008-09-23 Thread namekuseijin
On 23 set, 20:52, Neal Becker <[EMAIL PROTECTED]> wrote: > In hindsight, I am disappointed with the choice of conditional syntax.  I > know it's too late to change.  The problem is > > y = some thing or other if x else something_else > > When scanning this my eye tends to see the first phrase and

Re: python syntax for conditional is unfortunate

2008-09-23 Thread Aaron "Castironpi" Brady
On Sep 23, 6:52 pm, Neal Becker <[EMAIL PROTECTED]> wrote: > In hindsight, I am disappointed with the choice of conditional syntax.  I > know it's too late to change.  The problem is > > y = some thing or other if x else something_else > > When scanning this my eye tends to see the first phrase an

Re: python syntax for conditional is unfortunate

2008-09-23 Thread Ben Finney
Cameron Simpson <[EMAIL PROTECTED]> writes: > A good coder will present things clearly. For trivial stuff the one > line form may be fine, and for longer stuff then this: > > y = some thing or other \ > if x \ > else something_else Parentheses are usually more robust for multi-line

Re: python syntax for conditional is unfortunate

2008-09-23 Thread Cameron Simpson
On 23Sep2008 19:52, Neal Becker <[EMAIL PROTECTED]> wrote: | In hindsight, I am disappointed with the choice of conditional syntax. | I know it's too late to change. The problem is | | y = some thing or other if x else something_else | | When scanning this my eye tends to see the first phrase an

python syntax for conditional is unfortunate

2008-09-23 Thread Neal Becker
In hindsight, I am disappointed with the choice of conditional syntax. I know it's too late to change. The problem is y = some thing or other if x else something_else When scanning this my eye tends to see the first phrase and only later notice that it's conditioned on x (or maybe not notice

Re: Need help in writing up a Python Syntax checker

2008-07-31 Thread [EMAIL PROTECTED]
On Jul 14, 8:22 am, Kinokunya <[EMAIL PROTECTED]> wrote: > Hi guys, > > My group and I will be working on our final year project, the scope to > do a program/web-based application similar areas of functionalities > like thePyLintand PyChecker; a Python syntax checker

Re: Need help in writing up a Python Syntax checker

2008-07-14 Thread Kinokunya
r areas of functionalities > > like the PyLint and PyChecker; a Python syntax checker. We have no > > Python background, equipped only with some knowledge of Java and Dot > > net. > > Python doesn't need a syntax checker. Syntax is checked by the parser > and the

Re: Need help in writing up a Python Syntax checker

2008-07-14 Thread Kay Schluehr
On 14 Jul., 08:22, Kinokunya <[EMAIL PROTECTED]> wrote: > Hi guys, > > My group and I will be working on our final year project, the scope to > do a program/web-based application similar areas of functionalities > like the PyLint and PyChecker; a Python syntax checker

Need help in writing up a Python Syntax checker

2008-07-13 Thread Kinokunya
Hi guys, My group and I will be working on our final year project, the scope to do a program/web-based application similar areas of functionalities like the PyLint and PyChecker; a Python syntax checker. We have no Python background, equipped only with some knowledge of Java and Dot net. We did

Re: Python Syntax and misspelled variable and method name checker?

2008-05-08 Thread castironpi
On May 8, 1:06 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > neerashish schrieb: > > > > > Is there a good Python Syntax and mis-spelled variable and method name > > checker available. > > > I have been programming in python for last 6 mon

Re: Python Syntax and misspelled variable and method name checker?

2008-05-08 Thread Diez B. Roggisch
neerashish schrieb: Is there a good Python Syntax and mis-spelled variable and method name checker available. I have been programming in python for last 6 months and misspelled variables and method names have been bane of my python life. In complied languages, compiler checks for these

Python Syntax and misspelled variable and method name checker?

2008-05-08 Thread neerashish
Is there a good Python Syntax and mis-spelled variable and method name checker available. I have been programming in python for last 6 months and misspelled variables and method names have been bane of my python life. In complied languages, compiler checks for these mistakes. I come from Java

Re: python syntax

2008-01-07 Thread Fredrik Lundh
mpho raborife wrote: > Please help me get this syntax right: > > os.system("HCopy -T 1 -C" 'os.path.join(conf_dir, "/hcopy.conf")' "-S" > 'os.path.join(list_dir, "hcopy_list.txt")') instead of attempting to get your program working by random trial and error process, maybe you should spend an

python syntax

2008-01-07 Thread mpho raborife
I need help with the following: os.system("gmmscore"+"-i" + Input + "-l" + List + "-t" + str(modeltype) + "-m" + str(mixture) + "-d" + str(dimension) + "-v" + str(vfloor) + "-n" + str(number) + "-r" + results) - Never miss a thing. Make Yahoo your homepa

Re: python syntax

2008-01-07 Thread Guilherme Polo
2008/1/7, mpho raborife <[EMAIL PROTECTED]>: > Thanks. So could you please help me with this one: > subprocess.Popen(["gmmscore", "-i", Input, "-l", List, "-t", modeltype, > "-m", mixture, "-d", dimension, "-v", vfloor, "-n", number, "-r", results]) Only if you tell the problem. But I guess that y

  1   2   >