jeudi 5 novembre 2015

.exe doesn't launch after making it with py2exe

Vote count: 0

So I have been working for 2 months on a project in python (it is the first time I'm using python). The project is basically: - 1 main file, - 1 GUI file using PyQt4 - and a few classes for the calculation functions.

Here is my setup.py file:

from distutils.core import setup
import py2exe
from glob import glob
import matplotlib

dataf = [
        (r'mpl-data', 
          [r'C:\Python27\Lib\site-packages\matplotlib-1.4.3-py2.7-win32.egg\matplotlib\mpl-data\matplotlibrc']),
        (r'mpl-data\stylelib',
          glob(r'C:\Python27\Lib\site-packages\matplotlib-1.4.3-py2.7-win32.egg\matplotlib\mpl-data\stylelib\*.*')),
        (r'mpl-data\images',
          glob(r'C:\Python27\Lib\site-packages\matplotlib-1.4.3-py2.7-win32.egg\matplotlib\mpl-data\images\*.*')),
        (r'mpl-data\fonts',
          glob(r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\fonts\*.*')),
        (r'Qt\imageformats',
          glob(r'C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\*.*')),
        (r'Resource',
          glob(r'C:\PythonWS\Lince5M\*.png')),
    ]

includes = ['sip', 'PyQt4.QtCore', 'PyQt4.Qt', 'PyQt4.QtGui', 'PyQt4.QtNetwork',]
pack = ['numpy.core', 'matplotlib.backends', 'matplotlib.axes', 'zmq', 'PyQt4.QtCore', 'PyQt4.Qt', 
    'PyQt4.QtGui', 'PyQt4.QtNetwork', 'CaptureImage', 'ClusterDetectionIterative', 'DisplayPanel', 
    'ImageProcessAvg', 'WriteOutputFiles',
    ]
excludes = ['_gtkagg', '_agg2', '_cairo', '_cocoaagg', '_fltkagg', '_gtk', '_gtkcairo', '_thread', 
        '_macosx',
        ]
#I admit not understand really much those excludes, that's why I don't put them in the setup

opts={
'py2exe': {
        'compressed': 2,
        'optimize': 2,
        'includes':includes,
        'packages':pack,
        #'excludes':excludes,
        'dist_dir': 'ANAFOCUS_Lince5M-3',
        'bundle_files': 1,
    }
}

win = [{
      'script': 'Application.py', 
      'icon_resourses': [(1,'icone\icone.png')]
   }
]

setup(
    name = 'ANAFOCUS_Lince5M-3',
    description = 'Anafocus test program for Lince5M-3',
    version = "0.1",
    console=win,
    options=opts,
    data_files=dataf,
    )

My programs works fine when launched with Eclipse.

The making of the executable seems to be done fine too, except for the list of missing modules there is no error, and my .exe is created...

But when I start it nothing happens... I have been looking for a few days now and I really have no idea on what is wrong since nothing gives me a notice on the problem..

If it could be of any use, my project uses those imports: PyQt4, os, decimal, time, numpy, sys, clr, matplotlib, cv2, and a dll we made in the company.

So here is my question:

  1. Anyone ever got this kind of error?
  2. Does any one know how to get an output, or anything that could tell me where is the problem?
asked 2 mins ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.



.exe doesn't launch after making it with py2exe

How do I correctly escape the double quotation mark when using string.split

Vote count: 0

Dim mystring as string = " myintref="567" Mynewref="345" "

I would like to split mystring at each single quotation mark so that I end up with;

myintref= 567

Mynewref= 345

Neither

Dim splitstring as string() = mystring.Split(""")

or

 Dim splitstring as string() = mystring.Split(New Char {"""c})

appear to work. Any suggestions? (vs2015, vb.net v14)

asked 2 mins ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.



How do I correctly escape the double quotation mark when using string.split

Hiding only div content using javascript not the picture and border of the div

Vote count: -4

I want to hide only the div content not the div border and image and width of the div. The code is below:

<div>
    <img src="image.jpg">
        1
    </img>
</div>

And this div also contains border and picture. I just want to hide 1 in the div. How can I achieve it using javascript?

Legionar
3,971
asked 5 mins ago
Ali
1

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.



Hiding only div content using javascript not the picture and border of the div

if condition in Linux

Vote count: 0

I am trying to write one if condition in Linux.

I have a variable : $check_mrp . I want to check if this variable is not equal to either of the following three values : WAIT_FOR_LOG or APPLYING_LOG or WAIT_FOR_GAP then echo message : "Please start the Manged Recovery Process".

For example if variable value is equal to any of the three (WAIT_FOR_LOG or APPLYING_LOG or WAIT_FOR_GAP) then it should not echo the message since services are running

Could someone please help.

Thanks Rahul

lurker
24.3k
asked 5 mins ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.



if condition in Linux