Re: Can I execute a python code written in Python 2.7 (using numpy and tensor flow executed in linux) in Winpython 3.6 on Windows?

2018-04-17 Thread Terry Reedy
On 4/17/2018 1:00 AM, Rishika Sen wrote: Here is the code that has been written in Python 2.7, numpy, tensorflow: https://drive.google.com/open?id=1JZe7wfRcdlEF6Z5C0ePBjtte_2L4Kk-7 One must 'sign in' to read this. Can you please let me know what changes I have to make to execute it on WinPyt

Re: Python Import Impossibility

2018-04-17 Thread Thomas Jollans
On 2018-04-17 08:35, 森平 直樹 wrote: > I installed by typing ‘py -m pip install openpyxl’. > > > > In my PC, python is installed in the following folder: > > C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32 > > But old version is left in the following folder: > > C:\Python27 > Th

RE: Python Import Impossibility

2018-04-17 Thread 森平 直樹
Steven, When I installed ‘openpyxl’, there is no error message in the command prompt screen. So I think that my installation is successfully completed. I installed by typing ‘py -m install openpyxl’. In my PC, python is installed in the following folder: C:\Users\N.Morihira\AppData\Local

Problem in extracting and saving multi-dimensional time series data from netcdf file to csv file

2018-04-17 Thread shalu . ashu50
Hi All, I am using winpython spyder 3.6. I am trying to extract a variable with their time series values (daily from 1950 to 2004). The data structure is as follows: Dimensions: (bnds: 2, lat: 90, lon: 144, time: 20075) Coordinates: * lat (lat) float64 -89.0 -87.0 -85.0 -83.0 -81.

How to save multi-dimentional array values into CSV/Test file

2018-04-17 Thread shalu . ashu50
Hi All, I am using winpy 6.3 I have this array: code: clt_subset = nc.variables['clt'][:,latli:latui , lonli:lonui] print(clt_subset): [[[ 96.07967377 32.581317930.86773872 ..., 99.6185 99.7711 99.7711] [ 93.75789642 86.78536987 46.51786423 ..., 99.99756622

Re: How to save xarray data to csv

2018-04-17 Thread Rhodri James
On 17/04/18 03:25, shalu.ash...@gmail.com wrote: My question is how can i save multi-dimentional (3d: time series values, lat, long) data (xarrays) into csv. What do you want each line of the CSV file to look like? That's the key question. Once you know that you can arrange your data into a

tkinter frame not expanding to fit window?

2018-04-17 Thread Zobeid Zuma
I've just started working through the tutorial here → http:// www.tkdocs.com/tutorial/firstexample.html and I already hit some behavior that I don't understand. The frame doesn't expand when I resize the window! The tutorial says these lines should do it: mainframe.columnconfigure(0, wei

Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Travis Griggs
I posted this on SO, but… yeah… I'm doing some serial protocol stuff and want to implement a basic byte stuffing algorithm in python. Though really what this really generalizes to is “what is the most pythonic way to transform one sequence of bytes where some bytes are passed through 1:1, but

RE: Python Import Impossibility

2018-04-17 Thread 森平 直樹
Thomas, I installed by typing the following command in the MS-Windows command prompt screen. ‘py -m pip install openpyxl’. Best Regards, - Naoki Morihira TEL: 01181-90-6460-6265 - 差出人: Python-list が Thomas Jollan

Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Grant Edwards
On 2018-04-17, Travis Griggs wrote: > I posted this on SO, but… yeah… > > I'm doing some serial protocol stuff and want to implement a basic > byte stuffing algorithm in python. Though really what this really > generalizes to is “what is the most pythonic way to transform one > sequence of bytes

Python Import Impossibility

2018-04-17 Thread ?? ??
Hello, Could you tell me how to import the installed modules ? I have successfully installed openpyxl, but When I executed ‘import openpyxl’, The following message is displayed: Traceback (most recent call last): File "", line 1, in import openpyxl ModuleNotFoundError: No module named 'ope

Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread MRAB
On 2018-04-17 17:02, Travis Griggs wrote: I posted this on SO, but… yeah… I'm doing some serial protocol stuff and want to implement a basic byte stuffing algorithm in python. Though really what this really generalizes to is “what is the most pythonic way to transform one sequence of bytes whe

Re: tkinter frame not expanding to fit window?

2018-04-17 Thread Peter Otten
Zobeid Zuma wrote: > I've just started working through the tutorial here → http:// > www.tkdocs.com/tutorial/firstexample.html and I already hit some behavior > that I don't understand. The frame doesn't expand when I resize the > window! The tutorial says these lines should do it: > > mainframe.

Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Travis Griggs
> On Apr 17, 2018, at 11:15 AM, MRAB wrote: > > On 2018-04-17 17:02, Travis Griggs wrote: >> I posted this on SO, but… yeah… >> I'm doing some serial protocol stuff and want to implement a basic byte >> stuffing algorithm in python. Though really what this really generalizes to >> is “what is

Fwd: Python Import Impossibility

2018-04-17 Thread Dan Stromberg
Given that the list does not allow pictures, would it make sense to have the software that strips the pictures also send an e-mail to the picture sender indicating that pictures are disallowed? I see a lot of people responding individually saying that images are stripped. It's looking like a bit

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 'commen

Re: Fwd: Python Import Impossibility

2018-04-17 Thread Terry Reedy
On 4/17/2018 5:06 PM, Dan Stromberg wrote: Given that the list does not allow pictures, would it make sense to have the software that strips the pictures also send an e-mail to the picture sender indicating that pictures are disallowed? I see a lot of people responding individually saying that i

Re: error from Popen only when run from cron

2018-04-17 Thread daniel . chmielewski
W dniu sobota, 27 stycznia 2018 16:59:50 UTC+1 użytkownik larry@gmail.com napisał: > I have a script that does this: > > subprocess.Popen(['service', 'some_service', 'status'], > stdout=subprocess.PIPE, stderr=subprocess.STDOUT) > > When I run it from the command line it works fine. When I r

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

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

Re: ARGPARSE Newbie question

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

Re: error from Popen only when run from cron

2018-04-17 Thread Dan Stromberg
On Tue, Apr 17, 2018 at 4:11 PM, wrote: > W dniu sobota, 27 stycznia 2018 16:59:50 UTC+1 użytkownik larry@gmail.com > napisał: >> I have a script that does this: >> >> subprocess.Popen(['service', 'some_service', 'status'], >> stdout=subprocess.PIPE, stderr=subprocess.STDOUT) >> >> When I ru

RE: Python Import Impossibility

2018-04-17 Thread 森平 直樹
Thomas, I deleted ‘C:\Python27’, and executed in Windows Command prompt screen, ‘C:Users/N.Morihira>py -m install openpyxl’, But the following message was displayed * Requirement already satisfied: openpyxl in c:\users\n.morihira\anaconda3\lib\site-packages * Requirement already sati

Finding set difference between ranges

2018-04-17 Thread tejaswi prakash
Hello all, I have 3 continuous (steps of 1) ranges a,a1,a2. All of them sorted. I am performing the following operations on them a = a.difference (a1) a = a.difference(a2) Now, this doesn't seem to make use of the fact that 1. They are sorted 2. They increase in steps of 1 . Could someone sugges