Re: newbie

2020-09-10 Thread edmondo . giovannozzi
You can also have a look at www.scipy.org where you can find some packages used for scientific programming like numpy, scipy, matplotlib. The last one is a graphic package that may be useful to make some initial plots. Il giorno martedì 8 settembre 2020 22:57:36 UTC+2, Don Edwards ha scritto: >

Re: newbie

2020-09-09 Thread Michael Torrie
On 9/8/20 7:24 PM, Grant Edwards wrote: > On 2020-09-08, Don Edwards wrote: > >> I may need. My aim is to write a program >> that simulates croquet - 2 balls colliding with the strikers (cue) ball >> going into the hoop (pocket), not the target ball. I want to be able to >> move the balls around

Re: newbie

2020-09-09 Thread Cameron Simpson
On 09Sep2020 01:24, Grant Edwards wrote: >On 2020-09-08, Don Edwards wrote: >> I may need. My aim is to write a program >> that simulates croquet - 2 balls colliding with the strikers (cue) ball >> going into the hoop (pocket), not the target ball. I want to be able to >> move the balls around

Re: newbie

2020-09-08 Thread Grant Edwards
On 2020-09-08, Don Edwards wrote: > I may need. My aim is to write a program > that simulates croquet - 2 balls colliding with the strikers (cue) ball > going into the hoop (pocket), not the target ball. I want to be able to > move the balls around and draw trajectory lines to evaluate different

Re: newbie

2020-09-08 Thread Cameron Simpson
On 08Sep2020 10:22, Don Edwards wrote: >Purchased the book python-basics-2020-05-18.pdf a few days ago. >To direct my learning I have a project in mind as per below; A project is an excellent way to learn something; personally I find it hard to learn something without something to which to

newbie

2020-09-08 Thread Don Edwards
Purchased the book python-basics-2020-05-18.pdf a few days ago. To direct my learning I have a project in mind as per below; Just started learning python 3.8. At 76 I will be a bit slow but fortunately decades ago l learnt pascal. I am not asking programming help just guidance toward package(s) I

Re: Modify Python code as newbie

2020-01-17 Thread MRAB
On 2020-01-18 00:34, ron.egg...@ecoation.com wrote: Hi, I'm semi new to Python but need to modify a program that calls the mqtt_client.publish() function from aws iot. Now, if the publish function fails, it raises an exception. I need to change the code so that when an exception is raised,

modify python code as newbie

2020-01-17 Thread ron . eggler
Hi, I'm semi new to Python but need to modify a program that calls the mqtt_client.publish() function from aws iot. Now, when the publish function fails, it raises an exception. I need to change the code so that when an exception is raised, instead of giving up, it should retry

Modify Python code as newbie

2020-01-17 Thread ron . eggler
Hi, I'm semi new to Python but need to modify a program that calls the mqtt_client.publish() function from aws iot. Now, if the publish function fails, it raises an exception. I need to change the code so that when an exception is raised, instead of giving up, it should retry. Here's some

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-28 Thread RobH
On 28/09/2019 15:59, Dennis Lee Bieber wrote: On Fri, 27 Sep 2019 19:46:58 +0100, RobH declaimed the following: Thanks for all that information, but first of all using just import adafruit blinka did not work as it returned bas: import: command not found. Were you in the Python3

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-27 Thread RobH
On 27/09/2019 15:28, Dennis Lee Bieber wrote: On Fri, 27 Sep 2019 10:48:29 +0100, RobH declaimed the following: Ok, the adafruit_character_lcd is in the same directory as yours, and so is Blinka and Purio. It seems to be a bit of a long path to type to get to the Adafruit_Charlcd directory,

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-27 Thread RobH
On 27/09/2019 04:51, Dennis Lee Bieber wrote: On Thu, 26 Sep 2019 23:04:15 +0100, RobH declaimed the following: As I said, I have downloaded the circuitpython chalcd files from the link using pip3 install, but after downloading I can't find any Adafruit folders on my pi zero. Doing a

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread DL Neil via Python-list
-circuitpython """ ... As I said I am a newbie with python and I did not realise that this would do what I wanted, doh! We all have to start somewhere! As it happens, I was hoping to work on a Raspberry Pi4 project, and have been looking at adding cameras and displays. Sad

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread RobH
ux (also applies to BeagleBone Black, as I recall) Thanks for that, as I didn't realise it was deprecated, and have downloaded the circuitpython charLCD files. Also, I note on the site from the link for circuitpython, there is information and examples of how to put text on 2 lines, usin

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread RobH
agleBone Black, as I recall) Thanks for that, as I didn't realise it was deprecated, and have downloaded the circuitpython charLCD files. Also, I note on the site from the link for circuitpython, there is information and examples of how to put text on 2 lines, using the embedded newlin

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread RobH
On 26/09/2019 15:22, Chris Angelico wrote: On Thu, Sep 26, 2019 at 9:01 PM RobH wrote: import Adafruit_CharLCD as LCD # Raspberry Pi pin configuration: Ah, it's an RPi with Adafruit. That's the same library that my brother uses. I don't know much of the details, but in case it's helpful,

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread RobH
On 26/09/2019 12:55, Rhodri James wrote: On 26/09/2019 11:58, RobH wrote: Thanks, but was is Python REPR. DL was referring to the interactive program you get when you type "python" at a Linux or Windows command prompt.  Here's an example, copied from my Linux box: rhodri@scrote:~$ python

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread Chris Angelico
On Thu, Sep 26, 2019 at 9:01 PM RobH wrote: > > import Adafruit_CharLCD as LCD > > > # Raspberry Pi pin configuration: Ah, it's an RPi with Adafruit. That's the same library that my brother uses. I don't know much of the details, but in case it's helpful, here's the code that currently runs his

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread Rhodri James
On 26/09/2019 11:58, RobH wrote: Thanks, but was is Python REPR. DL was referring to the interactive program you get when you type "python" at a Linux or Windows command prompt. Here's an example, copied from my Linux box: rhodri@scrote:~$ python Python 2.7.15+ (default, Jul 9 2019,

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread RobH
On 26/09/2019 11:08, DL Neil wrote: On 26/09/19 9:14 PM, RobH wrote: I have some sample/demo python code for scrolling and outputting text onto a 16x2 lcd display. I would like to put my own message or text outputting to the lcd on 2 lines. I have tried using lcd.message('my message',1) and

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread DL Neil via Python-list
On 26/09/19 9:14 PM, RobH wrote: I have some sample/demo python code for scrolling and outputting text onto a 16x2 lcd display. I would like to put my own message or text outputting to the lcd on 2 lines. I have tried using lcd.message('my message',1) and lcd.message('my message', 2), but

NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread RobH
I have some sample/demo python code for scrolling and outputting text onto a 16x2 lcd display. I would like to put my own message or text outputting to the lcd on 2 lines. I have tried using lcd.message('my message',1) and lcd.message('my message', 2), but the output says: TypeError:

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

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

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:

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

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

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:

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:

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 ...

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

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

Re: newbie question

2019-08-01 Thread Sidney Langweil
On Thursday, August 1, 2019 at 7:57:31 AM UTC-7, Calvin Spealman wrote: > Sorry, but you can't. If you have two python modules, neither has access to > things in the other without an import. > > That's the whole point of an import. > > On Thu, Aug 1, 2019 at 10:30 AM Sidney Langweil > wrote: >

Re: newbie question

2019-08-01 Thread Calvin Spealman
Sorry, but you can't. If you have two python modules, neither has access to things in the other without an import. That's the whole point of an import. On Thu, Aug 1, 2019 at 10:30 AM Sidney Langweil wrote: > A Python script invokes a function in another file in the same directory. > > I would

newbie question

2019-08-01 Thread Sidney Langweil
A Python script invokes a function in another file in the same directory. I would like to invoke that function without the need for an import. I think I read that having an empty __init__.py is sufficient. But it does not seem to work for me. I'm sure this is obvious to many of you. Thanks

tix.FileSelectBox causes crash: was A newbie question about using tix

2019-05-03 Thread David Sumbler
On Wed, 2019-05-01 at 19:11 +0100, MRAB wrote: > On 2019-05-01 17:44, David Sumbler wrote: > > > > On Tue, 2019-04-30 at 20:46 +0100, MRAB wrote: ... > > > For some reason, tix widgets don't work with normal tkinter > widgets, > > > so > > > you can't put a tix FileSelectBox on a

Re: A newbie question about using tix

2019-05-01 Thread MRAB
On 2019-05-01 17:44, David Sumbler wrote: > > On Tue, 2019-04-30 at 20:46 +0100, MRAB wrote: > > On 2019-04-30 16:40, David Sumbler wrote: > > > Running Ubuntu 18.04, Python 3.6.7, tkinter 8.6 > > > > > > I am very new to tkinter.  The simple program I am writing requires > > > a > > > user file

Re: A newbie question about using tix

2019-05-01 Thread David Sumbler
On Tue, 2019-04-30 at 20:46 +0100, MRAB wrote: > On 2019-04-30 16:40, David Sumbler wrote: > > Running Ubuntu 18.04, Python 3.6.7, tkinter 8.6 > > > > I am very new to tkinter. The simple program I am writing requires > > a > > user file to be selected before it does anything else, so I would

Re: A newbie question about using tix

2019-04-30 Thread MRAB
On 2019-04-30 16:40, David Sumbler wrote: Running Ubuntu 18.04, Python 3.6.7, tkinter 8.6 I am very new to tkinter. The simple program I am writing requires a user file to be selected before it does anything else, so I would like a file selection dialog in the main window as soon as the

A newbie question about using tix

2019-04-30 Thread David Sumbler
Running Ubuntu 18.04, Python 3.6.7, tkinter 8.6 I am very new to tkinter. The simple program I am writing requires a user file to be selected before it does anything else, so I would like a file selection dialog in the main window as soon as the program launches. Tkinter only has

Re: TKinter Newbie question

2019-01-18 Thread TUA
Thanks for your fresh pair of eyes! -- https://mail.python.org/mailman/listinfo/python-list

Re: TKinter Newbie question

2019-01-17 Thread Peter Otten
TUA wrote: > Why does the button frame in the code below not show? > tk.Button(bf, padx = 10, relief = tk.GROOVE, text = 'Help') You forgot to layout it with .pack(). > I intend to have it displayed in between the notebook at the top and the > fake statusbar at the bottom. I think for

TKinter Newbie question

2019-01-17 Thread TUA
Why does the button frame in the code below not show? I intend to have it displayed in between the notebook at the top and the fake statusbar at the bottom. Thanks for any help! from tkinter import ttk import tkinter as tk class MainForm(): def __init__(self, master):

Re: RE newbie question

2018-04-18 Thread Steven D'Aprano
On Wed, 18 Apr 2018 12:37:29 -0700, TUA wrote: > My intention is to implement a max. length of 8 for an input string. The > above works well in all other respects, but does allow for strings that > are too long. if len(input_string) > 8: raise ValueError('string is too long') -- Steve

Re: RE newbie question

2018-04-18 Thread Albert-Jan Roskam
On Apr 18, 2018 21:42, TUA wrote: > > import re > > compval = 'A123456_8' > regex = '[a-zA-Z]\w{0,7}' > > if re.match(regex, compval): >print('Yes') > else: >print('No') > > > My intention is to implement a max. length of 8 for an input string. The > above works

Re: RE newbie question

2018-04-18 Thread TUA
Thanks much! -- https://mail.python.org/mailman/listinfo/python-list

Re: RE newbie question

2018-04-18 Thread Ian Kelly
On Wed, Apr 18, 2018 at 1:57 PM, Rob Gaddi wrote: > On 04/18/2018 12:37 PM, TUA wrote: >> >> import re >> >> compval = 'A123456_8' >> regex = '[a-zA-Z]\w{0,7}' >> >> if re.match(regex, compval): >> print('Yes') >> else: >> print('No') >> >> >> My

Re: RE newbie question

2018-04-18 Thread Rob Gaddi
On 04/18/2018 12:37 PM, TUA wrote: import re compval = 'A123456_8' regex = '[a-zA-Z]\w{0,7}' if re.match(regex, compval): print('Yes') else: print('No') My intention is to implement a max. length of 8 for an input string. The above works well in all other respects, but does allow

RE newbie question

2018-04-18 Thread TUA
import re compval = 'A123456_8' regex = '[a-zA-Z]\w{0,7}' if re.match(regex, compval): print('Yes') else: print('No') My intention is to implement a max. length of 8 for an input string. The above works well in all other respects, but does allow for strings that are too long. What is

Re: ARGPARSE Newbie question

2018-04-17 Thread TUA
Thanks for the pointers! -- https://mail.python.org/mailman/listinfo/python-list

Re: ARGPARSE Newbie question

2018-04-17 Thread paulclarke345
On Tuesday, April 17, 2018 at 7:09:45 PM UTC-5, TUA wrote: > I'd like to create a script that handles a number of verbs with mandatory and > /or optional parameters like listed in the table below. > > Can ARGPARSE do this and how? > > Thanks for all help! > > > > > > Script Verb

ARGPARSE Newbie question

2018-04-17 Thread TUA
I'd like to create a script that handles a number of verbs with mandatory and /or optional parameters like listed in the table below. Can ARGPARSE do this and how? Thanks for all help! Script VerbMandatory parameters Optional parameters

Newbie ARGPARSE question

2018-04-17 Thread TUA
I just discovered ARGPARSE 5 minutes ago and cannot figure this one out: What does the Parser.add_argument() call have to look like when I need an option 'add' that requires the mandatory parameters 'type' (string), 'size' (int), 'sid' (string) and must also handle the optional parameters

Re: [newbie] how to remove empty lines from webpage/file

2018-02-27 Thread Dan Stromberg
Perhaps replace: lines=soup.get_text() file.write(lines) ...with something like: text = soup.get_text() lines = text.split('\n') for line in lines: if line.strip(): file.write('%s\n' % (line, )) (untested) On Tue, Feb 27, 2018 at 2:50 AM, wrote: > Dear

[newbie] how to remove empty lines from webpage/file

2018-02-27 Thread jenswaelkens
Dear all, I try to get the numerical data from the following webpage: http://www.astro.oma.be/GENERAL/INFO/nzon/zon_2018.html With the following code-fragment I was already able to get a partial result: #!/usr/bin/env python #memo: install bs4 as follows: sudo easy_install bs4 # -*- coding:

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Bernie Connors
On Tuesday, September 26, 2017 at 12:32:18 PM UTC-3, Bernie Connors wrote: > Hello, > > My first post here on C.L.P. I have only written a few python scripts > in 2.7 and now I'm trying my first python 3 script. Can you tell me why this > snippet won't run? > --- >

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Peter Otten
Bernie Connors wrote: > On Tuesday, September 26, 2017 at 12:32:18 PM UTC-3, Bernie Connors wrote: >> Hello, >> >> My first post here on C.L.P. I have only written a few python >> scripts in 2.7 and now I'm trying my first python 3 script. Can >> you tell me why this snippet

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Bernie Connors
On Tuesday, September 26, 2017 at 12:32:18 PM UTC-3, Bernie Connors wrote: > Hello, > > My first post here on C.L.P. I have only written a few python scripts > in 2.7 and now I'm trying my first python 3 script. Can you tell me why this > snippet won't run? > --- >

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread MRAB
On 2017-09-26 16:31, berniejconn...@gmail.com wrote: Hello, My first post here on C.L.P. I have only written a few python scripts in 2.7 and now I'm trying my first python 3 script. Can you tell me why this snippet won't run? --- from urllib.request import urlopen

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Thomas Jollans
On 2017-09-26 17:31, berniejconn...@gmail.com wrote: > Hello, > > My first post here on C.L.P. I have only written a few python scripts > in 2.7 and now I'm trying my first python 3 script. Can you tell me why this > snippet won't run? What do you mean, "won't run"? Is there an error

Newbie problem with urllib.request.urlopen

2017-09-26 Thread berniejconnors
Hello, My first post here on C.L.P. I have only written a few python scripts in 2.7 and now I'm trying my first python 3 script. Can you tell me why this snippet won't run? --- from urllib.request import urlopen with

Re: newbie question re classes and self

2017-03-29 Thread Rick Johnson
On Tuesday, March 28, 2017 at 3:09:45 AM UTC-5, loial wrote: > Can I pass self(or all its variables) to a class? > Basically, how do I make all the variables defined in self > in the calling python script available to the python class > I want to call? Your question, as presented, is difficult to

Re: newbie question re classes and self

2017-03-28 Thread Terry Reedy
On 3/28/2017 4:09 AM, loial wrote: Can I pass self(or all its variables) to a class? In Python, every argument to every function is an instance of some class. The function can access any attribute of the arguments it receives with arg.attribute. -- Terry Jan Reedy --

Re: newbie question re classes and self

2017-03-28 Thread Peter Otten
loial wrote: > Can I pass self(or all its variables) to a class? > > Basically, how do I make all the variables defined in self in the calling > python script available to the python class I want to call? Inside a method you can access attributes of an instance as self.whatever: >>> class A:

newbie question re classes and self

2017-03-28 Thread loial
Can I pass self(or all its variables) to a class? Basically, how do I make all the variables defined in self in the calling python script available to the python class I want to call? -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie Need Help On Regex!

2016-10-10 Thread breamoreboy
On Monday, October 10, 2016 at 3:58:56 PM UTC+1, infos...@gmail.com wrote: > Hey guys! > > I am new to learning regex in python and I'm wondering how do I use regex in > python to store the integers(positive and negative) i want into a list! > > For e.g. > > This is the data in a list. >

Newbie Need Help On Regex!

2016-10-10 Thread infosecflag
Hey guys! I am new to learning regex in python and I'm wondering how do I use regex in python to store the integers(positive and negative) i want into a list! For e.g. This is the data in a list. [u'\x1b[0m[\x1b[1m\x1b[0m\xbb\x1b[0m\x1b[36m]\x1b[0m (A=-5,B=5)',

Newbie Need Help On Regex!

2016-10-10 Thread infosecflag
Hey guys! I am new to learning regex in python and I'm wondering how do I use regex in python to store the integers(positive and negative) i want into a list! For e.g. This is the data in a list. [u'\x1b[0m[\x1b[1m\x1b[0m\xbb\x1b[0m\x1b[36m]\x1b[0m (A=-5,B=5)',

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Loren Wilton
Honestly, the best implementation strategy I can think of is to first implement a Python interpreter for the actual mainframe environment. Then invent an RPC layer that can semi-transparently bridge the two for when you want to call a module that only exists in the Windows environment (or call

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Let me rephrase my question in other way. class myClass: def __init__(self, var): self.var = var myObj = myClass(abc) # I am calling instance with function name and arguments myObj func1 arg1 arg2 Can i associate any function like __init__ with instance ? Means if I just use

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Random832
On Thu, Oct 6, 2016, at 19:27, Loren Wilton wrote: > So I don't want to WRITE a Python interpreter for the actual mainframe > environment. I want to use an interpreter for an existing environment > (Windows) where there are already a lot of existing libraries. But > since a lot of the data to be

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Well I jump from TCL to Python. And found that it was very convenient to use Procs there. So I was looking for that luxury in Python. I am not trying to reinvent the wheel. I was just curious to know if there is any possibility to create a caller function in my way (TCL) where I can call

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Paul Rubin
"Loren Wilton" writes: > strength of Python is that there are many existing 3rd party libraries > that do lots of useful things. Since a lot of them are distributed as > binaries, they would not work in this mainframe environment. Python libraries are usually available

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Loren Wilton
Oops, apologies for replying to the wrong thread! Loren -- https://mail.python.org/mailman/listinfo/python-list

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread BartC
On 06/10/2016 18:06, mr.puneet.go...@gmail.com wrote: Hi I just started learning python. Is there any way to call functions in different way ? Rather calling obj.function(arg1, arg2) I would like to call like below "obj function arg1 arg2" As has been pointed out, it's difficult to tell

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Loren Wilton
[Cue the decades-old story about the elaborate set of C macros that I once saw somebody using so he could write a C program that looked like some flavor of structured BASIC.] I once wrote a set pf C defines so that I could compile Pascal with a C compiler without having to change the Pascal

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Grant Edwards
On 2016-10-06, Steve D'Aprano wrote: > The only way to do this will be to write your own pre-processor, which will > parse your source code, and translate it from your language to valid > Python. That's a lot of work for very little value -- I recommend you just >

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread mbg1708
On Wednesday, 5 October 2016 14:10:21 UTC+1, Beverly Howard wrote: > I'm new to Python, but have three decades of experience with FoxPro and VFP > plus I started programming in Basic and still comfortable with that. > > I have spent some time with Python and am now fairly familiar with the

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Steve D'Aprano
On Fri, 7 Oct 2016 04:06 am, mr.puneet.go...@gmail.com wrote: > Hi > > I just started learning python. Is there any way to call functions in > different way ? > > Rather calling obj.function(arg1, arg2) I would like to call like below > > "obj function arg1 arg2" No. This will be a syntax

Re: A newbie doubt on methods/functions calling

2016-10-06 Thread Peter Otten
irectly but using some other > methods. No, that would be a different language, and if someone were to implement it this would make you a newbie in two languages -- hardly an improvement ;) -- https://mail.python.org/mailman/listinfo/python-list

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Grant Edwards
On 2016-10-06, Steve D'Aprano wrote: > On Thu, 6 Oct 2016 10:03 pm, BartC wrote: > >> I'd quite like to know too. However I've just tried a test sequence >> ("[P1d" to move the cursor to row 1) and it didn't work. If there's >> reason why something so basic won't work

A newbie doubt on methods/functions calling

2016-10-06 Thread mr . puneet . goyal
Hi I just started learning python. Is there any way to call functions in different way ? Rather calling obj.function(arg1, arg2) I would like to call like below "obj function arg1 arg2" this function is part of a class. class myClass: def function(arg1, arg2): # do something

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Grant Edwards
On 2016-10-06, BartC wrote: > All this advice seems to be getting out of hand, with suggestions of > 'curses' and 'blessings' and using GUI. I've tried 'ncurses' elsewhere > and it was over the top for what I wanted to do. > > The OP wants to runs on Pi which I think runs

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Steve D'Aprano
On Thu, 6 Oct 2016 10:03 pm, BartC wrote: > I'd quite like to know too. However I've just tried a test sequence > ("[P1d" to move the cursor to row 1) and it didn't work. If there's > reason why something so basic won't work (hence the need for curses etc) > then that would be useful to know too.

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread BartC
On 06/10/2016 13:38, Peter Otten wrote: BartC wrote: All this advice seems to be getting out of hand, with suggestions of 'curses' and 'blessings' and using GUI. I've tried 'ncurses' elsewhere and it was over the top for what I wanted to do. The OP wants to runs on Pi which I think runs

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread jmp
On 10/05/2016 11:33 PM, Chris Angelico wrote: On Thu, Oct 6, 2016 at 8:19 AM, Beverly Howard wrote: Thanks for the responses... appreciated. print("value value data data data", end="\r") << That makes sense, but it also seems to suggest that there is no other way to

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Tim Golden
On 06/10/2016 13:38, Peter Otten wrote: > BartC wrote: >> All this advice seems to be getting out of hand, with suggestions of >> 'curses' and 'blessings' and using GUI. I've tried 'ncurses' elsewhere >> and it was over the top for what I wanted to do. >> >> The OP wants to runs on Pi which I

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread Peter Otten
BartC wrote: > On 05/10/2016 23:12, Akira Li wrote: >> Beverly Howard writes: >> >>> ...snip... >>> A primary question would be, "What are options for building a display >>> that would update displayed values without scrolling?" >> >> To rewrite only the last character, you

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread BartC
On 05/10/2016 23:12, Akira Li wrote: Beverly Howard writes: ...snip... A primary question would be, "What are options for building a display that would update displayed values without scrolling?" To rewrite only the last character, you could use '\b': import os

Re: User Interface Suggestions? (newbie)

2016-10-06 Thread alister
On Wed, 05 Oct 2016 14:33:43 -0700, Beverly Howard wrote: >>> if it is a pi controlling the system I would tend towards controlling >>> it > from a web page via the network. to keep it updating would require AJAX > style programming of the web page. << > > Thanks. I am interested in eventually

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Beverly Howard
Thanks guys... I'm getting overwhelmed with good info, so, I am going to disappear for a while and will comeback with questions when I get far enough to ask them. Again, thanks! Beverly Howard -- https://mail.python.org/mailman/listinfo/python-list

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Akira Li
Beverly Howard writes: >...snip... > A primary question would be, "What are options for building a display > that would update displayed values without scrolling?" To rewrite only the last character, you could use '\b': import os import itertools import time for c

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Brendan Abel
You should look into using PyQt or PySide. They are python bindings for the very popular Qt GUI framework. On Wed, Oct 5, 2016 at 2:33 PM, Beverly Howard wrote: > >> if it is a pi controlling the system I would tend towards controlling it > from a web page via the

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Beverly Howard
I _think_ I see what I need... window.move(new_y, new_x) Move cursor to (new_y, new_x) ...even if not, I now know it's there somewhere. Thanks for the specific links... they are very valuable. Beverly Howard -- https://mail.python.org/mailman/listinfo/python-list

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Beverly Howard
>> I would recommend the 'curses' library: << Great! Thanks! I'll be back... I'm sure. Beverly Howard -- https://mail.python.org/mailman/listinfo/python-list

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Beverly Howard
>> if it is a pi controlling the system I would tend towards controlling it from a web page via the network. to keep it updating would require AJAX style programming of the web page. << Thanks. I am interested in eventually doing that, but it seems that learning how to do it on a local console

Re: User Interface Suggestions? (newbie)

2016-10-05 Thread Chris Angelico
On Thu, Oct 6, 2016 at 8:19 AM, Beverly Howard wrote: > Thanks for the responses... appreciated. > >>> print("value value data data data", end="\r") << > > That makes sense, but it also seems to suggest that there is no other way to > position the cursor prior to printing. >

  1   2   3   4   5   6   7   8   9   10   >