최근(2020년 11월 21일)에 릴리즈 4.1.1이 발표되었습니다.

C++ 언어로 작성된 wxPython은 Python2 와 Python3  모두에 사용가능한

Python의 GUI 래퍼(wrapper)입니다.

 

[1] wxPython 홈페이지

[2] wxPython 4.1.1 설치하기

   처음 설치 명령: pippip install wxPython==4.1.1

   업그레이드 명령: pippip install --upgrade wxPython==4.1.1

 

[3] 설치 후 버전 확인하기

>>> import wx
>>> wx.version()
'4.1.1 msw (phoenix) wxWidgets 3.1.5'
>>> wx.__version__
'4.1.1'

[4] 설치된 wxPython의 버전을 확인하는 GUI 소스

# -*- coding: utf-8 -*-
#!/usr/bin/env python

# Filename: versionGUI.py
#
# Date: 2020.11.28

import wx


class VersionDialog(wx.Dialog):
    def __init__(self, parent, title):
        wx.Dialog.__init__(self, parent, -1, title, size=(475, 240))
        self.sbox = wx.StaticBox(self, -1, 'Version Information', (10, 20), size=(440, 100))        
        self.sbox.SetFont( wx.Font(10, wx.ROMAN, wx.NORMAL, wx.NORMAL)  )
        
        font = wx.Font(11, wx.ROMAN, wx.NORMAL, wx.NORMAL) 
        a = wx.StaticText(self, -1 , "wx.version() = {0}".format(wx.version()), (15, 60))
        a.SetFont( font )
        b = wx.StaticText(self, -1 , "wx.__version__ = %s" % wx.__version__, (15, 85))
        b.SetFont( font )
        
        wx.StaticLine(self, 1,  (15, 145), (430, 2))
        wx.Button(self, 1, 'Okay', (340, 165), (100, -1))
        self.Bind(wx.EVT_BUTTON, self.OnClose, id=1)

    def OnClose(self, event):
        self.Destroy()
        quit()


if __name__ == "__main__":
    app = wx.App()
    dia = VersionDialog(None, "Version of wxPython")
    dia.ShowModal()
    if dia != None:
        dia.Destroy()
    app.MainLoop()

실행 결과:

 

 

 

Posted by Scripter
,

간단한 정수 계산, 분수 계산, 복소수 계산, 벡터 계산, 다항식 계산, 조립제법 등을

웹 상에서 바로 할 수 있는 Simple Web Calculator 입니다.

 

[ 정수 계산 예시 ]

Posted by Scripter
,

더 상세힌 내용과 설치에 관해서는 이곳을 빙문하세요.

 

ImageViewer v0.0.12 는 사진의 밝기를 보여준다.

 

 

Posted by Scripter
,

아래의 글은 MS의 유닛 테스트 적성하기 문서에 오류가 있어 바로 잡기 위한 글입니다.

유닛 테스트하는 도구로는 MSTest, NUnit, xUnit 등 몇 가지가 있는데

이 중에 MSTest를 이용하여 유닛 테스트하는 예를 작성해 보고자 한다.

컨솔 창에 Hello World! 라는 문구가 정상적으로 출력되는지 알아보는 유닛 테스트이다.

Visual Studio 2019 의 메뉴에서 "파일(F)" -> "새로 만들기" -> "프로젝트(P)"를 선택하고, "새 프로젝트 만들기" 창에서아래와 같이 선택하고 "다음(N)" 버큰을 클릭한다.

<새 프로젝트 만들기 창>

 

다음에 프로젝트 이름과 폴토를 선택하는 창에서 아래와 같이 "프로젝트 이름(N)" 입력 난에 HelloWorldTests 라고 입력하고, 그 아래 항목 "위치(L)" 난에서 적당한 폴더를 선택해 준다.

그리고 "다름(N)" 바튼을 클릭하면  Visual Studio 가 소스 작성하는 환경으로 된다.

 

<새 프로젝트 구성 창>

그리고 "다름(N)" 바튼을 클릭하면 Visual Studio 가 소스 작성하는 환경으로 된다.

이제 C# 소스 UnitTest1.cs 를 작성하는 곳의 소스를 다음 처럼 작성한다.

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using System;

namespace HelloWorldTests
{
    [TestClass]
    public class UnitTest1
    {
        private const string Expected = "Hello World!";
        [TestMethod]
        public void TestMethod1()
        {
            using (var sw = new StringWriter())
            {
                Console.SetOut(sw);
                HelloWorldTests.Program.SayHello();

                var result = sw.ToString().Trim();
                Assert.AreEqual(Expected, result);
            }
        }
    }

    class Program
    {
        public static void SayHello()
        {
            Console.WriteLine("Hello World!");
        }
    }
}

 

소스기 잘 작성되었으면 Visual Studio 의 메뉴에서 "빌드(B)" -> "솔루션 다시 빌드(R)" 을 선택하여

솔루션을 빌드한다.

빌드가 성공되면 아래 그림 처럼 Visual Studio의 메뉴에서 "테스트(S)" -> "테스트 탐색기(T)"를 선택한다.

<테스트 탐색기(T) 선택 메뉴>

 

아래의 테스트 탐색기 창의 도구바 메뉴 중에 가장 좌측에 있는 도구 버튼을 누르고 참시 기다리면 성공한 결과가 아래 처럼 나온다.

 

<유닛 테스트가 성공한 결과>

Posted by Scripter
,

 

VisualStudio 2019 의 메뉴에서 "도구(T)" -> "명령줄(L)" -> "개발자 PowerShell(P)" 을 선택하거나

윈도우 10에서 '윈도우 키' + 'R' 을 누른 다음 명령어 입력 난에 powershell 을 입력하여

나타난 PowerShell 창에서 다음을 입력한다.

 

function multarrays($a, $b) {
    $n,$m,$p = ($a.Count - 1), ($b.Count - 1), ($b[0].Count - 1)
    if ($a[0].Count -ne $b.Count) {throw "Multiplication impossible"}
    $c = @(0)*($a[0].Count)
    foreach ($i in 0..$n) {    
        $c[$i] = foreach ($j in 0..$p) { 
            $sum = 0
            foreach ($k in 0..$m){$sum += $a[$i][$k]*$b[$k][$j]}
            $sum
        }
    }
    $c
 }
 
function show($a) { $a | foreach{"$_"}}

 

계속해서 다음을 입력한다.

$a = @(@(1,2),@(3,4))
$b = @(@(5,6),@(7,8))
$c = @(5,6)

 

이제 다음을 한 줄씩 입력하면 각각의 곱셈 결과가 표시된다.

"`$a ="; show $a
""
"`$b ="; show $b
""
"`$c ="; $c
""
"`$a * `$b ="; show (multarrays $a $b)
""
"`$a * `$c ="; show (multarrays $a $c)

 

 

[참고 자료] Rosetta Code - Matrix Mulriplication

'프로그래밍 > PowerShell' 카테고리의 다른 글

0.3 - 0.2 - 0.1 != 0.0  (0) 2022.02.09
Posted by Scripter
,

 

C 언어나 C++ 언어에는 세제곱근을 구하는 함수 cbrt() 가 기본적으로 제공되어 있다.

소스에서 단지 #include <math.h> 또는 #include <cmath> 를 추가하기만 된다.

그러나 C# 언어에는 이런 함수가 기본적으로 제공되지 있지 않다. (Framework 의 경우)

그런데 Core 3.0 이상의 경우에는 C# 언어에서도 제곱근 함수 Sqrt() 와 세제곱근 함수 Cbrt() 를

기본적으로 사용할 수 있다. 

using System.Math;  구문이 없더라도 쓸 수 있다.

 

Visual Studion 2019에서 "새 프로젝트 만들기" -> "콘솔 앱(.NET Core)" 하고

프로젝트 이름을 적당히 써 주고 C# 소스 Progam.cs 를 편집하는 창에서

Main() 함수 부분을 다음과 같이 수정하고 빌드하여 실행한다.

 

static void Main(string[] args)
{
    // Calculate the cubic root of a single preceson type.
    float x = 27f;
    float y = MathF.Cbrt(x);
    Console.WriteLine("Cube root of {0} is {1}", x, y);
    
    // Calculate the cubic root of a double preceson type.
    double x2 = 0.000000000000125;
    double y2 = Math.Cbrt(x2);
    Console.WriteLine("Cube root of {0:F15} is {1:F5}", x2, y2);
    
    Console.Write("Press any key... ");
    Console.ReadLine();
}

 

그러면 컨솔 창에 실행 결과가 다음 처럼 출력된다.

Cube root of 27 is 3
Cube root of 0.000000000000125 is 0.00005
Press any key...

 

 

 

Posted by Scripter
,

참고: Special Pythagorean triplet Problem 9

 

아래는 문제 해결에 도움되는 유효한 (정수론의 어떠헌) 정리도 사용하지 않고,

단순히 중첩된 for 반복문을 사용한 (이해하기 쉬운) C# 소스와 그 실행 결과이다.

 

C# 소스:

// Filename: PainSolutionEulerProjectNum9.cs
//
// Compile: csc PainSolutionEulerProjectNum9.cs
//
// Execute: PainSolutionEulerProjectNum9
//
// See: https://projecteuler.net/problem=9

using System;

namespace GeneralCommandLineApp
{
   class Program
   {
        static void Main(string[] args)
        {
        	int c;
        	for (int a = 1; a <=1000/3; a++)
        	{
        	    for (int b = a;  a + b < 1000; b++)
        	    {
        		  c = 1000 - a - b;
        		  if (a*a + b*b == c*c && a + b > c) {
        		  	  Console.WriteLine("a = {0}, b = {1}, c = {2}", a, b, c);
        		  	  Console.WriteLine("And so a + b + c = {0} + {1} + {2} = {3}", a, b, c, a + b + c);
        		  	  Console.WriteLine("So their product is a*b*c = {0}*{1}*{2} = {3}", a, b, c, a*b*c);
        		  	  Console.WriteLine("Primitive Pythagorean triplet:");
        		  	  Console.WriteLine();

        		  	  int a2, b2, c2;
        		  	  a2 = a/25;
        		  	  b2 = b/25;
        		  	  c2 = c/25;
        		  	  int g = (int) gcd(a, b, c);
        		  	  Console.WriteLine("    g = gcd({0}, {1}, {2}) = {3}", a, b, c, g);
        		  	  Console.WriteLine("    a/g = {0}, b/g = {1}, c/g= {2}", a/g, b/g, c/g);
        		  	  Console.WriteLine("    {0}, {1},  {2}", a2, b2, c2);
        		  	  Console.WriteLine("    {0}^2 + {1}^2 = {3} + {4} = {5} = {2}^2", a2, b2, c2, a2*a2, b2*b2, c2*c2);
        		  }
                 }
            }
        }
            
        static Int64 gcd(Int64 x, Int64 y, Int64 z)
        {
        	Int64 w = EuclidGCD(x, y);
        	Int64 v = EuclidGCD(w, z);
        	return v;
        }
            
        static Int64 EuclidGCD(Int64 x, Int64 y)
        {
        	Int64 a, b, r;

        	a = x < 0 ? -x : x;
        	b = y < 0 ? -y : y;
        	
        	r = b;
             while (r > 0) {
                 b = a % r;
                 a = r;
                 r = b;
             }
             return a;
        }
    }
}

 

실행 결과:

a = 200, b = 375, c = 425
And so a + b + c = 200 + 375 + 425 = 1000
So their product is a*b*c = 200*375*425 = 31875000
Primitive Pythagorean triplet:

    g = gcd(200, 375, 425) = 25
    a/g = 8, b/g = 15, c/g= 17
    8, 15,  17
    8^2 + 15^2 = 64 + 225 = 289 = 17^2

 

 

Posted by Scripter
,

 

 

원시 피타고라스 삼조(primitive pythagorea triplet)를 생성하는

명령줄 어플(Command Line Application) C# 소스

 

C# 소스:

// Filename: GeneratePrimitivePythagoreanTriplets.cs
//
// Compile: csc GeneratePrimitivePythagoreanTriplets.cs
//
// Execute: GeneratePrimitivePythagoreanTriplets 7

using System;
using System.Collections.Generic;

namespace GeneralCommandLineApp
{
   class Program
    {
    	   public static Int64 GetGCD(Int64 xa, Int64 xb)
    	  {
    	  	  Int64 a = Math.Abs(xa);
    	  	  Int64 b = Math.Abs(xb);
    	  	  Int64 c;
    	  	  if (b > a) {
    	  	  	  c = b;
    	  	  	  b = a;
    	  	  	  a = c;
    	  	  }
    	  	  Int64 r;
    	  	  r = b;
    	  	  while (r > 0)
    	  	  {
    	  	  	  r = a % b;
    	  	  	  a = b;
    	  	  	  b = r;
    	  	  }
    	  	  return a;
    	  }

    	  public static void GeneratePrimitivePythagoreanTriplets(List<PythagoreanTriplet> data, Int64 k)
    	  {
    	  	  for (Int64 m = 2; m <= k; m++)
    	  	  {
    	  	      for (Int64 n = 1; n < m; n++)
    	  	      {
    	  	      	     if (GetGCD(m, n) == 1 && ((m % 2 == 0 && n % 2 != 0) || (m % 2 != 0 && n % 2 == 0))) {
    	  	  	         data.Add(new PythagoreanTriplet(m, n));
    	  	  	     }
    	  	      }
    	  	  }
        }

    	  public static void PrintTripletsAsTableForm(List<PythagoreanTriplet> data)
    	  {
    	  	  Int64 k = data.Count;
    	  	  Int64 a, b, c, m, n;
    	  	  Console.WriteLine("Print out some primitive Pythagorean triplets (a, b, c)\neach of which satisfies a^2 + b^2 = c^2.");
    	  	  Console.WriteLine();
    	  	  Console.WriteLine("      +--------+--------+-----------+-----------+-----------+");
    	  	  Console.WriteLine("      |        |        | m^2 - n^2 |     2mn   | m^2 + n^2 |");
    	  	  Console.WriteLine("      |     m  |     n  |      a    |      b    |      c    |");
    	  	  Console.WriteLine("      +--------+--------+-----------+-----------+-----------+");
    	  	  for (int i = 0; i < k; i++) {
    	  	      a = data[i].GetA();
    	  	  b = data[i].GetB();
    	  	  c = data[i].GetC();
    	  	  m = (Int64) Math.Sqrt((a + c)/2);
    	  	  n = b/(2*m);
    	  	  Console.WriteLine("      | {0, 6} | {1, 6} | {2, 9} | {3, 9} | {4, 9} |", m, n, a, b, c);
               }
               Console.WriteLine("      +--------+--------+-----------+-----------+-----------+");
        }

        static void Main(string[] args)
        {
        	Int64 c;
        	if (args.Length == 1) {
                c = Convert.ToInt64(args[0]);
                if (c < 1) {
                     Console.WriteLine("Sorry, you should a positive integer as an upper boud.");
                     return;
                }
                else {
                    List<PythagoreanTriplet> data = new List<PythagoreanTriplet>();
                    GeneratePrimitivePythagoreanTriplets(data, c);
                    PrintTripletsAsTableForm(data);
                    return;
                }
            }
            else
                Console.WriteLine("Usage:  GeneratePrimitivePythagoreanTriplets [UpperBound]");
        }
    }


     class PythagoreanTriplet {
        Int64 a, b, c;
        public PythagoreanTriplet(Int64 m, Int64 n) {
           	this.a = m*m - n*n;
            	this.b = 2*m*n;;
           	this.c = m*m + n*n;
       }
        public Int64 GetA() {
        	return this.a;
        }
        public Int64 GetB() {
        	return this.b;
        }
        public Int64 GetC() {
        	return this.c;
        }

        public override string ToString() {
        	return "(" + this.a + ", " + this.b + ", " + this.c + ")";
        }

        public bool IsPrimitive(Int64 xa, Int64 xb, Int64 xc)
        {
            return GCD(xa, xb, xc) == 1;
        

        public Int64 GCD(Int64 xa, Int64 xb)
        {
            Int64 a = Math.Abs(xa);
            Int64 b = Math.Abs(xb);
            Int64 c;
            if (b > a) {
                c = b;
                b = a;
                a = c;
            }
            Int64 r;
            r = b;
            while (r > 0)
            {
                r = a % b;
                 a = b;
                b = r;
            }
            return a;
        }

        public Int64 GCD(Int64 xa, Int64 xb, Int64 xc)
        {
            Int64 t = GCD(xa, xb);
            Int64 y = GCD(t, xc);
            return y;
        }
    }
}

 

명령 GeneratePrimitivePythagoreanTriplets 7 에 의한 실행 결과:

Print out some primitive Pythagorean triplets (a, b, c)
each of which satisfies a^2 + b^2 = c^2.

      +--------+--------+-----------+-----------+-----------+
      |        |        | m^2 - n^2 |     2mn   | m^2 + n^2 |
      |     m  |     n  |      a    |      b    |      c    |
      +--------+--------+-----------+-----------+-----------+
      |      2 |      1 |         3 |         4 |         5 |
      |      3 |      2 |         5 |        12 |        13 |
      |      4 |      1 |        15 |         8 |        17 |
      |      4 |      3 |         7 |        24 |        25 |
      |      5 |      2 |        21 |        20 |        29 |
      |      5 |      4 |         9 |        40 |        41 |
      |      6 |      1 |        35 |        12 |        37 |
      |      6 |      5 |        11 |        60 |        61 |
      |      7 |      2 |        45 |        28 |        53 |
      |      7 |      4 |        33 |        56 |        65 |
      |      7 |      6 |        13 |        84 |        85 |
      +--------+--------+-----------+-----------+-----------+

 

Posted by Scripter
,

C# 소스:

// Filename: GeneratePythagoreanTriplesn.cs
//
// Compile: csc GeneratePythagoreanTriples.cs
//
// Execute: GeneratePythagoreanTriples 40

using System;
using System.Collections.Generic;

namespace GeneralCommandLineApp
{
     class PythagorianTriple {
        Int64 a, b, c;
        public PythagorianTriple(Int64 x) {
             Int64 t;
        	if (x >1 && x % 2 == 1) {
           	    this.a = x;
            	    this.b = (x*x - 1)/2;;
           	    this.c = this.b + 1;;
        	}
        	else if (x >= 2) {
        	    t = x + 2;
            	    this.a = t;
            	    this.b = t*t/4 - 1;
           	    this.c = this.b + 2;;
           	}
       }
        public Int64 GetA() {
        	return this.a;
        }
        public Int64 GetB() {
        	return this.b;
        }
        public Int64 GetC() {
        	return this.c;
        }

        public override string ToString() {
        	return "(" + this.a + ", " + this.b + ", " + this.c + ")";
        }
    }
    
   class Program
    {
         public static void GenerateTriples(List<PythagorianTriple> data, Int64 k)
        {
    	  for (Int64 i = 1; i <= k; i++)
    	  {
    	      data.Add(new PythagorianTriple(2*i + 1));
    	      data.Add(new PythagorianTriple(2*i));
    	  }
        }

        public static void PrintTriplesAsTableForm(List<PythagorianTriple> data)
        {
    	  Int64 c = data.Count;
    	   int j;
              Console.WriteLine("Show Pythagorian triples (a, b, c) each of which satisfies a^2 + b^2 = c^2.");
              Console.WriteLine();
              Console.WriteLine("      +--------+--------+--------+         +--------+--------+--------+");
              Console.WriteLine("      |   Odd  |        |        |         |  Even  |        |        |");
              Console.WriteLine("      |     a  |     b  |     c  |         |     a  |     b  |     c  |");
              Console.WriteLine("      +--------+--------+--------+         +--------+--------+--------+");
               for (int i = 0; i < c; i += 2) {
                   Console.Write("      | {0, 6} | {1, 6} | {2, 6} |", data[i].GetA(), data[i].GetB(), data[i].GetC());
                   j = i + 1;
                   Console.WriteLine("         | {0, 6} | {1, 6} | {2, 6} |", data[j].GetA(), data[j].GetB(), data[j].GetC());
               }
              Console.WriteLine("      +--------+--------+--------+         +--------+--------+--------+");
        }


        static void Main(string[] args)
        {
        	Int64 c;
        	if (args.Length == 1) {
                c = Convert.ToInt64(args[0]);
                if (c < 1) {
                     Console.WriteLine("Sorry, you should a positive integer.");
                     return;
                }
                else {
                    List<PythagorianTriple> data = new List<PythagorianTriple>();
                    GenerateTriples(data, c);
                     PrintTriplesAsTableForm(data);
                     return;
                }
            }
            else
                Console.WriteLine("Usage:  GeneratePyThagoriaTriples  [number]");
        }
    }
}

 

 

 

 

 

실행: 프롬프트> GeneratePythagoreanTriples 40

실행 결과:

더보기

Show Pythagorian triples (a, b, c) each of which satisfies a^2 + b^2 = c^2.

+--------+--------+--------+ +--------+--------+--------+
| Odd | | | | Even | | |
| a | b | c | | a | b | c |
+--------+--------+--------+ +--------+--------+--------+
| 3 | 4 | 5 | | 4 | 3 | 5 |
| 5 | 12 | 13 | | 6 | 8 | 10 |
| 7 | 24 | 25 | | 8 | 15 | 17 |
| 9 | 40 | 41 | | 10 | 24 | 26 |
| 11 | 60 | 61 | | 12 | 35 | 37 |
| 13 | 84 | 85 | | 14 | 48 | 50 |
| 15 | 112 | 113 | | 16 | 63 | 65 |
| 17 | 144 | 145 | | 18 | 80 | 82 |
| 19 | 180 | 181 | | 20 | 99 | 101 |
| 21 | 220 | 221 | | 22 | 120 | 122 |
| 23 | 264 | 265 | | 24 | 143 | 145 |
| 25 | 312 | 313 | | 26 | 168 | 170 |
| 27 | 364 | 365 | | 28 | 195 | 197 |
| 29 | 420 | 421 | | 30 | 224 | 226 |
| 31 | 480 | 481 | | 32 | 255 | 257 |
| 33 | 544 | 545 | | 34 | 288 | 290 |
| 35 | 612 | 613 | | 36 | 323 | 325 |
| 37 | 684 | 685 | | 38 | 360 | 362 |
| 39 | 760 | 761 | | 40 | 399 | 401 |
| 41 | 840 | 841 | | 42 | 440 | 442 |
| 43 | 924 | 925 | | 44 | 483 | 485 |
| 45 | 1012 | 1013 | | 46 | 528 | 530 |
| 47 | 1104 | 1105 | | 48 | 575 | 577 |
| 49 | 1200 | 1201 | | 50 | 624 | 626 |
| 51 | 1300 | 1301 | | 52 | 675 | 677 |
| 53 | 1404 | 1405 | | 54 | 728 | 730 |
| 55 | 1512 | 1513 | | 56 | 783 | 785 |
| 57 | 1624 | 1625 | | 58 | 840 | 842 |
| 59 | 1740 | 1741 | | 60 | 899 | 901 |
| 61 | 1860 | 1861 | | 62 | 960 | 962 |
| 63 | 1984 | 1985 | | 64 | 1023 | 1025 |
| 65 | 2112 | 2113 | | 66 | 1088 | 1090 |
| 67 | 2244 | 2245 | | 68 | 1155 | 1157 |
| 69 | 2380 | 2381 | | 70 | 1224 | 1226 |
| 71 | 2520 | 2521 | | 72 | 1295 | 1297 |
| 73 | 2664 | 2665 | | 74 | 1368 | 1370 |
| 75 | 2812 | 2813 | | 76 | 1443 | 1445 |
| 77 | 2964 | 2965 | | 78 | 1520 | 1522 |
| 79 | 3120 | 3121 | | 80 | 1599 | 1601 |
| 81 | 3280 | 3281 | | 82 | 1680 | 1682 |
+--------+--------+--------+ +--------+--------+--------+

 

 

Posted by Scripter
,

한글, 일본어, 중국어를 모두 사용하는 문서를 작성하기 위해

 

한글2020을 설치하였지만, 중국어 입력은 되는데 일본어는 일본어 자판기를

 

선택만하기만 하면 한글2020의 동작이 멈추고 무한 대기 상태가 되어

 

작업관리자에서 한글2020강제 종료 해야먄 했다.

 

이 문제를 해결하고 나서 깨달은 것은 이전에 설치되어 있던 

 

한글 Office 2010 을 제거하였는데도 남아 있던 파일 hjimesv.ini 에 있던

 

내용 때문이었다. 한글 Office 2020을 설치했으면 설치 과정 중에

 

이 파일의 내용이 새로이 수정되고 자동으로 저장되어야 함에도 여전히 그대로

 

방치되어 한글 2020에서 일본어 입력을 전혀 못하다가

 

이 파일에 설정되어 있던 값을 수정하니

 

한글 2020에서 아무 문제 없이 일본어 입력을 잘 할 수 있게 되었다.

 

 

 

다음은 Right Shift + Spacebar(일본어 Hiragana 키보드)를 눌러 일본어를 입력 중인

 

화면을 캡쳐한 것이다.

 

[힌글 2020에서 일본어 하라가나 입력 중]

 

 

 

 

한글 2020에서 일본어자판을 선택하면 한글 2020이 비정상 종료하는 경우를 아래와 같이 해결하였다.

 

이전 버전의 한글 Office 2010을 사용할 때는 파일 C:\Windows\hjimesv.ini

 

에 일본어 자판기 관련 설정이 다음 처럼 되어 있었다.

 

[HncJapaneseIMEServer]
path=C:\Program Files (x86)\Hnc\Common80\him\

 

 

 

윈도우 보조프로그램 Notepad 를 관리자 실행권한으로 열어 이것의 내용을

 

아래와 같이 수정하였다. (필자의 경우 이전 버전 한글 Office 2010을 C:\ 드라이브에

 

설치되어 있었지만 새 버전 한글 Office 2020은 D:\ 드라이브에 설치하였다.

 

[HncJapaneseIMEServer]
path=D:\Program Files (x86)\HNC\Office 2020\HOffice110\Bin\Him\

 

 

위와 같이 수정된 내용을 다시 저장하고 한글 2020을 관리자 권한으로 실행하니

 

일본어 입력이 문제 없이 잘 되었다.

 

 

 

필자의 경우 자판기 설정이 다음 처럼 되어 있다.

 

(한글 2020의 메뉴에서 "도구" -> "글자판(K)" -> "글자판 바꾸기(K)" 하거나

 키보드 Alt+F2 를 클릭하면 나오는 창)

 

[자판기 설정]

 

 

키보드 Right Shift + Spacebar 를 클릭하면 일본어 하라가나 입력 글자판이 된다.

 

일본어 입력 상태에서 키보드 Right Shift + Spacebar 를 클릭하면 중국어 간체 입력 글자판이 되고,

 

중국어 입력 상태에서 키보드 Right Shift + Spacebar 를 클릭하면 일본어 히라가나 입력 글자판이 된다.

 

 

 

 

[참고 자료] https://namu.moe/w/한컴오피스%20한글

 

한컴오피스 한글

[ChineseIME]AIContext=TRUE1st Dictionary=c:\\program files (x86)\\hnc\\hoffice9\\bin\\him\\dic\\chn\\hncchn.dic2nd Dictionary=None3th Dictionary=None4th Dictionary=None5th Dictionary=None6th Dictionary=None7th Dictionary=None8th Dictionary=None9th Dictiona

namu.moe

 

Posted by Scripter
,