On Windows 10 I have installed:
P:\W10>python --version
Python 3.10.0
P:\W10>pyinstaller --version
4.7
I can compile a VERY simple Python program:
P:\W10>type argv.pv
#!/usr/bin/python3
import sys
for a in sys.argv: print("["+a+"]")
P:\W10>pyinstaller.exe --onefile tcpbm.py
But I can run i
I am trying to get the source code line of the last error.
I know traceback.format_exc() but this contains much more information, e.g.:
Traceback (most recent call last):
File "./error.py", line 18, in main
x=1/0
ZeroDivisionError: division by zero
I could extract the source code line with
Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
> >except Exception as inst:
> >print( traceback.format_exc() )
>
> More to the point of getting the line number:
As I wrote in my initial posting:
I already have the line number. I am looking for the source code line!
So f
When I compile a python program with pyinstaller, I get an executable:
pyinstaller --onefile --icon fex.ico fextasy.py
But the executables icon is only visable within the windows file browser,
not on the desktop:
https://fex.flupp.org/fop/V2ioMZcl/X-20211123213712.png
There is only the default
Calvin Spealman wrote:
> What version of Windows is this on? That's probably going to be a useful
> bit of information, because there could be differences there to how EXE
> icons are handled.
>
> On Tue, Nov 23, 2021 at 4:18 PM Ulli Horlacher <
> frams...@r
Dan Purgert wrote:
> > When I compile my programs with pyinstaller, Windows classifies them as
> > virus and even deletes them!
> > [...]
>
> Have you tried compiling from a different machine? Maybe there's
> something broken on the one that's flagging them.
I have only this Windows installati
When I compile my programs with pyinstaller, Windows classifies them as
virus and even deletes them!
pyinstaller.exe --onefile --noconsole -i fex.ico fextasy.py
187 INFO: PyInstaller: 4.7
187 INFO: Python: 3.10.0
218 INFO: Platform: Windows-10-10.0.19041-SP0
218 INFO: wrote P:\W10\fextasy.spec
(..
Ulli Horlacher wrote:
> Dan Purgert wrote:
>
> > > When I compile my programs with pyinstaller, Windows classifies them as
> > > virus and even deletes them!
> > > [...]
> >
> > Have you tried compiling from a different machine? Maybe there'
Barry Scott wrote:
>
>
> > On 25 Nov 2021, at 09:20, Ulli Horlacher
> > wrote:
> >
> > When I compile my programs with pyinstaller, Windows classifies them as
> > virus and even deletes them!
>
> Microsoft will fix the malware detection if you pro
Chris Angelico wrote:
> Unfortunately, if you're not going to go to the effort of getting your
> executables signed
I cannot sign my executables (how can I do it anyway?), because Windows
deletes my executable as soon as I have compiled them! They exist only
for a few seconds and then they are g
Avi Gross wrote:
> I am not sure what your real problem is, Ulli, but many antivirus programs
> can be TEMPORARILY shut off.
Meanwhile I found this configuration option.
But this does not help me much, because my programs must run on other
Windows PCs of other users and they cannot disable the d
Richard Damon wrote:
> On a somewhat locked down computer, the user does not have admin rights,
> so needs to get 'IT' to run any installers that need admin permissions
> to run.
>
> And EXE that just needs to be copied to the computer and rhen just RUN,
> doesn't need IT to 'install' it (the
Edmondo Giovannozzi wrote:
> You can try to download winpython:
> https://github.com/winpython/winpython/releases
> It is an executable, but you don't need to execute it as it is a 7zip
> compressed archive.
> You may run it or use directly 7zip to decompress it, the result will be the
> same.
My program uses https and runs fine on Linux, but on Windows it crashes:
W10dev:/cygdrive/p: python fextasy.py -D
DEBUG(fextasy.py): verbose=0
DEBUG(fextasy.py): User-Agent: fextasy-20211127_1806 Windows 10.0.19041
DEBUG(fextasy.py): TCPCONNECT to fex.flupp.org:443
Traceback (most recent call last
Chris Angelico wrote:
> On Sun, Nov 28, 2021 at 6:38 AM Ulli Horlacher
> wrote:
> >
> > My program uses https and runs fine on Linux, but on Windows it crashes:
> >
> > Google chrome and firefox both say the certifacte is valid:
> >
> > https://fex.f
anthony.flury wrote:
>
> On 26/11/2021 07:13, Ulli Horlacher wrote
> >> But consider another possibility that your compiler software is compromised
> > Then https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe
> > is infected. I doubt this.
>
> B
I need to sort images (*.jpg), visually, not by file name.
It looks, there is no standard UNIX tool for this job?
So, I have to write one by myself, using Tkinter.
Are there any high-level widgets which can help me, for example a file
browser with thumbnails?
--
Ullrich Horlacher
Quivis wrote:
> On Sun, 04 Sep 2016 21:32:47 +1000, Steve D'Aprano wrote:
>
> > What does it mean to sort images visually?
>
> 1. A directory of images collected over say, five years.
>
> 2. You want to sort them according to red houses, blue houses, green
> trees, yellow trees (that's autumn
"python -m SimpleHTTPServer" is really cool :-)
But I need some more features:
- some kind of a chroot, to prevent file access higher then the base
directory
- a directory listing mit date and size information
- an upload possibility
I could modify /usr/lib/python2.7/SimpleHTTPServer.py by m
I need an input function with GNU readline support. So far I have:
import readline
readline.parse_and_bind("tab: complete")
file = raw_input('File to send: ')
Cursor keys are working, but TAB-completion works only in the current
directory. Example:
File to send: [TAB][TAB]
argv.py
Peter Otten <__pete...@web.de> wrote:
> > Is there a way to make TAB-completion work for other directories, too?
>
> Remove "/" from the set of delimiters:
>
> readline.set_completer_delims(
> "".join(c for c in readline.get_completer_delims() if c != "/"))
Great!
> > murksigkeiten
>
> I
In the last weeks I have asked here some beginners questions and got great
response. I was able to solve all my problems.
Now, my first real Python program is ready: fexit, a F*EX client.
And what is F*EX?
==> Frams' Fast File EXchange, a service for transfering files of ANY size
from any user A
paul.hermeneu...@gmail.com wrote:
> > I am now looking for beta testers. If you are interested, send me a mail.
>
> Can you tell us a git or svn repository from which the kit is available?
Available via email request.
> Or, is this a proprietary product?
No.
--
Ullrich Horlacher
Ulli Horlacher wrote:
> eryksun wrote:
> > On Thu, Nov 19, 2015 at 10:31 AM, Michael Torrie wrote:
> > > One windows it might be possible to use the win32 api to enumerate the
> > > windows, find your console window and switch to it.
> >
> > You
Christian Gollwitzer wrote:
> Am 28.11.15 um 11:29 schrieb Ulli Horlacher:
> > One of my Windows test users reports, that the file dialog window of
> > askopenfilename() starts behind the console window and has no focus.
> > On Linux (XFCE) I do not have this problem.
&g
Ulli Horlacher wrote:
> One of my Windows test users reports, that the file dialog window of
> askopenfilename() starts behind the console window and has no focus.
I have got a followup: this happens only with Windows XP, not with Windows
7. Therefore I will ignore this p
Christian Gollwitzer wrote:
> Am 28.11.15 um 13:48 schrieb Ulli Horlacher:
> > Christian Gollwitzer wrote:
> >> Many problems would simply go away if you wrote the whole thing as a GUI
> >> program.
> >
> > Too much hassle.
> > The predecessor was
I try to to implement a "static variable" inside a function:
def main():
a(1)
a(2)
a()
print(a.x)
if 'a.x' in globals(): print('global variable')
if 'a.x' in locals(): print('local variable')
def a(x=None):
if not x is None: a.x = x
print(':',a.x)
main()
When I run this code,
Steven D'Aprano wrote:
> A better and more general test is:
>
> if hasattr(a, 'x'): print('attribute of a')
Fine!
I have now:
def a(x=None):
if not hasattr(a,'x'): a.x = 0
a.x += 1
print('%d:' % a.x,x)
This simply counts the calls of a()
But, when I rename the function I have to renam
Wolfgang Maier wrote:
> I'm wondering whether you have a good reason to stick with a function.
Easy handling, no programming overhead. Clean, orthogonal code.
> What you are trying to achieve seems to be easier and cleaner to
> implement as a class:
>
> class Counter (object):
> def __i
I have a Python2 program which runs fine on Windows 7, but
crashes on Windows 2008 Server R2 64 bit:
downloading http://fex.belwue.de/download/7za.exe
Traceback (most recent call last):
File "", line 1992, in
File "", line 180, in main
File "", line 329, in get_ID
File "", line 1627, in c
Dennis Lee Bieber wrote:
> >I have a Python2 program which runs fine on Windows 7, but
> >crashes on Windows 2008 Server R2 64 bit:
> >
> >downloading http://fex.belwue.de/download/7za.exe
> >Traceback (most recent call last):
> > File "", line 1992, in
> > File "", line 180, in main
> > File
Dennis Lee Bieber wrote:
> >> Connection reset by peer.
> >>
> >> An existing connection was forcibly closed by the remote host.
> >
> >This is not true.
> >The server is under my control. Die client has terminated the connection
> >(or a router between).
> The odds are still good
Ulli Horlacher wrote:
> > But... is there a windows program with which one can select files and the
> > result is written to STDOUT?
>
> Found it:
>
> from Tkinter import Tk
> from tkFileDialog import askopenfilename
>
> Tk().withdraw()
Christian Gollwitzer wrote:
> > My users do not like it :-(
> > They want to drag&drop files.
> > Therefore I have added it as another option to enter files:
> >
> > [f] select a file
> > [d] select a directory
> > [e] enter a file or directory (with drag&drop or copy&paste)
>
Christian Gollwitzer wrote:
> Another cheap solution comes to mind: On windows, dropping files onto an
> icon on the desktop is interpreted as "launch the program with
> additional arguments", where the arguments are the file names.
Ohhh... great! This helps me a lot!
> Maybe you could try i
Ulli Horlacher wrote:
> My idea now is: instead of raw_input() I use a get_paste() function, which
> reads input character for input character and after a (say) 1 s timeout it
> returns the string. Pasting a string with the mouse is rather fast, there
> should be no big delay
pyinstaller ignores a specified icon file: the resulting executable shows
the default icon on the desktop.
I compile with:
S:\python>pyinstaller.exe --onefile --icon=fex.ico fexit.py
31 INFO: PyInstaller: 3.0
31 INFO: Python: 2.7.11
31 INFO: Platform: Windows-7-6.1.7601-SP1
31 INFO: wrote S:\pyth
With Python 2.7.11 on Windows 7 my users cannot open/read files with
non-ASCII filenames. They use the Windows explorer to drag&drop files into
a console window running the Python program.
os.path.exists() does not detect such a file and an open() fails, too.
My code:
print("\nDrag&drop files
Laura Creighton wrote:
> Given that Ulli is in Germany, latin-1 is likely to work fine for him.
For me, but not for my users. We have people from about 100 nations at our
university.
> And you do it like this:
>
> # -*- coding: latin-1 -*-
> from Tkinter import *
> root = Tk()
> s = 'Välkom
Laura Creighton wrote:
> PyPy wrote its own pyreadline.
> You can get it here. https://bitbucket.org/pypy/pyrepl
As far as I can see, it has no getkey function.
My users do not hit ENTER after drag&drop or copy&paste files.
I need an input function with a timeout.
--
Ullrich Horlacher
I want to create a zip file within a Python 2.7 program on windows.
My code:
cmd = ['7za.exe','a','-tzip',archive] + files
status = subprocess.call(cmd)
leads to:
File "fexit.py", line 971, in sendfile_retry
status = subprocess.call(cmd)
File "C:\Python27\lib\subprocess.py", line 52
(My first posting seems to got lost)
I want to create a zip file within a Python 2.7 program on windows.
My code:
cmd = ['7za.exe','a','-tzip',archive] + files
status = subprocess.call(cmd)
leads to:
File "fexit.py", line 971, in sendfile_retry
status = subprocess.call(cmd)
File "C
Ulli Horlacher wrote:
> Instead of calling a 7z subprocess with non-ASCII arguments I tried to
> call it with a listfile: it starts with a "@" and contains the names of
> the files to be packed into the arcive. It is a special 7z feature.
>
> New code:
>
>
eryk sun wrote:
> pyreadline looked promising for its extensive ctypes implementation of
> the Windows console API [1], wrapped by high-level methods such as
> peek, getchar, and getkeypress. It turns out it ignores the event
> sequences you need for alt+numpad input (used when a file is dragged
Dennis Lee Bieber wrote:
> Python has a zipfile library that is portable between OS. Along with
> libraries for gzip, bzip2, and tarfiles...
Ohh.. this is new to me!
https://docs.python.org/2/library/tarfile.html
https://docs.python.org/2/library/zipfile.html
What is missing in the doc
Dennis Lee Bieber wrote:
> >I want to create a zip file within a Python 2.7 program on windows.
> >
> >My code:
> >
> > cmd = ['7za.exe','a','-tzip',archive] + files
> > status = subprocess.call(cmd)
> >
> My first thought would be...
>
> WHY spawn an OS dependent subprocess...
Is there an alternative to Tk's askopenfilename() and askdirectory()?
I want to select a files and directories within one widget, but
askopenfilename() let me only select files and askdirectory() let me only
select directories.
--
Ullrich Horlacher Server und Virtualisierung
Rechen
Lorenzo Sutton wrote:
> On 16/12/2015 14:18, Ulli Horlacher wrote:
> > Is there an alternative to Tk's askopenfilename() and askdirectory()?
> >
> > I want to select a files and directories within one widget, but
> > askopenfilename() let me only select file
Rick Johnson wrote:
> Unlike a true "applications language", like say, um, *JAVA*, one cannot
> simply compile an executable and distribute it in a teeny tiny binary
> form, no, with Python
Of course you can!
If have done this with pyinstaller. This creates a standalone Windows
executable you ca
Rick Johnson wrote:
> Oh i understand. What you opine for is something like: askOpenFileOrDir()
> -- which displays a dialog from which a file or directory can be selected
> by the user.
Yes, exactly!
Now: how?
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TI
Christian Gollwitzer wrote:
> Tk calls out into the native file manager to perform the file/open
> operation (on Win&Mac, on Unix it brings it's own).
This means, on Windows the user gets a "well known" file/directory browser?
Then this is an important feature!
Anything new and unknown is bad f
Is it possible to extract (and view) the Python script from the Windows
executable which was made by pyinstller?
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de
Universitaet Stuttgart Tel:++49-711-685
Oscar Benjamin wrote:
> On 8 January 2016 at 07:44, Ulli Horlacher
> wrote:
> > Is it possible to extract (and view) the Python script from the Windows
> > executable which was made by pyinstller?
>
> I may be misremembering but I though that pyinstaller actually
Cameron Simpson wrote:
> I always structure this aspect as:
>
> ... at or near top of script ...
>
> def main(argv):
>... do main logic here ...
>
> ... at bottom ...
> if __name__ == '__main__':
>sys.exit(main(sys.argv))
I, as a Python beginner, came to the same solution!
It seem
I have written a Python client for F*EX(*). It is designed for Windows
users, though it runs on UNIX, too. I am now looking for testers. If you
are interested, I will give you an account on my server.
(*) Frams' Fast File EXchange is a service to send files of any size to
any user anywhere in
Charles T. Smith wrote:
> while ($str != $tail) {
> $str ~= s/^(head-pattern)//;
> use ($1);
> }
use() is illegal syntax in Perl.
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de
Universitaet Stuttgart
I have an application which runs on Windows and UNIX where I need to get
one keypress from the user (without ENTER).
Keys which sends escape sequences (e.g. cursor or function keys) should be
ignored.
I have a solution for Windows, but not for UNIX:
The first byte of an escape sequence (example:
Ulli Horlacher wrote:
> The first byte of an escape sequence (example: ^[[21~ for F10) is
> recognized, but the trailing bytes then are not discarded by
> clear_keyboard_buffer() and get_key() returns the second byte of the
> escape sequence.
I have found a solution:
def clear_key
I have seen at several places "x == None" and "x is None" within
if-statements.
What is the difference?
Which term should I prefer and why?
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de
Universitaet Stuttgart
Chris Angelico wrote:
> On Sun, Jan 17, 2016 at 8:51 PM, Ulli Horlacher
> wrote:
> > I have seen at several places "x == None" and "x is None" within
> > if-statements.
> > What is the difference?
> > Which term should I prefer and why?
>
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
> > https://pbs.twimg.com/media/CWgV0ruUsAAcUD7.jpg
>
> Not bad.
$ python
Python 2.7.3 (default, Jun 22 2015, 19:33:41)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> bad=False
>>> not bad
True
--
Steven D'Aprano wrote:
> Every time I make a half-hearted attempt to learn enough Perl syntax to get
> started, I keep running into the differences between $foo, %foo and @foo
> and dire warnings about what happens if you use the wrong sigil
I have started learning Python several times and surre
James Harris wrote:
> I nearly gave up with Python at the very beginning before I realised not
> to mix tabs and spaces.
I nearly gave up with Python at the very beginning before I realised that
OO-programming is optional in Python! :-)
Most tutorials I found so far makes OO mandatory.
--
Ul
https://docs.python.org/2/library/tarfile.html says:
tarfile.open(name=None, mode='r', fileobj=None, bufsize=10240, **kwargs)
Return a TarFile object for the pathname name.
(How) can I read a tar file from a (tcp) socket?
I do not have a pathname but a socket object from socket.create_conn
Antoon Pardon wrote:
> > (How) can I read a tar file from a (tcp) socket?
> > I do not have a pathname but a socket object from socket.create_connection
>
> # First you construct a file object with makefile.
>
> fo = socket.makefile()
>
> # Then you use the fileobj argument with tarfile.open.
Ulli Horlacher wrote:
> I have:
>
> sock = socket.create_connection((server,port))
> bs = kB64
> taro = tarfile.open(fileobj=sock.makefile('w',kB64),mode='w')
>
>
>
> Traceback (most recent call last):
> (...)
>
Chris Angelico wrote:
> Sounds like tarfile needs a seekable file. How big is this file you're
> reading?
No limits. It can be many TBs...
The use case is:
http://fex.rus.uni-stuttgart.de:8080/
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mai
Ulli Horlacher wrote:
> With
>
> taro = tarfile.open(fileobj=sock.makefile('w',kB64),mode='w|')
>
> I get no more error.
Of course, this is the writing client.
Now I have a small problem with the reading client.
This code works so far:
sfo = sock.
Ulli Horlacher wrote:
> This code works so far:
>
> sfo = sock.makefile('r')
> taro = tarfile.open(fileobj=sfo,mode='r|')
> taro.extractall(path=edir)
>
> But it does not writes anything to the terminal to inform the user.
>
> W
In https://docs.python.org/2/library/tarfile.html there is a warning:
Never extract archives from untrusted sources without prior inspection.
It is possible that files are created outside of path, e.g. members that
have absolute filenames starting with "/" or filenames with two dots
"..".
Lars Gustäbel wrote:
> On Fri, Feb 12, 2016 at 09:35:40AM +0100, Antoon Pardon wrote:
> > On 02/11/2016 06:27 PM, Lars Gustäbel wrote:
> > > What about using an iterator?
> > >
> > > def myiter(tar):
> > > for t in tar:
> > > print "extracting", t.name
> > > yield t
> > >
> > >
Random832 wrote:
> On Thu, Feb 11, 2016, at 18:24, Ulli Horlacher wrote:
> > A better approach would be to rename such files while extracting.
> > Is this possible?
>
> What happens if you change member.name before extracting?
Ohh... such an easy solution! :-)
Matt Wheeler wrote:
> > How can I substitute the standard module function tarfile.extractall() with
> > my own function?
>
> import tarfile
> def new_extractall(self, *args, **kwargs):
> print("I am a function. Woohoo!")
>
> tarfile.TarFile.extractall = new_extractall
This is more easy tha
I need to extend the PATH environment variable on Windows.
So far, I use:
system('setx PATH "%PATH%;'+bindir+'"')
The problem: In a new process (cmd.exe) PATH contains a lot of double
elements. As far as I have understood, Windows builds the PATH
environment variable from a system component a
Thorsten Kampe wrote:
> * Ulli Horlacher (Tue, 16 Feb 2016 08:30:59 + (UTC))
> > I need to extend the PATH environment variable on Windows.
>
> 1. Add the path component yourself into HKEY_CURRENT_USER and make
> sure it's not there already (pure Pytho
Thorsten Kampe wrote:
> By the way: there is a script called `win_add2path.py` in your Python
> distribution
I have
"Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC
v.1500 32 bit (Intel)] on win32"
and there is no "win_add2path.py"
But I found another solution:
I need the ex
eryk sun wrote:
> > At startup cmd.exe runs a script which is defined by the registry variable
> > AutoRun in "HKCU\Software\Microsoft\Command Processor"
> >
> > I set this variable with:
> >
> > rc = "HKCU\Software\Microsoft\Command Processor"
> > ar = "%USERPROFILE%\Desktop\autorun.cmd"
> >
eryk sun wrote:
> >> The AutoRun command (it's a command line, not a script path)
> >
> > A script path is a legal command line, too.
>
> If the registry value were just a script path, you'd have to modify
> your script to chain to the previous script, if any. Since it's a
> command line you can
Dennis Lee Bieber wrote:
> >I have
> >"Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC
> >v.1500 32 bit (Intel)] on win32"
> >and there is no "win_add2path.py"
> >
> C:\Python_x64\Python27\Tools\scripts\win_add2path.py
Ok, It is here in C:\Python27\Tools\scripts\win_add2path.py
eryk sun wrote:
> https://hg.python.org/cpython/file/v2.7.11/Tools/scripts/win_add2path.py
>
> But there are a few issues with this script.
(... lot of flaws ...)
> Here's a new version for Python 2. I generalized the shell-variable
> replacement to a list of well-known folders.
Great script
Ulli Horlacher wrote:
> > but simpler still and more reliable to just call QueryValueEx.
>
> I find it more complicated.
I have now (after long studying docs and examples)::
def get_winreg(key,subkey):
try:
rkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER,key,0,winreg.KEY_READ
pyotr filipivich wrote:
> > Windows (especially 7) search function is highly crippled. There is
> >some command sequence that will open it up to looking at other file types
> >and locations.
> >
> >http://answers.microsoft.com/en-us/windows/forum/windows_7-files/windows-7-search-does-not-fi
I want to start a project with python.
The program must have a (simple) GUI and must run on Linux and Windows.
The last one as standalone executable, created with pyinstaller.
I have already an implementation in perl/tk :
http://fex.rus.uni-stuttgart.de/fop/ZAcXSugp/schwuppdiwupp.png
http://fex.be
Chris Angelico wrote:
> On Sat, Jul 11, 2015 at 7:28 PM, Ulli Horlacher
> wrote:
> > I want to start a project with python.
> > The program must have a (simple) GUI and must run on Linux and Windows.
> > The last one as standalone executable, created with pyinstaller.
Laura Creighton wrote:
> The question is, why do you want to reimplement this thing in Python?
The Windows support of perl/pp (a perl "compiler" similar to pyinstall) is
really bad. It does not work any more with Windows 7, I still have to use
Windows XP.
> If the plan is to get rid of some p
Christian Gollwitzer wrote:
> > I have already an implementation in perl/tk :
> > http://fex.rus.uni-stuttgart.de/fop/ZAcXSugp/schwuppdiwupp.png
> > http://fex.belwue.de/download/schwuppdiwupp.pl
>
> May I ask what is the reason to port this over to Python? Is it to learn
> Python, or do you wa
Chris Angelico wrote:
> > pyinstaller can make a standalone executable, there is no need for the
> > users to install "another library". They just click on the program icon,
> > that's it.
>
> Yeah, I'd distribute the .py files and have done with it.
This is not an option for me. My users only
Paul Rubin wrote:
> Ulli Horlacher writes:
> > This is not an option for me. My users only accept standalone executables.
> > They cannot install any runtime environment or extra libraries.
>
> Long ago I was involved with a thing like this and used Inno Setup,
> which
Paul Rubin wrote:
> Ulli Horlacher writes:
> >> Long ago I was involved with a thing like this and used Inno Setup,
> >> which was great. It's a very slick installer
> > It is not a matter of knowledge, but one of user rights.
> > It is also forbidden b
wxjmfa...@gmail.com wrote:
> On Windows, there are no more usable, working GUI toolkits (wrappers).
What is the problem with tkinter?
A first "hello world" program worked.
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stutt
I am currently developing a program which should run on Linux and Windows.
Later it shall be compiled with PyInstaller. Therefore I am using Python 2.7
My program must download http://fex.belwue.de/download/7za.exe
I am using this code:
sz = path.join(fexhome,'7za.exe')
szurl = "http://f
Peter Otten <__pete...@web.de> wrote:
> > It works with Linux, but not with Windows 7, where the downloaded 7za.exe
> > is corrupt: it has the wrong size, 589044 instead of 587776 Bytes.
> >
> > Where is my error?
>
> > sz = path.join(fexhome,'7za.exe')
> > szurl = "http://fex.belwue.de
Peter Otten <__pete...@web.de> wrote:
> Ulli Horlacher wrote:
>
> > if u.getcode() == 200:
> > print(u.read(),file=szo,end='')
> > szo.close()
> > else:
> > die('cannot get %s - server reply: %d' % (szurl,
Ulli Horlacher wrote:
> Peter Otten <__pete...@web.de> wrote:
> > - consider shutil.copyfileobj to limit memory usage when dealing with data
> > of arbitrary size.
> >
> > Putting it together:
> >
> > with open(sz, "wb") as szo:
>
Peter Otten <__pete...@web.de> wrote:
> > I have a problem with it: There is no feedback for the user about the
> > progress of the transfer, which can last several hours.
> >
> > For small files shutil.copyfileobj() is a good idea, but not for huge
> > ones.
>
> Indeed. Have a look at the sourc
I am rewriting a Perl program into Python (2.7).
It must run on Linux and Windows.
With Linux I have no problems, but Windows... :-(
The current show stopper is signal.SIGALRM which is not available on
Windows:
File "fexit.py", line 674, in formdata_post
signal.signal(signal.SIGALRM,timeout
Marko Rauhamaa wrote:
> Ulli Horlacher :
>
> > What is the best practise for a cross platform timeout handler?
>
> Here's the simplest answer:
>
>https://docs.python.org/3/library/threading.html#threading.Timer
>
> (Also available in Python 2.)
Hmmm...
Marko Rauhamaa wrote:
> Correct. The timer callback function (hello) would be called in a
> separate thread. An exception raised in one thread cannot be caught in
> the main thread. In general, there is no way for a thread to interrupt a
> sibling thread that is in a blocking function call.
Then
Terry Reedy wrote:
> On 11/11/2015 11:16 AM, Ulli Horlacher wrote:
> > I am rewriting a Perl program into Python (2.7).
>
> I recommend using 3.4+ if you possibly can.
It is not possible.
The main target platform offers only python 2.7
--
Ullrich Horlacher
1 - 100 of 119 matches
Mail list logo