Re: [Tutor] Modules and variable usage in functions from other files

2015-12-24 Thread Alan Gauld
On 24/12/15 01:45, Richard Bekenstein wrote: >from scipy.constants import m_p,G,k >import numpy as np >from math import cos, pi, floor ... >from bol_runge_kutta_evl_nonadaptive import runge_kutta_evl >When I run this main.py, I get an error message from the im

[Tutor] Modules and variable usage in functions from other files

2015-12-24 Thread Richard Bekenstein
Dear All, I have a main .py script which contains code that occasionally calls some functions. This script calls in these defined functions from other .py files in the same directory as the main .py. However, even after importing the functions from the different .py files, I get err

Re: [Tutor] Modules to work with curl.

2014-07-18 Thread Danny Yoo
On Fri, Jul 18, 2014 at 1:05 PM, Santosh Kumar wrote: > its a curl command caliing a http function. > > for example: > > curl : GET http:///app/somefunction Hi Santosh, Ok, good. This is some of the information that we wanted to know. So you are performing HTTP requests to get content, and yo

Re: [Tutor] Modules to work with curl.

2014-07-18 Thread Santosh Kumar
its a curl command caliing a http function. for example: curl : GET http:///app/somefunction so i have to use this to create a wrapper which can scale better . While i use the subprocess it taking some time which i feel as bit slow. so here are the questions again: 1) what are the different wa

Re: [Tutor] Modules to work with curl.

2014-07-17 Thread Martin A. Brown
Hi, : I am currently working on a project , which has lots of curl : commands. I am using subprocess.Popen to run these curl commands. : But somehow i see its bit slow. Is there a way/module by which i : can improve the performance of the program. Wow. Is curl a requirement or do you sim

Re: [Tutor] Modules to work with curl.

2014-07-17 Thread Danny Yoo
On Thu, Jul 17, 2014 at 11:35 AM, Santosh Kumar wrote: > I am currently working on a project , which has lots of curl commands. I am > using subprocess.Popen to run these curl commands. But somehow i see its bit > slow. > Is there a way/module by which i can improve the performance of the program

[Tutor] Modules to work with curl.

2014-07-17 Thread Santosh Kumar
Hi, I am currently working on a project , which has lots of curl commands. I am using subprocess.Popen to run these curl commands. But somehow i see its bit slow. Is there a way/module by which i can improve the performance of the program. Thanks, -- D. Santosh Kumar RHCE | SCSA +91-9703206361

Re: [Tutor] Modules

2013-03-27 Thread eryksun
On Wed, Mar 27, 2013 at 5:09 PM, Alan Gauld wrote: > > Tkinter is an unusual module in that it requires support for Tcl/Tk to be > compiled into the interpreter. This is not always the case. The _tkinter module is a C extension that links to Tcl/Tk. On Debian Linux, _tkinter (_tkinter.so) is in t

Re: [Tutor] Modules

2013-03-27 Thread Alan Gauld
On 27/03/13 19:34, Cor Heisterkamp wrote: My problem starts with the chapter "Introduction to Modules". The first line in the program is: from tkinter import * and here I'm getting an error: ImportError: No module named tkinter Thats an unfortunate exampole the author has chosen.

Re: [Tutor] Modules

2013-03-27 Thread Joel Goldstick
On Wed, Mar 27, 2013 at 4:12 PM, Mark Lawrence wrote: > On 27/03/2013 19:34, Cor Heisterkamp wrote: > >> Hi, >> >> I just started with Python and found a course named "Python programming" >> by Jody S. Gunther. >> My problem starts with the chapter "Introduction to Modules". >> The first line in t

Re: [Tutor] Modules

2013-03-27 Thread Mark Lawrence
On 27/03/2013 19:34, Cor Heisterkamp wrote: Hi, I just started with Python and found a course named "Python programming" by Jody S. Gunther. My problem starts with the chapter "Introduction to Modules". The first line in the program is: from tkinter import * and here I'm getting an error:

Re: [Tutor] Modules

2013-03-27 Thread Danny Yoo
> I just started with Python and found a course named "Python programming" by > Jody S. Gunther. > My problem starts with the chapter "Introduction to Modules". > The first line in the program is: > from tkinter import * > and here I'm getting an error: > ImportError: No module named tkin

[Tutor] Modules

2013-03-27 Thread Cor Heisterkamp
Hi, I just started with Python and found a course named "Python programming" by Jody S. Gunther. My problem starts with the chapter "Introduction to Modules". The first line in the program is: from tkinter import * and here I'm getting an error: ImportError: No module named tkinter What

Re: [Tutor] Modules and Python tutorial by S. Thurlow - opinions please

2011-08-21 Thread Lisi
On Saturday 20 August 2011 23:53:53 Alan Gauld wrote: > On 20/08/11 15:25, Lisi wrote: > > ridiculous. I think that I understand how to write a basic function, but > > I can't work out how to save and call it. [snip] > There is a full worked example in the Functions and Modules > topic in my tutor

Re: [Tutor] Modules and Python tutorial by S. Thurlow - opinions please

2011-08-20 Thread Alan Gauld
On 20/08/11 15:25, Lisi wrote: ridiculous. I think that I understand how to write a basic function, but I can't work out how to save and call it. If you literally mean how to write,save and use a Python function (from within another script) then I'll have a go: How to save and run a bash sc

Re: [Tutor] Modules and Python tutorial by S. Thurlow - opinions please

2011-08-20 Thread Lisi
Thanks, Steven. :-) I'll get back to this this evening. Lisi On Saturday 20 August 2011 16:51:07 Steven D'Aprano wrote: > Lisi wrote: > > I have got myself well and truly bogged down. I need to change the angle > > from which I am looking. I only have a short while left for now in which > > to

Re: [Tutor] Modules and Python tutorial by S. Thurlow - opinions please

2011-08-20 Thread Steven D'Aprano
Lisi wrote: I have got myself well and truly bogged down. I need to change the angle from which I am looking. I only have a short while left for now in which to make some sort of progress with Python. What do people think of: http://www.sthurlow.com/python/ Is it reasonably accurate and th

[Tutor] Modules and Python tutorial by S. Thurlow - opinions please

2011-08-20 Thread Lisi
I have got myself well and truly bogged down. I need to change the angle from which I am looking. I only have a short while left for now in which to make some sort of progress with Python. What do people think of: http://www.sthurlow.com/python/ Is it reasonably accurate and therefore useful

Re: [Tutor] Modules and Test Suites

2009-12-29 Thread Lie Ryan
On 12/30/2009 2:11 AM, Stephen Nelson-Smith wrote: I do quite a lot of programming in Ruby. When I do so, my code tends to have the following layout: /path/to/src/my_project Inside my_project: lib/ test/ my_project.rb my_project.rb uses classes and helper methods in lib Inside test, I have

Re: [Tutor] Modules and Test Suites

2009-12-29 Thread Eike Welk
Hello Stephen! On Tuesday 29 December 2009, Stephen Nelson-Smith wrote: > I do quite a lot of programming in Ruby. When I do so, my code > tends to have the following layout: > > /path/to/src/my_project > > Inside my_project: > > lib/ > test/ > my_project.rb > > b) If so - how can I do it in Pyt

[Tutor] Modules and Test Suites

2009-12-29 Thread Stephen Nelson-Smith
I do quite a lot of programming in Ruby. When I do so, my code tends to have the following layout: /path/to/src/my_project Inside my_project: lib/ test/ my_project.rb my_project.rb uses classes and helper methods in lib Inside test, I have a test suite that also uses classes and helper method