Re: Linux/Windows GUI programming: tk or wx?

2017-08-07 Thread Grant Edwards
On 2017-08-05, Michael Torrie  wrote:

> Well tk is already an optional part of the Python standard library,
> whereas wx is an external package.  So for your simple requirements,
> Tk may be the way to go.

I find it much easier to get a simple application written and working
with Tk than with wx.  However, once the size/complexity increases
beyond a certain point, I find wx to be less work.

> I'm guessing the tk would result in the
> smallest executable as well, though I could be very wrong.

The last time I compared wx vs tk bundled sizes using py2exe (for a
fairly simple application), using tk generated far larger .exe files.

When you use Tk, it pulls in a complete TCL implementation as well as
the Tk libraries (which contain way more library files than wx --
IIRC, there was a _lot_ of localization stuff in the Tk libraries).

-- 
Grant Edwards   grant.b.edwardsYow! ... he dominates the
  at   DECADENT SUBWAY SCENE.
  gmail.com

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


Re: Linux/Windows GUI programming: tk or wx?

2017-08-07 Thread Igor Korot
Hi, Grant,

On Mon, Aug 7, 2017 at 10:37 AM, Grant Edwards
 wrote:
> On 2017-08-05, Michael Torrie  wrote:
>
>> Well tk is already an optional part of the Python standard library,
>> whereas wx is an external package.  So for your simple requirements,
>> Tk may be the way to go.
>
> I find it much easier to get a simple application written and working
> with Tk than with wx.  However, once the size/complexity increases
> beyond a certain point, I find wx to be less work.

What version of wx/python did you try?
It is very easy to work with wx{Python, Phoenix} no matter which application
{complexity} we are talking about.

There are a lot of samples/demos on the wxpython web site.

Thank you.

>
>> I'm guessing the tk would result in the
>> smallest executable as well, though I could be very wrong.
>
> The last time I compared wx vs tk bundled sizes using py2exe (for a
> fairly simple application), using tk generated far larger .exe files.
>
> When you use Tk, it pulls in a complete TCL implementation as well as
> the Tk libraries (which contain way more library files than wx --
> IIRC, there was a _lot_ of localization stuff in the Tk libraries).
>
> --
> Grant Edwards   grant.b.edwardsYow! ... he dominates the
>   at   DECADENT SUBWAY SCENE.
>   gmail.com
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Linux/Windows GUI programming: tk or wx?

2017-08-07 Thread Grant Edwards
On 2017-08-05, Chris Green  wrote:
> Michael Torrie  wrote:
>
> I went through a similar process of deciding the easiest (for me) GUI
> to go with.  I've actually ended up with PyGtk as it feels for me the
> 'least foreign' compared with doing things the CLI way.

I definitely think PyGtk feels the "most Pythonic".  It seems simpler
than wx, yet is able to handle complex applications.  The last time I
read up on it, it didn't sound like a very good option if you want
Windows compatibility.  If I hadn't cared about Windows, I definitely
would have picked PyGtk over wx.  I haven't used it in a while, and I
don't the state of gtk2 vs. gtk3 (pygobject). 

-- 
Grant Edwards   grant.b.edwardsYow! ... I want a COLOR
  at   T.V. and a VIBRATING BED!!!
  gmail.com

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


Re: Question About When Objects Are Destroyed (continued)

2017-08-07 Thread Grant Edwards
On 2017-08-05, Tim Daneliuk  wrote:
> On 08/05/2017 03:21 PM, Chris Angelico wrote:

>> so the object's lifetime shouldn't matter to you.
>
> I disagree with this most strongly.  That's only true when the
> machine resources being consumed by your Python object are small in
> size.  But when you're dynamically cranking out millions of objects
> of relatively short lifetime, you can easily bump into the real
> world limits of practical machinery.  "Wait until the reference
> count sweep gets rid of it" only works when you have plenty of room
> to squander.

I've been writing Python applications for almost 20 years.  I've never
paid any attention _at_all_ (none, zero) to object lifetimes, and it's
never caused any problems for me.  Admittedly they didn't involve
gigabytes of data, but many of them ran for days at a time...

-- 
Grant Edwards   grant.b.edwardsYow! Jesuit priests are
  at   DATING CAREER DIPLOMATS!!
  gmail.com

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


Re: Code for addition

2017-08-07 Thread Grant Edwards
On 2017-08-05, Ode Idoko via Python-list  wrote:
> Can anyone help with the python code that can add 101, 102, 103...2033 
> please? 
> As I said before, I'm new to python and need assistance in this regard. 
> Thanks for always assisting. 

$ python
Python 2.7.12 (default, Jan  3 2017, 10:08:10) 
[GCC 4.9.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> sum(range(101,2034))
2062511

-- 
Grant Edwards   grant.b.edwardsYow! Alright, you!!
  at   Imitate a WOUNDED SEAL
  gmail.compleading for a PARKING
   SPACE!!

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


Upgrade of pysmbc with pip3 goes wrong

2017-08-07 Thread Cecil Westerhof
When I execute:
pip3 install --upgrade pysmbc

I get:
Collecting pysmbc
  Using cached pysmbc-1.0.15.7.tar.bz2
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/pip-build-9b9p_652/pysmbc/setup.py", line 92, in 
include_dirs=pkgconfig_I("smbclient"))])
  File "/tmp/pip-build-9b9p_652/pysmbc/setup.py", line 59, in pkgconfig_I
stdout=subprocess.PIPE)
  File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'


Command "python setup.py egg_info" failed with error code 1 in 
/tmp/pip-build-9b9p_652/pysmbc/

What could be the problem?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pip requirements file

2017-08-07 Thread Ethan Furman

On 08/04/2017 07:56 PM, Ethan Furman wrote:

On 08/04/2017 07:46 PM, Chris Angelico wrote:

On Sat, Aug 5, 2017 at 12:42 PM, Ethan Furman wrote:



   pip freeze

will output a list of current packages and their requirements.  I have one
package that falsely [1] lists another package as a requirement, which was
blocking installation as the false requirement wasn't available.

Is there a way to modify that output (which would be piped to, for example,
requirements.txt) to have

   pip install -r requirements.txt

so pip ignores that one (and only that one) dependency?


I'd just edit the file afterwards and delete the line. But if the
package claims to need PyXML, it'll still be installed.


Exactly my point.  Is there any way, requirements.txt or otherwise, to tell pip 
to ignore what a certain package is
claiming it needs?

I am aware of --no-dependencies, but that (I think) is an all-or-nothing 
approach, whilst [1] I desire an all-except-one
approach.


Light finally turned on.  If requirements.txt has all my installed requirements, that would include any dependencies 
actually needed; so I specify --no-dependencies, then dependencies not listed in the requirements.txt file will not be 
installed.


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


Re: Case Solution: Alqueria More than Just a Glass of Milk (A) by Nathalia Franco, Sebastian Duenas, Margarita Castillo

2017-08-07 Thread taaymihaj
Le samedi 5 août 2017 23:30:34 UTC+1, Case Solution & Analysis a écrit :
> Case Solution and Analysis of Alqueria: More than Just a Glass of Milk (A) by 
> Nathalia Franco, Sebastian Duenas, Margarita Castillo is available at a 
> lowest price, send email to casesolutionscentre(at)gmail(dot)com if you want 
> to order the Case Solution. 
> 
> Case Study ID: AN0028
> 
> Get Case Study Solution and Analysis of Alqueria: More than Just a Glass of 
> Milk (A) in a FAIR PRICE!! 
> 
> Our e-mail address is CASESOLUTIONSCENTRE (AT) GMAIL (DOT) COM. Please 
> replace (at) by @ and (dot) by . 
> 
> YOU MUST WRITE THE FOLLOWING WHILE PLACING YOUR ORDER: 
> Complete Case Study Name 
> Authors 
> Case Study ID 
> Publisher of Case Study 
> Your Requirements / Case Questions 
> 
> Note: Do not REPLY to this post because we do not reply to posts here. If you 
> need any Case Solution please send us an email. We can help you to get it.

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


Re: Code for addition

2017-08-07 Thread Neil Cerutti
On 2017-08-05, Ode Idoko via Python-list 
wrote:
> Can anyone help with the python code that can add 101, 102,
> 103...2033 please? As I said before, I'm new to python and need
> assistance in this regard. Thanks for always assisting. 

>>> (2033 - 101 + 1) * (101 + 2033) / 2

You could also calculate it with a combination of sum and range
builtins, as others have hinted, and if it's homework that's
probably a good idea.

-- 
Neil Cerutti

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


Re: Code for addition

2017-08-07 Thread Marko Rauhamaa
Neil Cerutti :

> On 2017-08-05, Ode Idoko via Python-list 
> wrote:
>> Can anyone help with the python code that can add 101, 102,
>> 103...2033 please? As I said before, I'm new to python and need
>> assistance in this regard. Thanks for always assisting. 
>
 (2033 - 101 + 1) * (101 + 2033) / 2
>
> You could also calculate it with a combination of sum and range
> builtins, as others have hinted, and if it's homework that's
> probably a good idea.

During college, one project was to develop a factorial subprogram using
the assembly language of an imaginary, 18-bit CPU. I told the student
who got the task that the only sane implementation would be a lookup
table with a possible range check as in:

def factorial(n):
return [1, 1, 2, 6, 24, 120, 720, 5040, 40320][n]

I believe he chickened out, though, and implemented a loop with
multiplications.


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


Firebird 1.5 and Python 3.4 - is this possible?

2017-08-07 Thread Nagy László Zsolt

  Hi!

I have an old HIS program written in Delphi. It uses Firebird 1.5
database. I need to make an interface to exchange data with other
healthcare providers. I do not want to do this in Delphi, that is
ancient code. It is also not an option to rewrite the whole program from
scratch. I just need to add a service that runs in the background and
sends/receives data.

Is it possible to somehow connect and use firebird 1.5 database from
Python 3? I have tried kinterbasdb with no luck. There are a number of
firebird libraries out there, but none of them seems to support firebird
1.5.

Does anyone know a library that can do this?

Thanks,

   Laszlo



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