Re: print to previous line in console

2016-10-03 Thread Adam M
On Monday, October 3, 2016 at 12:46:41 PM UTC-4, Skip Montanaro wrote:
> On Mon, Oct 3, 2016 at 10:23 AM, udhay prakash pethakamsetty
> > Hi skip,
> >
> > I am unable to even install that curses package
> >
> >
> > C:\>pip install curses
> > Collecting curses
> >   Could not find a version that satisfies the requirement curses (from
> > versions: )
> > No matching distribution found for curses
> >
> >
> > I am using python 2.7.
> 
> You shouldn't have to install it. Unless your Python installation is
> defective in some regard, you should have it. That said, I don't do
> Windows, so perhaps curses isn't available there.
> 
> % python
> Python 2.7.2 (default, Nov 14 2012, 05:07:35)
> [GCC 4.4.6 [TWW]] on linux3
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import curses
> >>> curses.version
> '2.2'
> 
> Oh, and when asking for help, it's best to cc the mailing list, not
> just the person to whom you are responding. You get more timely -- and
> more complete -- help. In this case, I can't state authoritatively if
> curses is available on Windows. You also don't know that I didn't hit
> "send" on my original response then immediately head off to the North
> Woods for a week of hiking.
> 
> Skip

Because on Linux it is part of 2.7.x distribution. On Windows it is not.
You will need to download wheel from that place:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
And install it using PIP.

Regards
Adam

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [FAQ] "Best" GUI toolkit for python

2016-10-18 Thread Adam M
If my dusty memory is not wrong they were two projects aiming for GUI designer 
for wx: wxGlade (with option to generate code for Python) and Boa Contructor. I 
have no idea however if they are still available or working with newer wx.

I prefer for simple stuff Tk for something more sophisticated Qt (PySide or 
PyQt)

On Tuesday, October 18, 2016 at 4:09:46 PM UTC-4, Demosthenes Koptsis wrote:
> My favorite GUIs are PyQt and wxPython.
> 
> I prefer PyQt than PySide because PySide seem to me like an abandoned 
> project.
> 
> Also i prefer PyQt than wxPython because i can design the forms in 
> QtDesigner easily.
> 
> wxPython and wxWidgets do not have a GUI designer competitor to QtDesigner.
> 
> So, my choice is PyQt !
> 
> 
> On 10/18/2016 07:01 PM, pozz wrote:
> > Il 18/10/2016 16:56, Michael Torrie ha scritto:
> >> On 10/18/2016 02:33 AM, Mark Summerfield wrote:
> >>> When I started out I used Qt Designer to produce .ui files (XML) and
> >>> then used the Qt uic tool to convert this to C++ (although you can
> >>> convert to Python using pyuic). I then studied the code and learnt
> >>> from that. And it turns out that it isn't very hard. There is
> >>> QVBoxLayout - widgets one above the other; QHBoxLayout; widgets side
> >>> by side; QGridLayout - widgets in a grid. The only complication is
> >>> when you nest these, say a QVBoxLayout inside a QHBoxLayout inside a
> >>> QGridLayout; but in practice, once you've done it a few times it
> >>> isn't hard to picture. However, I know highly skilled people who
> >>> prefer to use Qt Designer, so it is no big deal either way.
> >>
> >> I am certainly not highly skilled. But I definitely do use the Designer
> >> for everything related to the GUI.  I don't, however, use uic or pyuic.
> >> What I recommend these days is to use the xml .ui file directly in your
> >> program to create the objects for you.  In C++ with an EXE, you can
> >> incorporate the .ui file into the executable as a resource.  In Python,
> >> I would just bundle it with all the other resources I might be using.
> >> For custom widgets I either build a simple plugin for Designer that lets
> >> me use the widgets as any other in the visual layout. Alternatively,
> >> I'll just change the class type in properties.
> >>
> >> The way you use the .ui file loader is to create a class in Python,
> >> usually for each window or dialog, and subclass it from the appropriate
> >> Qt type such as QDialog.  Then in the __init__() method, you call
> >> PyQt.uic.loadUi and it brings all the widgets in and initializes them
> >> and adds them to the QDialog you are defining. And if you follow the
> >> naming scheme for your callbacks of on_widgetname_signalName(), it will
> >> auto connect them. For example, if my button was called "myButton", I
> >> could name a slot to be on_myButton_clicked() and it would connect
> >> automatically.  PySides allows something similar with QUiLoader. I use a
> >> wrapper class that Sebastion Wiesner wrote to make it closer to a
> >> one-liner wrapper function like PyQt offers.
> >
> > What are the differences between PySides and PyQt... apart the licence?
> > Is PySides usable as PyQt?
> >
> >
> >> I agree with you about making GUIs programmatically being not hard,
> >> especially when one is learning.  When I first started using Qt, coming
> >> from GTK, I had to get used to a similar but different boxing model.  In
> >> GTK, when packing widgets you specify both the expansion and spacing
> >> while packing.  In Qt, you have explicit spacers to insert into the
> >> boxes.  I'm not sure which method is better.
> >
> > So you have some experience on GTK and QT.  Could you spend some time 
> > to describe a few differences? What do you like with Gtk and what you 
> > don't? And for Qt?
> >
> > When you worked with Gtk, have you used Glade as GUI Builder? Could 
> > you compare Glade and QT Designer?
> >

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-07 Thread Adam M
On Saturday, November 5, 2016 at 8:58:36 PM UTC-4, Steve D'Aprano wrote:
> On Sun, 6 Nov 2016 08:17 am, Ben Bacarisse wrote:
> 
> > Steve D'Aprano  writes:
> 
> >> Here's the same program in Objective C:
> >>
> >> --- cut ---
> >>
> >> #import 
> >>
> >> int main (int argc, const char * argv[])
> >> {
> >> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
> >> NSLog (@"Hello, World!");
> >> [pool drain];
> >> return 0;
> >> }
> >>
> >> --- cut ---
> >>
> >> Which would you rather write?
> > 
> > That's a rather odd comparison.  Why not
> > 
> >   #import 
> > 
> >   int main()
> >   {
> > printf("Hello world\n");
> > return 0;
> >   }
> 
> 
> Because that's not Objective-C? (This is not a rhetorical question.)
> 
> I'm not an Objective-C expert, but to my eye, that doesn't look like
> Objective-C. It looks like plain old regular C.
> 
> Here's where I stole the code from:
> 
> https://www.binpress.com/tutorial/objectivec-lesson-1-hello-world/41
> 
> and its not too dissimilar from the versions here:
> 
> http://rosettacode.org/wiki/Hello_world/Text#Objective-C
> 
> 
> > ?  It's decades since I wrote any Objective-C (and then not much) but I
> > think this is the closest comparison.
> 
> 
> 
> -- 
> Steve
> “Cheer up,” they said, “things could be worse.” So I cheered up, and sure
> enough, things got worse.


It is Objective-C. You are mistaken taking NS extensions to function names as a 
part of Objective-C. There are not. It is from NextStep/Sun implementation. 
Because they are always used a lot of people tend to think that they are part 
of Objective-C - but they are not - they are just libraries.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How coding in Python is bad for you

2017-01-23 Thread Adam M
On Monday, January 23, 2017 at 3:41:17 PM UTC-5, Jon Ribbens wrote:
> On 2017-01-23, alister  wrote:
> > On Tue, 24 Jan 2017 07:19:42 +1100, Chris Angelico wrote:
> >> I believe that's "bad for you" in the sense that chocolate is bad for
> >> you.
> >> 
> >> It isn't.
> >
> > chocolate is a poison (lethal dose for a human approx 22lb)
> 
> That's a meaningless statement. *Everything* is a poison
> in sufficient quantities.

I think you need to calibrate your sarcasm filter ;-). By the way coffee  is 
also dangerous - especially in 50lbs bags (when it hits you).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Converting py files to .exe and .dmg

2015-12-28 Thread Adam M
On Monday, December 28, 2015 at 10:35:41 AM UTC-5, Brian Simms wrote:
> Hi there,
> 
> I have done a lot of looking around online to find out how to convert Python 
> files to .exe and .dmg files, but I am confused. Could someone provide 
> pointers/advice as to how I can turn a Python file into a Windows .exe and 
> Mac .dmg file.
> 
> Thanks for any help.

Please check this website:
http://www.pyinstaller.org/
It should solve your problem.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: file -SAS

2016-03-19 Thread Adam M
On Friday, March 18, 2016 at 1:38:24 AM UTC-4, Ben Finney wrote:
> Val Krem via Python-list  writes:
> 
> > from sas7bdat import SAS7BDAT
> > ImportError: No module named sas7bdat
> >
> > What did I miss?
> 
> You missed telling us what 'sas7bdat' is, what you have already done to
> install it, and why you think it should be available for Python to
> import.
> 
> -- 
>  \"Putting the word "faith" in front of something is no excuse |
>   `\   for barbarism and cruelty and ignorance and stupidity." |
> _o__)--Christopher Hitchens |
> Ben Finney

I think he meant this:
https://pypi.python.org/pypi/sas7bdat
And here is what SAS7DAT is
https://cran.r-project.org/web/packages/sas7bdat/vignettes/sas7bdat.pdf
Judging by name it seams be related to SAS language.

Regards
Adam M.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Basic python understanding

2017-07-26 Thread Adam M
On Wednesday, July 26, 2017 at 11:06:19 AM UTC-4, Monica Snow wrote:
> Hi  I am in need some understanding on how to become more knowledgeable while 
> interviewing a candidate that requires Python and other (see below) 
> experience for a position with Mass Mutual as Developer, Systems Design 
> Engineer, Web Engineer Director, Web Engineer Consultant, and Full Stack 
> Developer.  
> 
> What would be some questions and answers so I gain a strong understanding of 
> my candidate that has Python experience? 
> 
> I preform the initial screen about 30 mins then pass them along to the hiring 
> manager.  I want to be able to communicate on a more technical level and show 
> appreciation for his/her skill set.
> 
> Other requirements:  Node, java, javascript, ruby, MVC 
> (Model-view-controller) frameworks, object modeling, database systems, 
> jave-Swing and/or GWT 
> 
> Much respect,
> 
> Monica
> 941-212-9085

You can try these websites:
https://www.toptal.com/python/interview-questions
https://devskiller.com/screen-python-developers-skills-find-best-guide-recruitment/
Regards
Adam M.
-- 
https://mail.python.org/mailman/listinfo/python-list