Cecil Westerhof wrote:
> I was asked to copy a certain line from about 300 Excel lines to a new
> Excel file. That is not something I would like to do by hand and I
> immediately thought: that should be possible with Python.
>
> And it is. I was surprised how fast I could write that with openpyx
Chris Roberts wrote:
> ###
> CODE:
>elif line1.rstrip(‘\n’) in line2.strip(‘\n’):
>for line3 in myips:
>print “###”
>print “line1 is %s” % line1.rstrip(‘\n’)
>print “line2 is %s” % line2.strip(‘\n’)
> ###
> OUT
On 2019-06-26 22:14, Cecil Westerhof wrote:
MRAB writes:
Does Workbook support the 'with' statement?
If it does, then that's the best way of doing it.
(Untested)
with Workbook() as wb_out:
for filepath in filepathArr:
current_row = []
with load_workbook(
On 26Jun2019 14:21, Chris Roberts wrote:
###
CODE:
elif line1.rstrip(‘\n’) in line2.strip(‘\n’):
for line3 in myips:
print “###”
print “line1 is %s” % line1.rstrip(‘\n’)
print “line2 is %s” % line2.strip(‘\n’)
###
OUT
MRAB writes:
> Does Workbook support the 'with' statement?
>
> If it does, then that's the best way of doing it.
>
> (Untested)
>
> with Workbook() as wb_out:
> for filepath in filepathArr:
> current_row = []
>
> with load_workbook(filepath) as wb_in:
>
###
CODE:
elif line1.rstrip(‘\n’) in line2.strip(‘\n’):
for line3 in myips:
print “###”
print “line1 is %s” % line1.rstrip(‘\n’)
print “line2 is %s” % line2.strip(‘\n’)
###
OUTPUT:
line1 is 10.10.168.2
line2 is
On 2019-06-26 13:15, Cecil Westerhof wrote:
Cecil Westerhof writes:
I was asked to copy a certain line from about 300 Excel lines to a new
Excel file. That is not something I would like to do by hand and I
immediately thought: that should be possible with Python.
And it is. I was surprised ho
On 2019-06-26 16:47, Cecil Westerhof wrote:
I just started with GUI stuff in tkinter. I have a progressbar, but I
want it to be only visible when it is used. So I tried the following:
window = Tk()
window.title(window_str)
frame = Frame(window)
frame.pack(side = "top", fill =
On Wed, 26 Jun 2019 17:47:39 +0200, Cecil Westerhof wrote:
> I just started with GUI stuff in tkinter. I have a progressbar, but I
> want it to be only visible when it is used. So I tried the following:
> window = Tk()
> window.title(window_str)
> frame = Frame(window)
> frame.pac
On Wed, 26 Jun 2019 15:05:15 +0200, Cecil Westerhof wrote:
>> OK, then I will have to live with it.
I did find some references to a method where you first disable
the Tkinter title bar using overrideredirect(True). Then you
create a new title bar using a frame and canvas. You can then
set the f
On Wed, 2019-06-26 at 13:41 +0200, Cecil Westerhof wrote:
> I need to write a Python desktop program. I create it on a Linux
> system, but it has to run on a Windows system. When looking at how to
> create an executable it seems that you need to be on a Windows system
> to create a Windows executab
I just started with GUI stuff in tkinter. I have a progressbar, but I
want it to be only visible when it is used. So I tried the following:
window = Tk()
window.title(window_str)
frame = Frame(window)
frame.pack(side = "top", fill = "both", expand = True)
Button(window, text =
On 2019-06-26, Cousin Stanley wrote:
> You might try setting a given window geometry
> to accomodate the long title
> [...]
> window.geometry( "%dx%d+%d+%d" % ( win_w , win_h , ofs_h , ofs_v ) )
> Maybe add a bit of extra space for users with different default
> font sizes
On 2019-06-26, Cecil Westerhof wrote:
> [...] it seems that you need to be on a Windows system to create a
> Windows executable. Is this true, or is it possible to create a
> Windows executable on a Linux system?
AFIAK, you have to use a Windows system to create a windows
executable. In the pas
Cecil Westerhof wrote:
> I need to write a desktop program. I choose to use tkinter.
>
> How can I make sure the window title is visible? For example
> when I have the following code :
> from tkinter import Button, filedialog, Label, messagebox, Tk
>
>
> window = Tk()
> wind
Wildman writes:
> On Wed, 26 Jun 2019 13:25:15 +0200, Cecil Westerhof wrote:
>
>> I need to write a desktop program. I choose to use tkinter. How can I
>> make sure the window title is visible? For example when I have the
>> following code:
>> from tkinter import Button, filedialog, Labe
Cecil Westerhof writes:
> Is it necessary to close the workbooks to circumvent a resource
> leak?
Still like to know. When not necessary it is better not to cloes them
I think.
> Is it a problem when a workbook is closed two times? If so I need to
> make sure that this is not possible.
That i
"Peter Heitzer" writes:
> Cecil Westerhof wrote:
>>I need to write a Python desktop program. I create it on a Linux
>>system, but it has to run on a Windows system. When looking at how to
>>create an executable it seems that you need to be on a Windows system
>>to create a Windows executable. Is
On Wed, 26 Jun 2019 13:25:15 +0200, Cecil Westerhof wrote:
> I need to write a desktop program. I choose to use tkinter. How can I
> make sure the window title is visible? For example when I have the
> following code:
> from tkinter import Button, filedialog, Label, messagebox, Tk
>
>
>
Cecil Westerhof writes:
> I was asked to copy a certain line from about 300 Excel lines to a new
> Excel file. That is not something I would like to do by hand and I
> immediately thought: that should be possible with Python.
>
> And it is. I was surprised how fast I could write that with openpyx
Cecil Westerhof wrote:
>I need to write a Python desktop program. I create it on a Linux
>system, but it has to run on a Windows system. When looking at how to
>create an executable it seems that you need to be on a Windows system
>to create a Windows executable. Is this true, or is it possible to
Cecil Westerhof writes:
> I am writing a GUI program with tkinter. One function I have is:
> def select_dir():
> try:
> directory = filedialog.askdirectory()
> if directory == '':
> messagebox.showinfo(info_str, canceled_report)
> return
> chdir
I am writing a GUI program with tkinter. One function I have is:
def select_dir():
try:
directory = filedialog.askdirectory()
if directory == '':
messagebox.showinfo(info_str, canceled_report)
return
chdir(directory)
filepathArr = sorted(g
I need to write a desktop program. I choose to use tkinter. How can I
make sure the window title is visible? For example when I have the
following code:
from tkinter import Button, filedialog, Label, messagebox, Tk
window = Tk()
window.title('A long window title')
Button (win
I need to write a Python desktop program. I create it on a Linux
system, but it has to run on a Windows system. When looking at how to
create an executable it seems that you need to be on a Windows system
to create a Windows executable. Is this true, or is it possible to
create a Windows executable
I was asked to copy a certain line from about 300 Excel lines to a new
Excel file. That is not something I would like to do by hand and I
immediately thought: that should be possible with Python.
And it is. I was surprised how fast I could write that with openpyxl.
My first try was not very neat,
Sayth Renshaw wrote:
> Peter Otten wrote:
>> def explode_consultants(consultants):
Should have called that split_consultants(); takes a string and
>> consultants = (c.lstrip("#") for c in consultants.split(";"))
splits by ";", removes leading "#"
>> return (c for c in consult
>
> Since I didn't find a cool shortcut I decided to use brute force:
>
> $ cat pandas_explode_column.py
> import pandas as pd
>
> df = pd.DataFrame(
> [
> [
> "2019-06-21 11:15:00",
> "WNEWSKI, Joan;#17226;#BALIN, Jock;#18139;#DUNE, Colem;#17230;"
>
I am running a code to connect the google drive with google colab.But I have a
issue after connection.My Files are not able to read by google colab even after
link is established .
I have to read files from google drive in Google colab
My Code
!pip install -U -q PyDrive
from pydrive.auth impo
We are pleased to announce the mobile conference app for EuroPython
2019, again hosted on the Attendify platform:
EuroPython 2019 Conference App
* https://ep2019.europython.eu/events/conference-app/ *
Engage with the conference and its attendees
-
Sayth Renshaw wrote:
> Hi
>
> Having fun with pandas filtering a work excel file.
> My current script opens selected and filters the data and saves as excel.
>
> import pandas as pd
> import numpy as np
>
> log = pd.read_excel("log_dump_py.xlsx")
> df = log.filter(items=['Completed', 'Priority'
Hi,
I am using pytest to test my flask end points. I have grouped tests related to
all unauthenticated access in a class as you see below:
@pytest.mark.usefixtures("client_class")
class TestUnauthorizedRecipesAcces:
def test_update_a_recipe(self, create_recipe_record):
recipe = creat
Update.
Option 1. - This annihilates all text in the column leaving nothing.
completed_tasks['Consultant'] =
completed_tasks['Consultant'].str.rstrip('.#123')
Option 2. - returns unhashable series list.
output =
completed_tasks[completed_tasks['Consultant']].str.contains(r'/\b[^\d\W]+\b/g')
33 matches
Mail list logo